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

SymbolFinder does not find generated symbols #63375

Closed
333fred opened this issue Aug 13, 2022 · 1 comment
Closed

SymbolFinder does not find generated symbols #63375

333fred opened this issue Aug 13, 2022 · 1 comment
Assignees
Labels
Milestone

Comments

@333fred
Copy link
Member

333fred commented Aug 13, 2022

Version Used: 4.3.0

Steps to Reproduce:

  1. Create a workspace with a source-generated symbol and no user-defined source trees.
  2. Attempt to use SymbolFinder to find the generated symbol

Expected Behavior:

Symbol is found.

Actual Behavior:

Symbol is not found. SymbolFinder appears to not attempt searching source-generated documents at all.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Aug 13, 2022
@333fred 333fred added Area-IDE IDE-Navigation Navigation and search Bug and removed Area-Compilers labels Aug 13, 2022
333fred added a commit to 333fred/omnisharp-roslyn that referenced this issue Aug 13, 2022
333fred added a commit to 333fred/roslyn that referenced this issue Aug 13, 2022
SymbolFinder was bailing out if there were no syntactic matches to the requested filter, avoiding creating a compilation at all if no document contained anything that could be named that symbol. Unfortunately, this optimization does not work if a project has source generators, as the generated documents are not checked.

Fixes dotnet#63375.
333fred added a commit to 333fred/roslyn that referenced this issue Aug 13, 2022
SymbolFinder was bailing out if there were no syntactic matches to the requested filter, avoiding creating a compilation at all if no document contained anything that could be named that symbol. Unfortunately, this optimization does not work if a project has source generators, as the generated documents are not checked.

Fixes dotnet#63375.
333fred added a commit to OmniSharp/omnisharp-roslyn that referenced this issue Aug 13, 2022
* Provide SourceGeneratedFileInfo for workspace symbolls requests

Updates the workspace symbols requests to provide a SourceGeneratedFileInfo when the symbol is from a source generated file, so aware editors can retrieve information about the file and display it correctly, rather than showing no information.

* Add tests, filed dotnet/roslyn#63375 on roslyn.
333fred added a commit to 333fred/roslyn that referenced this issue Aug 13, 2022
Because of dotnet#63375, O# cannot currently use SymbolFinder for finding all symbols for a pattern in the workspace. As a workaround, expose INavigateToSearcherService via EA to unblock the workspace symbol service.
333fred added a commit that referenced this issue Aug 13, 2022
* Add ExternalAccess for INavigateToSearcherService

Because of #63375, O# cannot currently use SymbolFinder for finding all symbols for a pattern in the workspace. As a workaround, expose INavigateToSearcherService via EA to unblock the workspace symbol service.
@dibarbet dibarbet removed the untriaged Issues and PRs which have not yet been triaged by a lead label Aug 15, 2022
@dibarbet dibarbet added this to the Backlog milestone Aug 15, 2022
@CyrusNajmabadi
Copy link
Member

Closing out as by design. All these systems work off of indices cached for real documents. We have no bandwidth or desire to update them for SG scenarios, which goes under the bucket of IDE only doing minimal work to support SG cases.

@CyrusNajmabadi CyrusNajmabadi closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants