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

Project engine is using the fallback Razor configuration, where the real one is available #8905

Closed
davidwengier opened this issue Jul 4, 2023 · 0 comments · Fixed by #9004
Assignees
Milestone

Comments

@davidwengier
Copy link
Member

davidwengier commented Jul 4, 2023

Found while investigating #8572, and probably the root cause.

Steps to repro:

  1. Revert Make the latest configuration actually be somewhat recent #8906
  2. Open an existing project that has a @typeparam directive with a where clause

Actual:
Errors

Expected:
No errors

The above PR mitigated the issue by making the "Latest" configuration actually be latest, which is fine, but I suspect we shouldn't be using the fallback config anyway. One possible place where the issue shows up is here:
https://github.com/dotnet/razor/blob/main/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ProjectConfigurationStateSynchronizer.cs#L127

That call to AddProject will use the FallbackConfiguration.Latest, since there is no facility to provide a different one, but we do have the right one deserialized from the project.razor.json file. The EnqueueUpdateProject method a few lines later should be presumably updating the added project with the right configuration, but either a) thats not happening, b) thats not happening fast enough, or c) nobody is being notified that it happened. Not sure which.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant