Uh oh!
There was an error while loading. Please reload this page.
Apply PR #10768 review feedback: fix Java string escaping and logging - #10771
Merged
Conversation
…gging, and format string Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
CopilotAI
changed the title
[WIP] Apply feedback and approved changes to main branchApply PR #10768 review feedback: fix Java string escaping and loggingFeb 4, 2026
Remove gradle and proguard-related files from .gitignore.
jonathanpeppers
marked this pull request as ready for review
February 4, 2026 22:43
jonathanpeppers
requested review from
grendello and simonrozsival
as code ownersFebruary 4, 2026 22:43
Contributor
There was a problem hiding this comment.
Pull request overview
This PR applies review feedback from the backport PR #10768 to the main branch, addressing three improvements to the NativeAOT environment variable handling:
Changes:
- Fixed Java string escaping in
EnvironmentBuilder.csto properly escape backslashes before quotes, preventing invalid Java string literals - Added missing
$prefix for string interpolation in a test assertion message inEnvironmentHelper.cs - Enhanced error logging in
NativeAotEnvironmentVars.javato include exception details when environment variable setting fails
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/Xamarin.Android.Build.Tasks/Utilities/EnvironmentBuilder.cs | Fixes ValidAssemblerString to escape backslashes before quotes, ensuring environment variable values with backslashes generate valid Java string literals |
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/EnvironmentHelper.cs | Adds missing $ to enable string interpolation in an assert message |
src/Xamarin.Android.Build.Tasks/Resources/NativeAotEnvironmentVars.java | Adds exception parameter to Log.e() call for better debugging information |
grendello
approved these changes
Feb 5, 2026
grendello
commented
Feb 5, 2026
Contributor
The only failed test is an exceeded time in the Android resource change unit test, unrelated to this PR. |
Uh oh!
There was an error while loading. Please reload this page.
jonathanpeppers pushed a commit
that referenced
this pull request
Feb 5, 2026
…bles support code (#10771) This PR applies review feedback from the backport PR #10768 to the main branch, addressing three improvements to the NativeAOT environment variable handling: **Changes:** - Fixed Java string escaping in `EnvironmentBuilder.cs` to properly escape backslashes before quotes, preventing invalid Java string literals - Added missing `$` prefix for string interpolation in a test assertion message in `EnvironmentHelper.cs` - Enhanced error logging in `NativeAotEnvironmentVars.java` to include exception details when environment variable setting fails
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 freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Applies unresolved review feedback and approved suggestions from PR #10768 backport to the main branch.
Changes
EnvironmentBuilder.cs: FixValidAssemblerStringto escape backslashes before double quotes. Values likepath\to\filewould generate invalid Java:"path\to\file"instead of"path\\to\\file".NativeAotEnvironmentVars.java: Include exception in error log for debugging whenOs.setenvfails.EnvironmentHelper.cs: Add missing$for string interpolation in assert message..gitignore: Exclude generated gradle wrapper files insrc/andtests/directories.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.