-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: match external templates to project on startup #988
fix: match external templates to project on startup #988
Conversation
072534c
to
96ee0e8
Compare
1ca74ed
to
cc2ef8c
Compare
return; | ||
} | ||
const fileName = project.getRootScriptInfos()[0].fileName; | ||
// Getting semantic diagnostics will trigger a global analysis. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it that getting semantic diagnostics always triggers global analysis or is this just because we're triggering diagnostics on a root file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting semantic diagnostics always triggers global analysis, because a new compiler is created every time. Technically any file will do, not just root files, but the file must be part of the project, so root file is a convenient candidate.
cc2ef8c
to
fede6e6
Compare
Currently, Ivy LS is not able to match external projects to their external templates if no TS files are open. This is because Ivy LS does not implement `getExternalFiles()`. To fix this, we take a different route: After ngcc has run, we send diagnostics for all the open files. But in the case where all open files are external templates, we first get diagnostics for a root TS file, then process the rest. Processing a root TS file triggers a global analysis, during which we match the external templates to their project. For a more detailed explanation, see https://github.com/angular/vscode-ng-language-service/wiki/Project-Matching-for-External-Templates Close angular#976
fede6e6
to
1cffa6a
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Currently, Ivy LS is not able to match external projects to their external
templates if no TS files are open. This is because Ivy LS does not implement
getExternalFiles()
.To fix this, we take a different route:
After ngcc has run, we send diagnostics for all the open files. But in the
case where all open files are external templates, we first get diagnostics
for a root TS file, then process the rest. Processing a root TS file triggers
a global analysis, during which we match the external templates to their
project.
For a more detailed explanation, see
https://github.com/angular/vscode-ng-language-service/wiki/Project-Matching-for-External-Templates