tuple index out of range #567
-
Hi Everyone, I hope I'm in the right place, I wanted to give Fortran a try, installed gfortran and successfully compiled some code. [Error - 2:35:20 PM] Server initialization failed. Does anyone have any idea what I might be doing wrong ? I use : |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 12 replies
-
Hi @GregoireLD can you please provide the contents of the Fortran file? This looks like a bug in |
Beta Was this translation helpful? Give feedback.
-
Of course 😊
I tried the easiest test to avoid problems from libraries and such |
Beta Was this translation helpful? Give feedback.
-
If it's of any use, in the log I get a more precise indication of what's going wrong : (sorry it's a mouthful, I don't know if that's normal)
I get the feeling it could be either a bug in the way modern-fortran calls fortls, or in fortls itself |
Beta Was this translation helpful? Give feedback.
-
Here is the log :
as for VSCode, it's indeed 1.69.0 So far I just tried opening the file itself, but opening the enclosing folder raises the same error. And yes, it fails as soon as I open the file, no hovering required |
Beta Was this translation helpful? Give feedback.
-
Coming back to this, I was able to figure out why my VS Code was crashing, I was passing an incorrect (deprecated) argument in VS Code via the global settings.json file. Which puts slightly at ease because both the server (fortls) and the extension are heavily tested when it comes to how they integrate, so if something was broken it would most likely be from one of the upstream dependencies. The error message that you are seeing is effectively passing paths (source, include, exclude, etc.) to I need you to check your VS Code (global and workspace) You can quickly check if the options you are passing from VS Code to |
Beta Was this translation helpful? Give feedback.
-
I'm having the same or at least a similar issue with initialising the Fortran Language Server. This happens when I try to open any Fortran file on my Mac (2019 Intel, Ventura 13.0.1). I have re-installed fortls with Output from Modern Fortran in vscode
Do you have any suggestions to what I can to to solve the problem? |
Beta Was this translation helpful? Give feedback.
Coming back to this, I was able to figure out why my VS Code was crashing, I was passing an incorrect (deprecated) argument in VS Code via the global settings.json file. Which puts slightly at ease because both the server (fortls) and the extension are heavily tested when it comes to how they integrate, so if something was broken it would most likely be from one of the upstream dependencies.
Thankfully that does not appear to be the case.
The error message that you are seeing is effectively passing paths (source, include, exclude, etc.) to
fortls
incorrectly.fortls
has a function that resolves glob patterns and relative paths and then puts them into a set. That is what is failing here, P…