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

simplify response file parsing #1665

Closed
jonsequitur opened this issue Mar 6, 2022 · 3 comments
Closed

simplify response file parsing #1665

jonsequitur opened this issue Mar 6, 2022 · 3 comments
Assignees
Milestone

Comments

@jonsequitur
Copy link
Contributor

Response file parsing can currently be customized by a developer using System.CommandLine using the CommandLineBuilder.ParseRespondFilesAs(ResponseFileHandling) method. The ResponseFileHandling enum provides two modes (in addition to Disabled) but the behavior is not apparent to end users, and is occasionally surprising.

The proposal is to support only a single response file parsing behavior by removing the existing methods and supporting only enable/disable. The new behavior would follow these rules:

  • Multiple-line files will be parsed treating newlines as equivalent to spaces.
  • Multiple tokens on a single line will be parsed as though passed verbatim on the command line.
    • Including a space within a token will now require enclosing the token in quotes, e.g. "this is one token".
    • Shell-specific escaping of quotes will not be required.
  • Allow comment lines using a # prefix at the beginning of the line

Open questions:

  • How should quotation marks be escaped?
@jonsequitur jonsequitur added this to the 2.0 GA milestone Mar 6, 2022
@KathleenDollard
Copy link
Contributor

What's the prior art. Multiple double quotes in C# and & in HTML?

@marek-safar
Copy link

This is a breaking change that breaks .net6 servicing builds. Was it really intentional when there is no version bump?

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

No branches or pull requests

3 participants