microsoft / qsharp-compiler

Q# compiler, command line tool, and Q# language server
https://docs.microsoft.com/quantum
MIT License
682 stars 171 forks source link

Assembly property values set from within response files cannot end with quote marks #679

Open cgranade opened 4 years ago

cgranade commented 4 years ago

Describe the bug

When using the --assembly-properties command line argument to qsc.dll from within a response file, assembly property values cannot end with a double-quote character ("").

To Reproduce

Steps to reproduce the behavior:

  1. In a qsc.rsp file, add an argument to the --assembly-properties option that ends with a double-quote character. E.g.:

    --assembly-properties ProcessorArchitecture:Unspecified QsharpOutputType:QsharpLibrary ExecutionTarget:Any DocsPackageId:Microsoft.Quantum.Standard DocsOutputPath:"C:\Users\cgran\source\repos\microsoft\quantumlibraries\Standard\src\docs"
  2. Invoke qsc.dll with the given response file.

Expected behavior

The DocsOutputPath assembly property to be set to "C:\Users\cgran\source\repos\microsoft\quantumlibraries\Standard\src\docs". Due to https://github.com/microsoft/qsharp-compiler/blob/feature/docgen/src/QsCompiler/CommandLineTool/Commands/Build.cs#L136, the closing " is stripped by the call to Trim.

System information

cgranade commented 4 years ago

As a side note, it also appears that assembly properties cannot contain a colon due to the call to Split(":") in Options.cs at L93.