fix: use @argfile for classpath and java.exe on Windows - #6
Merged
Conversation
v0.2.0 failed silently because: 1. resolveJavaExecutable() returned bare 'java' — cross-spawn wrapped in cmd.exe which has an 8K char limit, exceeded by the classpath 2. Even without cmd.exe, backslashes in Windows paths are treated as escapes by Java's argument parser Fix: write classpath to an argfile with forward slashes (same as IntelliJ's @idea_arg_file), return java.exe on Windows to avoid cmd.exe wrapping, and catch execution errors so they appear on test items instead of silently disappearing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
target/cucumber-cli-cp.txtargfile with forward slashes, pass@argfileto Java (same as IntelliJ's@idea_arg_file)java.exeon Windows to prevent cross-spawn from wrapping in cmd.exe (8K char limit)Why v0.2.0 failed
The compile step ran but the Java CLI step never appeared in output. Root cause:
resolveJavaExecutable()returned barejava(no.exe), causing cross-spawn to wrap incmd.exewhich has an 8,191-char limit — exceeded by the ~20K classpath.Test plan
@argfile