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

Windows 10 - The command line is too long. #2256

Open
neyas opened this issue Jan 29, 2019 · 7 comments
Open

Windows 10 - The command line is too long. #2256

neyas opened this issue Jan 29, 2019 · 7 comments
Labels

Comments

@neyas
Copy link

neyas commented Jan 29, 2019

The command line is too long.

8.1.1

VIM - Vi IMproved 8.1 (2018 May 18, compiled May 18 2018 18:36:07)
MS-Windows 32-bit GUI version with OLE support

Operating System: Windows 10

ALEFix not working

I am working on a java project with spring depenedencies and using maven as the build tool. During the project work, I have enabled ALE for linting.

Are you having trouble configuring ALE? Try asking for help on Stack Exchange or perhaps on Reddit instead. The GitHub issue tracker should be used for reporting bugs or asking for new features.

Reproducing the bug

Ale_info.log

  1. Edit the Main.java
  2. Add some dummy text like "asdf"
  3. Expectation ALE linting errors on the sidebar

:ALEInfo

Attached along.

@w0rp
Copy link
Member

w0rp commented Jan 29, 2019

Is there any way to make the command shorter that you know of?

@w0rp w0rp added the bug label Jan 29, 2019
@w0rp
Copy link
Member

w0rp commented Jan 29, 2019

One thing you can try instead is using the language server instead of javac for linting. See here: https://github.com/georgewfraser/java-language-server

@neyas
Copy link
Author

neyas commented Jan 29, 2019

Is there any way to make the command shorter that you know of?

No. The maven dependency list would spit out all the jars and this is getting added to the classpath for compilation.

@neyas
Copy link
Author

neyas commented Jan 29, 2019

One thing you can try instead is using the language server instead of javac for linting. See here: https://github.com/georgewfraser/java-language-server

Can you let me know the process of modifying the language server? I am not aware of this integration.

@w0rp
Copy link
Member

w0rp commented Jan 29, 2019

I don't know how to install it myself, but you probably just need to npm install it somewhere and maybe change the _executable setting in ALE, so ALE knows where to run it from.

@w0rp
Copy link
Member

w0rp commented Feb 7, 2019

I think I know how to fix this issue. Vim patch 8.0.0902 includes an env option for setting environment variables for command separate from the command line. If we rework how jobs and environment variables are constructed in general, we can pass the classpath via an environment variable instead, and that should make the command line short enough to run javac.

@MrPottery
Copy link

I am running into a similar problem. The available linters don't get run because the resulting command line is too long because maven includes every jar it knows about. I have used ALE for personal Javascript projects and really like it. Any help at getting it working for Java files to would be greatly appreciated.

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