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

Change request failed for file #41

Closed
Edmundod opened this issue Sep 7, 2018 · 11 comments
Closed

Change request failed for file #41

Edmundod opened this issue Sep 7, 2018 · 11 comments
Labels

Comments

@Edmundod
Copy link
Contributor

Edmundod commented Sep 7, 2018

Dear Chris,

thank you for the fortls and ide-fortran.

I run into a problem with non-english letters used in a code. When I modify a line containing special characters from my native language, which I use in comments, fortls gives me the following error:

Change request failed for file "<here is path to a file>": Could not apply change

Any idea if this can be repaired?

Greetings!

@hansec
Copy link
Owner

hansec commented Sep 7, 2018

Thanks for the report. I thought I had it working for all unicode characters. Can you post an example file to this issue so I can check it out? Thanks!

@Edmundod
Copy link
Contributor Author

Edmundod commented Sep 8, 2018

Of course, here is the example, which gives me the error:

program test

  ! ąćęłóśźż 

end program test

@hansec
Copy link
Owner

hansec commented Sep 8, 2018

Hmmm, I am unable to reproduce this error using the program above. What OS and version of Python are you using? You are seeing the error in Atom, right?

One other thought I had is maybe the characters got translated to Unicode in this issue. Can you verify that if you copy/paste the program above into your editor from this issue it still produces the error?

@Edmundod
Copy link
Contributor Author

Edmundod commented Sep 8, 2018

Yes, I am using Atom 1.30.0 on Linux with Fortls v 0.8.2. pip --version gives me

pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7).

I got the error also copy-pasting test program from this discussion, here is screenshot:

fortls

How can I investigate further? Maybe some logs from fortls?

@hansec hansec added the bug label Sep 9, 2018
@hansec
Copy link
Owner

hansec commented Sep 9, 2018

Ok, I am going to add some additional functionality to log information about errors like this. Hopefully, that will help us track down the issue. In the meantime can you try disabling incremental synchronization and see if you still get the error? Note that you need to restart Atom after changing this setting in the ide-fortran extension for the change to take effect.

@hansec
Copy link
Owner

hansec commented Sep 9, 2018

I have just released a new version of the language server (0.8.3) that includes the ability to generate debugging logs. You can enable this feature using the setting debug_log in the .fortls settings file in your project root directory. See the README for more information. Can you please run the case above with this setting enabled and post the resulting log file?

@Edmundod
Copy link
Contributor Author

Great, I have some error which tracebacks to langserver.py. Here is the log: fortls_debug_with_incremental.log

Disabling incremental synchronization turned off the error.

@Edmundod
Copy link
Contributor Author

And it probably says about position 4 because now I used one letter, which is in 4th column:

! ą

@hansec hansec closed this as completed in 4f2a16d Sep 10, 2018
@hansec
Copy link
Owner

hansec commented Sep 11, 2018

Ok, I just released (0.8.4) what I believe is a fix to this bug. Check it out and let me know if the problem persists. Thanks again for the report!

@Edmundod
Copy link
Contributor Author

The problem is solved. Thank you very much for all the effort.

@liuyapeng1996
Copy link

Using vscode and Modern Fortran on windows, this error still occurs: Change request failed for file “xx\xx\xx\xx*.f90”: Could not apply change. Source: Modern Fortran (Extension).

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

3 participants