-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Cargo linter runs correctly, but I see no errors #2525
Comments
|
The problem here is that Cargo is being run from Bash, returning Windows with backslashes, when the editor has forward slashes. What's the output of |
|
I'm guessing you can't install cargo from pacman? The issue here being Cargo knows it's on Windows and produces output for that environment, but Vim thinks it's on a UNIX compatible, and detects input for that. |
@RyanSquared I tried that too. I get a very similar result from following all these steps.
|
Right, so it's still giving out a filename with backslashes - |
@RyanSquared So you're basically saying that vim on MSYS2 shell is unusable with ALE? I'm not saying it's anyone's fault, but that seems kinda painful. |
I'm saying that Vim thinks you're in UNIX. Cargo thinks you're in Windows. I'm not sure who would be appropriate to blame given both are partially correct. I'd look into why Cargo thinks you're in a Windows environment and see if that can be changed. |
I think I'll just have to make ALE replace backslashes in filenames on Unix with forward slashes. I doubt anyone actually puts backslashes in their filenames for source files, so I don't expect it to be an issue. |
I've pushed a commit now to handle convert back slashes to forward slashes in a Unix environment, even though back slashes are actually valid characters in Unix. That should fix your issue. Let me know if you still have problems. Later on, we might want to handle paths like |
If I may, it's a bad decision. Even if very few users use backslash in the name of their files, this may happen for some reasons. With your last commit you will break all file paths in Linux containing backslash. All this on behalf of this particular issue (one user that is in Windows 10, under a "MSYS2 shell"..). It's not logic at all. |
I'm okay with breaking support for all Linux paths containing a backslash. I sincerely doubt anyone seriously commits code with backslashes in their filenames. |
Information
VIM version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Apr 29 2019 04:53:42)
Included patches: 1-1234
Operating System: Windows 10 version 1703
What went wrong
This appears to be similar to #2488, but I am unsure.
Whenever I lint a project made with
cargo new
,ALEInfo
shows that thecargo check
ran, and gave the expected output, but I see nothing in the location list, and in fact, no indication of any errors at all.Reproducing the bug
cargo new experiment
cd experiment
vim src/main.rs
:ALEInfo
and scroll to the bottom.:ALEInfo
The text was updated successfully, but these errors were encountered: