Skip to content

[java-source-utils] Add response file support #744

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

Merged

Conversation

jonpryor
Copy link
Contributor

Add support for "response files" to java-source-utils.jar,
allowing java-source-utils.jar options to be present within a plain-
text file, and the file provided as an option:

$ cat >response-file <<EOF
--help
EOF
$ java -jar java-source-utils.jar @response-file
# equivalent to: java -jar java-source-utils.jar --help

In this case, the "scare quotes" is because of limitations when
parsing the response file: only one value per line. Blank lines are
ignored, as are lines starting with #.

Thus, a response file with contents:

--source
/path/to/source/directory

is fine, while a response file with the contents:

--source /path/to/source/directory

will not be parsed properly.

Add support for ["response files"][0] to `java-source-utils.jar`,
allowing `java-source-utils.jar` options to be present within a plain-
text file, and the file provided as an option:

	$ cat >response-file <<EOF
	--help
	EOF
	$ java -jar java-source-utils.jar @response-file
	# equivalent to: java -jar java-source-utils.jar --help

In this case, the "scare quotes" is because of limitations when
parsing the response file: only one value per line.  Blank lines are
ignored, as are lines starting with `#`.

Thus, a response file with contents:

	--source
	/path/to/source/directory

is fine, while a response file with the contents:

	--source /path/to/source/directory

will not be parsed properly.

[0]: https://docs.microsoft.com/en-us/windows/win32/midl/response-files
@jonpryor jonpryor merged commit b588ef5 into dotnet:master Oct 30, 2020
@jpobst jpobst added this to the 11.1 (16.9 / 8.9) milestone Nov 5, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants