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

fortls 2.2.6 upgrade difficulties #78

Closed
JHenneberg opened this issue Mar 9, 2022 · 9 comments · Fixed by #81
Closed

fortls 2.2.6 upgrade difficulties #78

JHenneberg opened this issue Mar 9, 2022 · 9 comments · Fixed by #81
Assignees
Labels
bug Something isn't working

Comments

@JHenneberg
Copy link

JHenneberg commented Mar 9, 2022

Hi
Updating from 2.2.5 to the newest Version is causing some troubles:
image
image

Win 11
VS Code 1.65.1
Python 310

@gnikit
Copy link
Member

gnikit commented Mar 9, 2022

Hi @JHenneberg thanks for reaching out. So I was under the impression that this should work on Windows. Does installing something else like this work? e.g. python -m pip install numpy --upgrade.

As for the Modern Fortran error, it would indicate that some of the arguments passed in fortls are not supported. Would you mind posting your arguments here (both settings.json and .fortls, if any)

@gnikit
Copy link
Member

gnikit commented Mar 9, 2022

I also just realised that the installation seems to be completing successfully, which is odd. From what I can tell the command line arguments are not interpreted correctly by the windows command-line shell

@JHenneberg
Copy link
Author

In general I update my packages like this including fortls. Before I did not had any iusses. But I realised right now when I am updating pip itself I get the same error. So propbably this is a general problem and not a fortls specific one (-ortls just put me on the wrong track I guess).

Concerning the second error I just have one setting "fortran.fortls.notifyInit": true. I downgraded to 2.2.5 then the error does not appear.

@gnikit
Copy link
Member

gnikit commented Mar 9, 2022

Concerning the second error I just have one setting "fortran.fortls.notifyInit": true. I downgraded to 2.2.5 then the error does not appear.

That is strange, I had a look at the Windows tests and they seem to be correct. I was also unable to replicate on my Linux machine. The only two things that v2.2.6 did was add the autoupdate functionality and deprecate --variable_hover.

If you install again v2.2.6, you might want to try and see if the binary is working, i.e. fortls -v and fortls -h yield any output, and then on a simple fortran file do something like fortls --debug_filepath yourfile.f90 --debug_rootpath . --debug_parser

@JHenneberg
Copy link
Author

for 2.2.5:
fortls -v -> 2.2.5

for 2.2.6:
fortls -v ->

Traceback (most recent call last):
  File "C:\Users\He\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\He\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\He\AppData\Local\Programs\Python\Python310\Scripts\fortls.exe\__main__.py", line 4, in <module>
  File "C:\Users\He\AppData\Local\Programs\Python\Python310\lib\site-packages\fortls\__init__.py", line 12, in <module>
    from .langserver import LangServer
  File "C:\Users\He\AppData\Local\Programs\Python\Python310\lib\site-packages\fortls\langserver.py", line 17, in <module>
    from packaging import version
ModuleNotFoundError: No module named 'packaging'

@gnikit
Copy link
Member

gnikit commented Mar 9, 2022

Awesome, that is unfortunate, I was hoping that I wouldn't have to manually update my dependencies and find would just work, but I guess not. You can solve the issue by installing manually https://packaging.pypa.io/en/latest/index.html e.g. pip install packaging

I will fix it in the next release.

@gnikit gnikit self-assigned this Mar 9, 2022
@gnikit gnikit added the bug Something isn't working label Mar 9, 2022
@gnikit
Copy link
Member

gnikit commented Mar 9, 2022

what's really puzzling me about this one is that it is a dependency in setuptools so it should be present for all installations. Anyhow, I have gone ahead and fixed it. I will release a version soon. Need to sort out some other things for conda first

@gnikit gnikit linked a pull request Mar 9, 2022 that will close this issue
@gnikit gnikit closed this as completed in #81 Mar 9, 2022
@bilderbuchi
Copy link

bilderbuchi commented Mar 10, 2022

what's really puzzling me about this one is that it is a dependency in setuptools so it should be present for all installations.

Maybe the pip packaging machinery makes a distinction between build time and run time dependencies (similar to like conda does)?

@gnikit
Copy link
Member

gnikit commented Mar 10, 2022

I think you are right, but I also think I was wrong saying that packaging was included in setuptools. The SO post I saw must have been mistaken. That is simply not true. venvs come with pip and setuptools but not packaging

@gnikit gnikit reopened this Mar 10, 2022
@gnikit gnikit closed this as completed Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants