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

Crash when no Compiler is installed #837

Open
1 task done
Nuramon27 opened this issue Feb 23, 2023 · 2 comments
Open
1 task done

Crash when no Compiler is installed #837

Nuramon27 opened this issue Feb 23, 2023 · 2 comments
Labels

Comments

@Nuramon27
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Description

When trying to use the Extension without a fortran compiler installed (and only the language server), it always crashes immediately, even if I set "fortran.linter.compiler" to "Disabled" in the settings.

Steps to reproduce:
Install fortls. Install Modern Fortran Extension on a system with no fortran compiler (gfortran, ifort) installed. In the extension settings, set "fortran.linter.compiler": "Disabled". Then open a fortran source file and, if the language server does not start automatically, execute the command "Fortran: Restart the Fortran Language Server".

Error Messages
The errors shown in VSCode as popup messages are "Server initialization failed" and "Fortran Language Server client: couldn't create connection to server". The extension tries to restart a few times before it gives up with the message "The Fortran Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information."

In the "Extension Host"-Output of VSCode, I could see the error message "[error] Error: not found: Disabled" and after that a few times "[error] Error: tuple index out of range".

Screenshots

No response

Expected Behaviour

Without a compiler, I expected the extension to work with only the functionalities provided by the language server, i.e. hover, autocompletion, symbols and Go to & Peeking into definitions, but without linting.

Version of Modern Fortran

v3.2.0

Version of Visual Studio Code

v1.75.1

Platform and Architecture

Windows 10

Additional Information

No response

@Nuramon27 Nuramon27 added the bug label Feb 23, 2023
@gnikit
Copy link
Member

gnikit commented Feb 23, 2023

Can you install the pre-release version, and enable Debug log level and post the output of the OUTPUT channel (make
sure to select Modern Fortran from the drop down menu). This will help narrow things down.

Linting and fortls should be completely isolated so initialisation should not be affected.

Can you also post your Fortran VS Code settings?

@Nuramon27
Copy link
Author

Sure, my vscode settings are:

{
    "workbench.colorTheme": "Default Light+",
    "files.eol": "\n",
    "files.encoding": "iso88591",
    "terminal.integrated.tabStopWidth": 4,
    "editor.tabSize": 8,
    "C_Cpp.default.compilerPath": "",
    "fortran.linter.compiler": "Disabled",
    "fortran.fortls.directories": [
        "."
    ],
    "fortran.logging.level": "Debug"
}

The output of the OUTPUT channel ist attached as a file: output_modern_fortran.txt

I have, however, now noticed that when removing the setting "fortran.fortls.directories": ["."], everything works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants