Skip to content

Conversation

MangelMaxime
Copy link
Contributor

@MangelMaxime MangelMaxime commented Apr 12, 2021

I am trying to work on some issues/improvements I would like to propose to fsharp-language-server and encountered some problem for running the project.

Here is a list of the issues and solution I followed to fix them:

When running npm install I got:

Detected VS Code engine version: ^1.24.0
Error installing vscode.d.ts: Error: Request returned status code: 404
Details: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /api/releases/stable</pre>
</body>
</html>

A solution is proposed on this issue microsoft/vscode#119822 (comment) linking to a migration guide.

I followed the migration guide but didn't installed the vscode-test extensions because I don't think this project is running debugging inside of the VSCode.

After that I got an error from the TypeScript compiler

TS2304: Cannot find name 'unknown'.

In order, to fix it I upgraded the TypeScript compiler to latest version as unkown has been introduced in version 3 and the project was using version 2.

After that I got an error from the TypeScript compiler

TS2300: Duplicate identifier 'IteratorResult'.

This time I upgraded @types/node to the latest version.

When running the extension via the Extension debug task, I had the error Couldn't start client F# Language Server. The problem, was that on windows the command name as used in findInPath should be dotnet.exe and not just dotnet.

I added a platform detection so choose the right name to follow the actual code. But personally, I would just change the code to

serverOptions = { 
-	command: findInPath(commandName), 
+	command: "dotnet", 
	args: ['run', '--project', 'src/FSharpLanguageServer'], 
	transport: TransportKind.stdio,
	options: { cwd: context.extensionPath }
}

because the findInPath doesn't really provide anything. We don't add an error message or anything currently to help debug the issue.

Edit: If you want me to change the code to remove findInPath please tell me, I will update the PR or create a new one.

@georgewfraser
Copy link
Collaborator

Hey @MangelMaxime , can you try rebasing on latest master to see if this fixes the tests?

@MangelMaxime
Copy link
Contributor Author

Sure will do

@MangelMaxime MangelMaxime force-pushed the upgrade_vscode_and_fix_windows branch from 5556003 to 8d4399a Compare April 30, 2021 16:16
@MangelMaxime
Copy link
Contributor Author

The CI is indeed fixed.

I don't know why the one test is still failing locally for me. The one about CSharp reference but it is not a problem to me if the CI validate the build.

@faldor20
Copy link
Collaborator

Closing because this is no longer relevant. We are way past this version.
Thanks for your work regardless :)

@faldor20 faldor20 closed this Jun 24, 2022
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.

3 participants