BUG: NG2016 reported incorrectly for package libraries

This issue has been created since 2022-11-21.

Which @angular/* package(s) are the source of the bug?

core

Is this a regression?

Yes

Description

Event though declared as breaking change, it should not mean, that valid code should be also reported as bug.

The injectable SomeService inherits its constructor from RESTClient, but the latter has a constructor parameter that is not compatible with dependency injection. Either add an explicit constructor to SomeService or change RESTClient's constructor to use parameters that are valid for DI.

Base class has @Injectable and also is using InjectionToken for each constructor parameter that is not compatible with dependency injection.

If i copy base class into project everything works fine, but if base class with parameters using InjectionToken is declared in package library and used as dependency, this error is reported.

https://github.com/ressurectit/ng-rest/blob/13.0/src/rest/common.ts#L38

I can also provide full reproduction steps easily.

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

Node: 16.15.0
OS: Windows 10
Angular: 15

Anything else?

No response

JoostK wrote this answer on 2022-11-21

Thanks for the report, this is indeed an oversight.

More Details About Repo
Owner Name angular
Repo Name angular
Full Name angular/angular
Language TypeScript
Created Date 2014-09-18
Updated Date 2022-12-01
Star Count 85220
Watcher Count 3042
Fork Count 22607
Issue Count 1316

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
Regression using schemars `0.8.11` with CRDs `openAPIV3Schema` that use enums 1 2022-10-10 2022-11-20
Upgrade to tokio 0.3 7 2020-12-15 2022-10-16
Starting upload of images... CATCH ERROR: ERROR STATUS: 401[Bug]: 3 2022-06-09 2022-11-16
When only local login is available the "OR" bar should not be displayed at login 1 2022-09-01 2022-11-27
On glob import, if the name collide - wrong `go to` will be 0 2022-09-18 2022-10-05
KeyError: '__builtins__' 2 2021-02-04 2022-08-27
Follow up on Shuffler interacted with DataLoader 7 2022-05-19 2022-11-06
plotting off-axis dose profile 2 2021-02-13 2022-08-20
Game Crash Mid Gameplay 1 2022-07-21 2022-10-05
Add background to storymode 0 2022-07-21 2022-10-25
Check ephemeral containers' `securityContext` 0 2021-12-01 2022-11-17
[FEATURE] Multichannel processing 4 2022-03-29 2022-11-05
Feature request: Provide "User Installer" like VS Code. 0 2022-09-19 2022-09-22
Symfony\Component\Debug\Exception\FatalThrowableError in GET /api/v1/helpdesk/my-tickets-user-count 0 2022-09-05 2022-09-14
Provide way to lookup options for commands 1 2020-05-06 2022-10-08
Add Contrast Normalization 0 2021-10-05 2022-11-14
Diff generation for Gerrit should accept a simple code diff instead of the files.json that Gerrit provides 0 2021-09-01 2022-08-27
How to deal with NonNull 22 2018-12-08 2022-10-16
Identification -- hacker or not? 2 2021-06-17 2022-11-23
invalid value for flag -ldflags: parameter may not start with quote character ' 2 2022-10-17 2022-11-21
[SB] > Questionnaire >Branching configured for the questionnaires is not working consistently 3 2021-10-20 2022-11-11
-- Logging error in Loguru Handler #1 --- 2 2022-01-26 2022-11-05
SearchRequestBuilder contains 1 abstract method and must therefore be declared abstract or implement the remaining methods 1 2021-02-23 2022-11-11
PCCE doesn't work on the 80x86 Co Pro 2 2020-07-06 2022-09-16
Documentation is confusing because of non-existent features being documented 1 2021-09-29 2022-11-06
Adding Headers (Language, Display Title) When Converting Using the CLI 3 2021-08-11 2022-11-10
Question: Should I be instantiating a different client per service? 0 2022-01-16 2022-11-18
SfBPowerShellSessionViaTeamsModule session availability is Busy 2 2021-12-03 2022-10-29
Create CLI interface 3 2021-12-06 2022-10-15
The specified child already has a parent (when using with react-navigation) 5 2021-10-06 2022-11-01
Support multipart/form-data and json 3 2019-04-13 2022-11-28
Upgrade mysql srv to async from sync 1 2022-01-21 2022-10-04
Track atyuwen mobile trade-off optimization 0 2021-08-29 2022-11-25
Write tests for JSON RPC network client 0 2022-09-30 2022-11-04
Hardcoded initContainer image name 1 2021-03-13 2022-11-08
Positioning a loaded instance on a big gridmap is buggy 3 2022-03-09 2022-09-29
xfce4-power-manager applet keeps crashing when clicked 0 2022-08-22 2022-08-22
`androidenv.emulateApp` `emulator` command complains about "No such file or directory" 0 2022-08-22 2022-08-22
Celestia: wrong executable name in desktop file 1 2022-08-22 2022-08-22
Doesn't appear to work with Electron 17.0.1 4 2022-03-07 2022-12-01
printf output from librfxcodec is block-buffered 0 2021-11-10 2022-10-07
Delegate in gallery opens image as url not in popup 2 2018-06-27 2022-11-22
Client controllable "info" area in dashboard status page 0 2022-07-14 2022-10-11
Training/Testing ETA - Epochs Duration 1 2021-08-07 2022-11-10
Sliced inference with SAHI on detecting small object in large Aerial image 2 2021-09-22 2022-09-25
Replace SimStream implementation in lambda/src/simulated.rs with Tokio DuplexStream 1 2021-01-27 2022-11-06
StyleText的输入图片一定要32*320的尺寸吗 11 2022-02-23 2022-10-12
manifest digest mismatch pushing to private docker registry 3 2022-07-14 2022-10-12
Rulers position is incorrect when using window.zoomLevel 9 2022-01-25 2022-10-20
Types wrong for TreeSelect onSelect/onDeselect 0 2022-03-08 2022-10-08