Skip to content

Modify call to javac to put options in temp file instead of on command line to prevent problems with command line being too long#4990

Open
MrPottery wants to merge 1 commit into
dense-analysis:masterfrom
MrPottery:javac-command-too-long
Open

Modify call to javac to put options in temp file instead of on command line to prevent problems with command line being too long#4990
MrPottery wants to merge 1 commit into
dense-analysis:masterfrom
MrPottery:javac-command-too-long

Conversation

@MrPottery

Copy link
Copy Markdown

This branch was created to address the problem of getting 'Command too long' errors from javac becase the classpath is too long.
The change instead writes the javac options to a file in the temporary directory that ALE creates and builds the javac command to use the @<options_file> method of specifying the options.

These changes allowed me to use ALE with my Java projects where previously it failed due to the javac command line being longer than the ~8K allowed by Windows.

…d line to prevent 'Command too long' errors when classpath is too long
@w0rp

w0rp commented Jun 13, 2025

Copy link
Copy Markdown
Member

If this is a way forward, and I'll need to think about this idea, we should use the functions in ALE for managing temporary files. Have a look at the documentation for them. I'd link to them, but I'm currently on a train. 😃

@w0rp w0rp requested a review from Copilot June 13, 2025 18:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modifies the way javac options are passed to avoid "Command too long" errors by writing options to a temporary file and referencing it via the @file syntax.

  • The temporary file now contains the necessary javac options.
  • Adjusted path strings for Windows compatibility are applied to classpath and source path options.

Comment thread ale_linters/java/javac.vim
@w0rp

w0rp commented May 12, 2026

Copy link
Copy Markdown
Member

I'll paste this in every open PR: We finally managed to migrate CI checks for Windows from AppVeyor to GitHub Actions, and we've updated the minimum supported Vim version to 8.2. (Thought Vim 8.0 might happen to work for some.) In order to get checks to run again for a PR you'll need to rebase or merge.

@w0rp w0rp self-requested a review May 14, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants