AdaCore / ada_language_server

Server implementing the Microsoft Language Protocol for Ada and SPARK
GNU General Public License v3.0
226 stars 54 forks source link

Windows: Unable to find language_server exe on 23.0.20 #1157

Closed pvanlaar closed 11 months ago

pvanlaar commented 11 months ago

The current version of the extension causes a failure on startup on Windows. All functionality from the extension is disabled due to this failure. We verified this beheviour on two separate pc's. Installing 23.0.19 resolved the issue.

The error shown is that ada_language_server van not be found at the following path $HOME\.vscode\extensions\adacore.ada-23.0.20\x64\win32\ada_language_server. The .exe extension is missing, maybe that causes this.

Message (replaced home folder with $HOME):

This installation of the Ada extension does not have the Ada language server for your architecture (x64) and platform (win32) at the expected location: $HOME\.vscode\extensions\adacore.ada-23.0.20\x64\win32\ada_language_server
setton commented 11 months ago

Hi @pvanlaar - thank you for reporting this! We're on it, preparing a new release shortly. Very sorry about this.

pvanlaar commented 11 months ago

Thanks for the very swift reply. Looking at the latest changes I don't understand why the exe is missing. Running the code from that change (commit - d280727920) results in:

import { platform } from 'node:process';

console.log(`This platform is ${platform}`); // this platform is win32

serverExecPath = 'my_file'

if (process.platform == 'win32') {
    // Add the extension for the file lookup further below
    serverExecPath = `${serverExecPath}.exe`;
}

console.log(`This serverExecPath is ${serverExecPath}`); // this serverExecPath is my_file.exe
reznikmm commented 11 months ago

:wrench: should work in 23.0.21!

pvanlaar commented 11 months ago

It works for me. Thanks for solving this.