Skip to content

Allow full source from metadata and decompilation in LSP#59217

Merged
davidwengier merged 1 commit intodotnet:mainfrom
davidwengier:LSPGTDSourceLink
Feb 2, 2022
Merged

Allow full source from metadata and decompilation in LSP#59217
davidwengier merged 1 commit intodotnet:mainfrom
davidwengier:LSPGTDSourceLink

Conversation

@davidwengier
Copy link
Member

Fixes #58702

I set this wrong when I expanded from one allowDecompilation parameter here, to two.

@davidwengier davidwengier requested a review from a team as a code owner February 2, 2022 09:56
@ghost ghost added the Area-IDE label Feb 2, 2022
if (!typeOnly || symbol is ITypeSymbol)
{
var declarationFile = await _metadataAsSourceFileService.GetGeneratedFileAsync(document.Project, symbol, signaturesOnly: true, allowDecompilation: false, cancellationToken).ConfigureAwait(false);
var declarationFile = await _metadataAsSourceFileService.GetGeneratedFileAsync(document.Project, symbol, signaturesOnly: false, allowDecompilation: true, cancellationToken).ConfigureAwait(false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just remembered - should we instead pass the 'navigate to decompiled source option' here?
image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The decompilation service checks that internally, and ignores the allowDecompilation parameter if the option is off.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah got it, lgtm then!

@davidwengier davidwengier merged commit fe35bc0 into dotnet:main Feb 2, 2022
@davidwengier davidwengier deleted the LSPGTDSourceLink branch February 2, 2022 22:01
@ghost ghost added this to the Next milestone Feb 2, 2022
@RikkiGibson RikkiGibson modified the milestones: Next, 17.2.P1 Feb 4, 2022
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 this pull request may close these issues.

[LSP] Go to Definition doesn't support source link (or decompilation)

4 participants