ClangSharp icon indicating copy to clipboard operation
ClangSharp copied to clipboard

Latest 18.1.0 release breaks type remapping for args with spaces in them

Open kkukshtel opened this issue 1 year ago • 2 comments

As the title says:

Having this line in the rsp:

--remap
__arglist=@params string[] args

Used to work in previous versions by now throws:

Error: Invalid key/value pair argument: string[]. Expected 'name=value'
Error: Invalid key/value pair argument: args. Expected 'name=value'

I was trying to track down the issue and it seems like it's something to do with how the arguments are directly parsed, not the actual logic for extracting them in ParseKeyValuePairs. It seems like maybe context.ParseResult.GetValueForOption maybe splits on spaces so it's resolving multiple arguments instead of a single one?

kkukshtel avatar May 24 '24 15:05 kkukshtel

What was the previous version you were on?

There was likely some break or change in System.CommandLine that was missed and we'll need to add a workaround.

tannergooding avatar May 24 '24 16:05 tannergooding

I was on 17.0.4. And yeah I agree - I think it has to do with option parsing in System.CommandLine.

kkukshtel avatar May 24 '24 17:05 kkukshtel