Skip to content

Trim quotes from files passed on command line. - #1409

Merged
KevinRansom merged 3 commits into
dotnet:masterfrom
KevinRansom:removequotes
Aug 7, 2016
Merged

Trim quotes from files passed on command line.#1409
KevinRansom merged 3 commits into
dotnet:masterfrom
KevinRansom:removequotes

Conversation

@KevinRansom

Copy link
Copy Markdown
Contributor

Recently I have been using response files, I noticed that when msbuild generates command lines it puts quotes around filenames. So converting msbuild generated command lines required removing the quotes from the references in the response file.

The compiler errors looked similar to this:

warning FS0213: '"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Facades\System.Xml.XDocument.dll"' is not a valid assembly name
warning FS0213: '"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Facades\System.Xml.XmlSerializer.dll"' is not a valid assembly name
error FS2022: Problem with filename '"C:\Users\kevinr.REDMOND\AppData\Local\Temp\.NETFramework,Version=v4.5.AssemblyAttributes.fs"': Illegal characters in path.

This PR trims quotes and leading whitespace from input filenames.

Check it out

Kevin

@smoothdeveloper

Copy link
Copy Markdown
Contributor

@KevinRansom#838 (comment) I tried some time back to introduce response files in msbuild task but didn't really succeed, has this been done in master?

I'd like to test if that solves the issue.

Thanks!

@KevinRansom

Copy link
Copy Markdown
ContributorAuthor

No, this is for me in development. Often when investigating a single build issue, just having the entire input to the failing command is simplest.

I did read the thread this morning about inducing the fsharp build task to use a response file because of the size of the command. I wasn't aware that there was a limit on the command size, especially since some of our command lines are monstrously huge.

I wouldn't have thought it was especially tricky to make the fsharp buildtask do the right thing. I could look at it if you would like.

Kevin

@smoothdeveloper

Copy link
Copy Markdown
Contributor

@KevinRansom so far I tried this minor change but remember I had trouble getting the compiler to compile after making the change:

af0e5b2

I'd appreciate for sure if you could have a look and I'll be happy to look at #838 again to check if that issue is solved with usage of response file.

@KevinRansom
KevinRansom merged commit 350ad18 into dotnet:masterAug 7, 2016
@dsyme

dsyme commented Aug 8, 2016

Copy link
Copy Markdown
Contributor

Re trimQuotes: Add some test cases? Also, filenames come in via service.fsi entry points (FSharp.Compiler.Service) and fsi.fs (F# Interactive). It may be odd to only trim quotes here.

@KevinRansom
KevinRansom deleted the removequotes branch September 16, 2016 15:54
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@KevinRansom@smoothdeveloper@dsyme@msftclas