fix arg processing in argument files in Scala 2.13.10 #10316
Closed
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.
Scala 2.13.10 does not handle argument file contents correctly.
NB. Scala 2.13.8, Scala 2.13.9 and Scala 3.x.x work fine.
This PR solves two issues with argument files (tested on MS Windows Pro) :
Change locality of this PR is very high.
Workaround (temporary, 2.13.10 only)
We specify command line options (eg. "
-deprecation -d <target_dir> ...
") directly on the command prompt (and not in an argument file) when working with 2.13.10.Session examples
Here are some results for the tiny mixed Java/Scala project
hello-scala
:NB. Project
hello-scala
is available from Github repositorymichelou/dotty-examples
.Scala 2.13.8, Scala 2.13.9 and Scala 3.x.x work fine.
NB. They behave the same as the Java SDK (i.e.
javac
,java
,kotlinc
, etc.).Scala 2.13.10 fails with the following error message :
NB. When working with a local build based on this PR we get the expected output :
In the above use cases we actually specify 2 argument files,
*_opts.txt
files contain command line options (on the same line) and*_sources.txt
contain Scala source files (one file path on each line) :For completeness we show here the contents of the 4 argument files :
NB. The careful reader will notice that we deliberately use both single quotes (
-classpath
) and double quotes (-d
).