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

Fix path to server when running platform neutral vsix #5940

Merged
merged 2 commits into from
Jul 20, 2023

Conversation

dibarbet
Copy link
Member

Won't fully work until dotnet/roslyn#69110 is in

@dibarbet dibarbet requested a review from jasonmalinowski July 19, 2023 20:04
@dibarbet dibarbet requested a review from a team as a code owner July 19, 2023 20:04
src/lsptoolshost/roslynLanguageServer.ts Outdated Show resolved Hide resolved
src/lsptoolshost/roslynLanguageServer.ts Show resolved Hide resolved
@@ -673,7 +673,13 @@ function getServerFileName(platformInfo: PlatformInformation) {
extension = '.dll';
}

return `${serverFileName}${extension}`;
let pathWithExtension = `${serverFilePath}${extension}`;
if (!fs.existsSync(pathWithExtension)) {
Copy link
Member

Choose a reason for hiding this comment

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

So on Linux we don't set extension, expect this to fail and then take the if block?

Copy link
Member Author

Choose a reason for hiding this comment

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

On linux, if the platform specific version is installed there will be a 'Microsoft.CodeAnalysis.LanguageServer' file (no extension). That will exist, so we won't take this block.

If we're using the neutral version, there will be no 'Microsoft.CodeAnalysis.LanguageServer' file, we'll hit this and find the dll instead.

Copy link
Member

Choose a reason for hiding this comment

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

Oh right, I forgot there'd be no extension. It might make sense to put a comment there that the lack of setting that is intentional, but...

@@ -673,7 +673,13 @@ function getServerFileName(platformInfo: PlatformInformation) {
extension = '.dll';
}

return `${serverFileName}${extension}`;
let pathWithExtension = `${serverFilePath}${extension}`;
if (!fs.existsSync(pathWithExtension)) {
Copy link
Member

Choose a reason for hiding this comment

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

Oh right, I forgot there'd be no extension. It might make sense to put a comment there that the lack of setting that is intentional, but...

@dibarbet dibarbet merged commit f62d8f1 into dotnet:main Jul 20, 2023
@dibarbet dibarbet deleted the fix_neutral branch July 20, 2023 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants