Fix MAUI Android inner loop MSBuild arg splitting on Helix - #5285
Open
LoopedBard3 wants to merge 1 commit into
Open
Fix MAUI Android inner loop MSBuild arg splitting on Helix#5285LoopedBard3 wants to merge 1 commit into
LoopedBard3 wants to merge 1 commit into
Conversation
The coreclr _MSBuildArgs value joined /p:PublishReadyToRun and /p:PublishReadyToRunComposite with ';'. Since _MSBuildArgs is passed to Helix as a single quoted argument and Helix treats ';' as a command separator when generating the run script, the semicolons split the quoted argument across separate command lines. This caused setup_helix.py to receive only the first arg and the remaining /p: args to run as standalone commands (failing with 'The filename, directory name, or volume label syntax is incorrect'). Use spaces instead, matching every other append in the PropertyGroup. The Python side already splits on [;\s]+, so args still parse correctly. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0cabccd5-6263-4ed9-abe7-a8da6c6979a3
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request fixes MAUI Android inner-loop Helix runs where MSBuild /p: arguments were being split into separate shell commands, causing later arguments to be dropped or executed incorrectly.
Changes:
- Update the CoreCLR
_MSBuildArgsappend logic to use spaces instead of semicolons when adding ReadyToRun-related/p:arguments. - Expand the inline comment to document why
;is unsafe for_MSBuildArgswhen passed through Helix as a single quoted argument.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
An inner loop MAUI Android device run showed MSBuild
/p:arguments being executed as standalone shell commands:setup_helix.py's restore also silently received only the first arg (/p:UseMonoRuntime=false), dropping the R2R args.Root cause
In
eng/performance/maui_scenarios_android_innerloop.proj, the coreclr branch built_MSBuildArgsjoining args with;:_MSBuildArgsis passed to Helix as a single quoted argument (--msbuild-args "$(_MSBuildArgs)"andsetup_helix.py ... "$(_MSBuildArgs)"). Helix treats;as a command separator when generating the run script — the same behavior theset X=Y;set A=Benv-var blocks rely on. So the semicolons split the quoted argument across separate command lines: the first piece kept the opening quote, and the remaining/p:pieces ran as their own commands.Mono builds were unaffected because that path never introduced a
;.Fix
Use spaces instead of
;, consistent with every other append in that PropertyGroup. The Python side (re.split(r'[;\s]+', ...)in bothrunner.pyandsetup_helix.py) already splits on whitespace, so args still parse correctly into thesubprocess.runargument list — and now every arg actually reaches Python and MSBuild.