fix(compiler-cli): improve error for non-exported standalone imports#67370
Open
SkyZeroZx wants to merge 1 commit intoangular:mainfrom
Open
fix(compiler-cli): improve error for non-exported standalone imports#67370SkyZeroZx wants to merge 1 commit intoangular:mainfrom
SkyZeroZx wants to merge 1 commit intoangular:mainfrom
Conversation
SkyZeroZx
commented
Feb 28, 2026
| !reflector.isStaticallyExported(ref.node) && hasAngularCoreDecorator(ref.node, reflector); | ||
|
|
||
| const error = isDeferredImport | ||
| ? makeUnknownComponentDeferredImportDiagnostic(ref, importExpr) |
Contributor
Author
There was a problem hiding this comment.
As far as I understand (based on what I’ve reviewed in the code), makeUnknownComponentDeferredImportDiagnostic is used when a component is used with @defer. I’m not sure whether this diagnostic would also apply here or if it’s irrelevant
JeanMeche
reviewed
Mar 1, 2026
Add diagnostic when a standalone imports entry references a non-exported directive/component/pipe. Fixes angular#49874
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add diagnostic when a standalone imports entry references a non-exported directive/component/pipe.
Fixes #49874
What is the current behavior?
Misleading message shown
What is the new behavior?
Now language service should be show :