fortran-lang / fortls

fortls - Fortran Language Server
https://fortls.fortran-lang.org/
MIT License
258 stars 41 forks source link

Error launching fortls: Please check that all selected options are supported by your language server version #427

Closed ceeeeeeeeeeeeeeeeb closed 3 months ago

ceeeeeeeeeeeeeeeeb commented 3 months ago

Describe the bug Hi, in vscode, i've installed modern fortran extension and fortls , got this error : Error launching fortls: Please check that all selected options are supported by your language server version

moder fortran version: v3.4.2024061901 (pre-release)
fortls version: 3.1.2 i searched internet and have found similar issue but their solutions dont work for me .

in my condition , i use portable vscode ,version is 1.92.2 , i download .zip file x64 and unzip it then create a folder named "data" in vscode root folder; i use portable python environment winpython , this is download link , i selected Winpython64-3.12.4.1dot.exe
it's a self-extracting file , i unzip it without any follower settings, then i run pip install fortls from WinPython Command Prompt.exe , fortls are installed successfully , location is at D:\AppPortable\WPy31241\python-3.12.4.amd64\Scripts\fortls.exe i pasted this path to modern fortran "fortran.fortls.path": "D:\\AppPortable\\WPy31241\\python-3.12.4.amd64\\Scripts\\fortls.exe" but always got this error : Error launching fortls: Please check that all selected options are supported by your language server version

i have no idea how to solve it . below is my vscode settings.json { "workbench.colorTheme": "Default Light+", "editor.mouseWheelZoom": true, "files.autoSave": "afterDelay", "files.autoSaveDelay": 5000, "files.autoGuessEncoding": true, "editor.cursorBlinking": "smooth", "terminal.integrated.smoothScrolling": true, "editor.formatOnSave": true, "editor.wordWrap": "on", "debug.showBreakpointsInOverviewRuler": true, "workbench.iconTheme": "material-icon-theme", "editor.renderWhitespace": "boundary", "explorer.confirmDelete": false, "python.defaultInterpreterPath": "D:\\AppPortable\\WPy31241\\python-3.12.4.amd64\\python.exe", "python.languageServer": "Pylance", "fortran.linter.compilerPath": "C:\\mingw64\\bin\\gfortran.exe", "fortran.formatting.findentArgs": [ "-i2" ], "fortran.formatting.path": "D:\\AppPortable\\WPy31241\\python-3.12.4.amd64\\Scripts", "jupyter.askForKernelRestart": false, "fortran.fortls.notifyInit": true, "fortran.fortls.path": "D:\\AppPortable\\WPy31241\\python-3.12.4.amd64\\Scripts\\fortls.exe" }

below is Output - ModernFortran:

[INFO - 22:15:04] Extension Name: Modern Fortran [INFO - 22:15:04] Extension Version: 3.4.0 [INFO - 22:15:04] Linter set to: "gfortran" [INFO - 22:15:04] Formatter set to: "findent" [INFO - 22:15:04] Autocomplete set to: "fortls" [INFO - 22:15:04] Hover set to: "fortls" [INFO - 22:15:04] Symbols set to: "fortls" [INFO - 22:15:04] [lint] Found GNU Fortran version 13.1.0 [INFO - 22:15:04] [build.single] Compiler query command line: C:\mingw64\bin\gfortran.exe -fsyntax-only -cpp -fdiagnostics-plain-output -ffree-line-length-none -ffixed-line-length-none -Wall -J d:\AppPortable\VSCode\data\user-data\User\workspaceStorage\3e0c4ed4d920d0e63df23669c8ec7cc5\fortran-lang.linter-gfortran\include -ffree-form -o e:\temp\t.f90.o e:\temp\t.f90 [ERROR - 22:15:05] [lsp.client] Unable to verify input arguments with LS: [INFO - 22:15:09] [build.single] Compiler query command line: C:\mingw64\bin\gfortran.exe -fsyntax-only -cpp -fdiagnostics-plain-output -ffree-line-length-none -ffixed-line-length-none -Wall -J d:\AppPortable\VSCode\data\user-data\User\workspaceStorage\3e0c4ed4d920d0e63df23669c8ec7cc5\fortran-lang.linter-gfortran\include -ffree-form -o e:\temp\t.f90.o e:\temp\t.f90 [INFO - 22:15:13] [format] Formatter located in: D:\AppPortable\WPy31241\python-3.12.4.amd64\Scripts [INFO - 22:15:13] [format] Formatter located in: D:\AppPortable\WPy31241\python-3.12.4.amd64\Scripts [INFO - 22:15:14] [build.single] Compiler query command line: C:\mingw64\bin\gfortran.exe -fsyntax-only -cpp -fdiagnostics-plain-output -ffree-line-length-none -ffixed-line-length-none -Wall -J d:\AppPortable\VSCode\data\user-data\User\workspaceStorage\3e0c4ed4d920d0e63df23669c8ec7cc5\fortran-lang.linter-gfortran\include -ffree-form -o e:\temp\t.f90.o e:\temp\t.f90

i think it's due to portable python itsself, maybe there need to modify some env path , but for formatter : findent , which i also install by the same way , works well , it do format my fortran code.

appreciate any help!

ceeeeeeeeeeeeeeeeb commented 3 months ago

hi , if i install official version python 3.12.5 (didnt check add env path variable ) , then run pip install fortls from Scripts folder , and add the fortls.exe path to modern fortran extension "fortran.fortls.path": "D:\\App2\\py3125\\Scripts\\fortls.exe" , it works well (fortls initialization complete) , context menu has "go to defenition" etc.
so it can be clear that it's problem of winPython, could you help testing why that happen?