Skip to content
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

Filter out missing resource diagnostic when able to find uncompiled style with same name #1263

Closed
atscott opened this issue Apr 6, 2021 · 1 comment
Labels

Comments

@atscott
Copy link
Collaborator

atscott commented Apr 6, 2021

When a component uses a style url that points to the compiled source (styleUrls: ['abc.css']), the language service should filter out the COMPONENT_RESOURCE_NOT_FOUND diagnostics produced by the compiler when the uncompiled file is available (i.e. abc.scss). Generally this diagnostic is specific to the language service and would not result in actual compile-time errors because compilation would produce the compiled css before invoking the Angular compiler.

Related to internal issue, http://b/184175647

@atscott atscott added the bug label Apr 6, 2021
atscott added a commit to atscott/angular that referenced this issue Apr 8, 2021
…mpiled version is found

When a component uses a style url that points to the compiled source
(`styleUrls: ['abc.css']`), the language service should filter out the
`COMPONENT_RESOURCE_NOT_FOUND` diagnostics produced by the compiler when the
uncompiled file is available (i.e. `abc.scss`). Generally this diagnostic is
specific to the language service and would not result in actual compile-time
errors because compilation would produce the compiled `css` before invoking the
Angular compiler.

Fixes angular/vscode-ng-language-service#1263
atscott added a commit to atscott/angular that referenced this issue Apr 9, 2021
…d css url is provided

With this commit, the language service will first try to locate a
pre-compiled style file with the same name when a `css` is provided in
the `styleUrls`. This prevents a missing resource diagnostic for when the
compiled file is not available in the language service environment and also
allows "go to definition" to go to that pre-compiled file.

Fixes angular/vscode-ng-language-service#1263
atscott added a commit to atscott/angular that referenced this issue Apr 9, 2021
…d css url is provided

With this commit, the language service will first try to locate a
pre-compiled style file with the same name when a `css` is provided in
the `styleUrls`. This prevents a missing resource diagnostic for when the
compiled file is not available in the language service environment and also
allows "go to definition" to go to that pre-compiled file.

Fixes angular/vscode-ng-language-service#1263
atscott added a commit to atscott/angular that referenced this issue Apr 9, 2021
…d css url is provided

With this commit, the language service will first try to locate a
pre-compiled style file with the same name when a `css` is provided in
the `styleUrls`. This prevents a missing resource diagnostic for when the
compiled file is not available in the language service environment and also
allows "go to definition" to go to that pre-compiled file.

Fixes angular/vscode-ng-language-service#1263
atscott added a commit to atscott/angular that referenced this issue Apr 9, 2021
…d css url is provided

With this commit, the language service will first try to locate a
pre-compiled style file with the same name when a `css` is provided in
the `styleUrls`. This prevents a missing resource diagnostic for when the
compiled file is not available in the language service environment and also
allows "go to definition" to go to that pre-compiled file.

Fixes angular/vscode-ng-language-service#1263
atscott added a commit to atscott/angular that referenced this issue Apr 13, 2021
…d css url is provided

With this commit, the language service will first try to locate a
pre-compiled style file with the same name when a `css` is provided in
the `styleUrls`. This prevents a missing resource diagnostic for when the
compiled file is not available in the language service environment and also
allows "go to definition" to go to that pre-compiled file.

Fixes angular/vscode-ng-language-service#1263
atscott added a commit to atscott/angular that referenced this issue Apr 13, 2021
…d css url is provided

With this commit, the language service will first try to locate a
pre-compiled style file with the same name when a `css` is provided in
the `styleUrls`. This prevents a missing resource diagnostic for when the
compiled file is not available in the language service environment and also
allows "go to definition" to go to that pre-compiled file.

Fixes angular/vscode-ng-language-service#1263
atscott added a commit to atscott/angular that referenced this issue Apr 14, 2021
…d css url is provided

With this commit, the language service will first try to locate a
pre-compiled style file with the same name when a `css` is provided in
the `styleUrls`. This prevents a missing resource diagnostic for when the
compiled file is not available in the language service environment and also
allows "go to definition" to go to that pre-compiled file.

Fixes angular/vscode-ng-language-service#1263
atscott added a commit to atscott/angular that referenced this issue Apr 14, 2021
…d css url is provided

With this commit, the language service will first try to locate a
pre-compiled style file with the same name when a `css` is provided in
the `styleUrls`. This prevents a missing resource diagnostic for when the
compiled file is not available in the language service environment and also
allows "go to definition" to go to that pre-compiled file.

Fixes angular/vscode-ng-language-service#1263
zarend pushed a commit to angular/angular that referenced this issue Apr 14, 2021
…d css url is provided (#41538)

With this commit, the language service will first try to locate a
pre-compiled style file with the same name when a `css` is provided in
the `styleUrls`. This prevents a missing resource diagnostic for when the
compiled file is not available in the language service environment and also
allows "go to definition" to go to that pre-compiled file.

Fixes angular/vscode-ng-language-service#1263

PR Close #41538
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
1 participant