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

Test a project with a Space in the project Name #10006

Merged
merged 2 commits into from
Apr 8, 2025

Conversation

dellis1972
Copy link
Contributor

@dellis1972 dellis1972 commented Apr 4, 2025

Fixes https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1852953

There was a problem with the generator arguments not allowing for assembly names with spaces in them.
So lets fix that by adding quotes to make sure the assembly name is parsed correctly. Also add a unit test to make sure we don't regress in the future.

@dellis1972 dellis1972 force-pushed the dev/dellis1972/WI1852953 branch from 115a545 to cb6249a Compare April 4, 2025 08:37
@dellis1972 dellis1972 force-pushed the dev/dellis1972/WI1852953 branch from cb6249a to 89ec6fd Compare April 4, 2025 10:11
@dellis1972 dellis1972 marked this pull request as ready for review April 8, 2025 08:27
@dellis1972 dellis1972 requested a review from grendello April 8, 2025 08:27
@@ -181,7 +181,7 @@ protected override string GenerateCommandLineCommands ()
if (!string.IsNullOrEmpty (EnumMetadataDirectory))
WriteLine (sw, $"--enummetadata=\"{EnumMetadataDirectory}\"");
if (!string.IsNullOrEmpty (AssemblyName))
WriteLine (sw, $"--assembly={AssemblyName}");
WriteLine (sw, $"--assembly=\"{AssemblyName}\"");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could use MonoAndroidHelper.QuoteFileNameArgument, so that we have quoting code in a single place

Copy link
Contributor Author

@dellis1972 dellis1972 Apr 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its a good idea. However, this file is full off "\"" entries, so I feel we would need to change all of them.
Also QuoteFileNameArgument creates a new CommandLineBuilder every time its called, it feels like just hard coding the quotes at this point would be more efficient? 🤷

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's definitely more efficient, no doubt, but the command line builder might be doing more than just quoting (I assume) :)

@jonpryor jonpryor merged commit 776edad into main Apr 8, 2025
57 of 59 checks passed
@jonpryor jonpryor deleted the dev/dellis1972/WI1852953 branch April 8, 2025 18:12
Sign up for free to 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.

3 participants