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

Make argfile work (more) like javac #12732

Closed
som-snytt opened this issue Feb 18, 2023 · 3 comments · Fixed by scala/scala#10319
Closed

Make argfile work (more) like javac #12732

som-snytt opened this issue Feb 18, 2023 · 3 comments · Fixed by scala/scala#10319
Assignees
Milestone

Comments

@som-snytt
Copy link

som-snytt commented Feb 18, 2023

Reproduction steps

Scala version: 2.13.10

scalac @file expects an arg per line instead of parsing argfile lines. This breaks existing argfiles.

Instead, respect javac conventions (which appear to be similar to previous behavior):

An argument file can include command-line options and source file names in any combination. The arguments within a file can be separated by spaces or new line characters. If a file name contains embedded spaces, then put the whole file name in double quotation marks.

javac tolerates the following variant quotations:

-d "target dir"
-d "target di"r
-d "targ"et
-d "target
-d 'target dir'

The following creates the output dir target dir", and demonstrates that javac does not model fine behavior.

-d 'target dir"

Problem

Maintain compatibility with once and future versions, including WWJD.

Per the doc for javac, quotation is intended to support spaces in file paths, as opposed to shell-style command lines.

Noticed at scala/scala#10316

@som-snytt
Copy link
Author

Make sure -Vprint-args does the compatible thing.

@lrytz
Copy link
Member

lrytz commented Mar 28, 2023

previous behavior

Which previous behavior are you referring to?

@lrytz
Copy link
Member

lrytz commented Mar 28, 2023

... found it; 2.13.9, according to scala/scala#10316.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants