hansec / vscode-fortran-ls

Fortran IntelliSense for Visual Studio Code
MIT License
37 stars 7 forks source link

File URI Failure on Windows #1

Closed xrq-phys closed 6 years ago

xrq-phys commented 6 years ago

Hello.

When I tried to use the plugin on Windows, I got this error:

Change request failed for unknown file "c%3A/Users/Rubidium/Desktop/Scratch.f90"

Mmmmm... Seems another Windows-specific uri issue :S .

hansec commented 6 years ago

Thanks for the report. I will look into this. Can you see if setting the incrementalSync setting to false fixes this issue?

xrq-phys commented 6 years ago

Yes, it does.

Haven't noticed this option. Thanks a lot.

hansec commented 6 years ago

Yes, in the last update I switched over to defaulting to incremental syncing. I think this is actually an issue with that process on your particular file. The debug messages have a typo so it is reporting "unknown file" even when the file is known.

If you are willing to help out I would like to try and debug the problem. Can you send me the file you are having issues with? Also, with incremental sync enabled do you get this error when making any change to the file or only sometimes? Do you get the same error with other files? Thanks for any information you can provide.

xrq-phys commented 6 years ago

To make sure I understood... By saying 'a typo' you mean the %3A is not translated to :, right?

The input file is a simple test script:

PROGRAM Scratch
    CALL Sub1(1)
CONTAINS
    SUBROUTINE Sub1(A)
        INTEGER, INTENT(IN) :: A
        WRITE(*, *) A
    END SUBROUTINE Sub1
END PROGRAM Scratch
hansec commented 6 years ago

I just meant the error Change request failed for unknown file may be the result of a typo so that the word "unknown" could be incorrect.

However, I think you are right this is a path issue, which I believe I have tracked down. See issue #20 of the upstream repo.

hansec commented 6 years ago

I have released a version to the language server (0.6.1) with a fix to this bug. Give it a try with incremental sync enabled when you have a chance and let me know if you still run into the issue. Thanks again for the report!

xrq-phys commented 6 years ago

Version 0.6.1 installed and it now works perfectly. Thanks for the fix!