Fix misplaced #nullable enable in Maps PublicAPI.Unshipped.txt files#34320
Merged
jfversluis merged 1 commit intonet11.0from Mar 4, 2026
Merged
Fix misplaced #nullable enable in Maps PublicAPI.Unshipped.txt files#34320jfversluis merged 1 commit intonet11.0from
jfversluis merged 1 commit intonet11.0from
Conversation
The BOM-prefixed #nullable enable line was sorted to the bottom of 14 Maps PublicAPI.Unshipped.txt files instead of remaining at line 1, causing RS0017 analyzer errors. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34320Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34320" |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes RS0017 PublicApiAnalyzer errors in .NET MAUI Maps by ensuring the #nullable enable directive (with BOM) is the first line in affected PublicAPI.Unshipped.txt files, so it’s parsed as a directive rather than a declared API symbol.
Changes:
- Moved the BOM-prefixed
#nullable enableline to line 1 in MapsPublicAPI.Unshipped.txtfiles across multiple TFMs. - Removed the misplaced trailing
#nullable enableentries (and the non-BOM variant where applicable).
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Core/maps/src/PublicAPI/netstandard/PublicAPI.Unshipped.txt | Moves #nullable enable (with BOM) to the first line; removes trailing misplaced directive. |
| src/Core/maps/src/PublicAPI/net/PublicAPI.Unshipped.txt | Moves #nullable enable (with BOM) to the first line; removes trailing misplaced directive. |
| src/Core/maps/src/PublicAPI/net-windows/PublicAPI.Unshipped.txt | Ensures first-line BOM #nullable enable; removes the non-BOM directive line. |
| src/Core/maps/src/PublicAPI/net-tizen/PublicAPI.Unshipped.txt | Ensures first-line BOM #nullable enable; removes the non-BOM directive line. |
| src/Core/maps/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt | Ensures first-line BOM #nullable enable; removes the non-BOM directive line. |
| src/Core/maps/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt | Moves #nullable enable (with BOM) to the first line; removes trailing misplaced directive. |
| src/Core/maps/src/PublicAPI/net-android/PublicAPI.Unshipped.txt | Moves #nullable enable (with BOM) to the first line; removes trailing misplaced directive. |
| src/Controls/Maps/src/PublicAPI/netstandard/PublicAPI.Unshipped.txt | Moves #nullable enable (with BOM) to the first line; removes trailing misplaced directive. |
| src/Controls/Maps/src/PublicAPI/net/PublicAPI.Unshipped.txt | Moves #nullable enable (with BOM) to the first line; removes trailing misplaced directive. |
| src/Controls/Maps/src/PublicAPI/net-windows/PublicAPI.Unshipped.txt | Ensures first-line BOM #nullable enable; removes the non-BOM directive line. |
| src/Controls/Maps/src/PublicAPI/net-tizen/PublicAPI.Unshipped.txt | Ensures first-line BOM #nullable enable; removes the non-BOM directive line. |
| src/Controls/Maps/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt | Ensures first-line BOM #nullable enable; removes the non-BOM directive line. |
| src/Controls/Maps/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt | Ensures first-line BOM #nullable enable; removes the non-BOM directive line. |
| src/Controls/Maps/src/PublicAPI/net-android/PublicAPI.Unshipped.txt | Ensures first-line BOM #nullable enable; removes the non-BOM directive line. |
jfversluis
approved these changes
Mar 4, 2026
Contributor
Author
|
/azp run maui-pr-devicetests, maui-pr-uitests |
|
Azure Pipelines successfully started running 2 pipeline(s). |
rmarinho
approved these changes
Mar 4, 2026
kubaflo
approved these changes
Mar 4, 2026
jfversluis
added a commit
that referenced
this pull request
Mar 4, 2026
The prior agent session used LC_ALL=C sort to resolve merge conflicts in PublicAPI.Unshipped.txt files, which pushed the BOM-prefixed #nullable enable line to the bottom. This caused RS0017 analyzer errors fixed by PR #34320. Add explicit guidance to prevent this: explain why plain sort breaks these files and provide a safe conflict resolution script. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jfversluis
added a commit
that referenced
this pull request
Mar 4, 2026
The prior agent session used LC_ALL=C sort to resolve merge conflicts in PublicAPI.Unshipped.txt files, which pushed the BOM-prefixed #nullable enable line to the bottom. This caused RS0017 analyzer errors fixed by PR #34320. Add explicit guidance to prevent this: explain why plain sort breaks these files and provide a safe conflict resolution script. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
|
Test failures unrelated |
This was referenced Mar 4, 2026
Open
jfversluis
added a commit
that referenced
this pull request
Mar 5, 2026
…34327) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ## Description PR #34320 fixed RS0017 analyzer errors caused by `#nullable enable` being sorted to the bottom of 14 Maps `PublicAPI.Unshipped.txt` files. The root cause was a prior Copilot agent session that used `LC_ALL=C sort -u` to resolve merge conflicts — the BOM bytes (`0xEF 0xBB 0xBF`) sort after all ASCII characters, pushing the directive below the API entries. This updates the Copilot instructions to prevent this from recurring: - Explains that `#nullable enable` must remain on line 1 - Warns against using plain `sort` on these files (BOM sort ordering) - Provides a safe conflict resolution script that preserves the header before sorting API entries Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description
The BOM-prefixed
#nullable enableline in 14 MapsPublicAPI.Unshipped.txtfiles was at the bottom of the file instead of line 1, causing RS0017 analyzer errors:This was likely caused by a prior sort operation that treated the BOM byte as a regular character, sorting the line after all API entries.
Changes
Moved
#nullable enableback to line 1 (with BOM) in all 14 affected files:src/Core/maps/src/PublicAPI/src/Controls/Maps/src/PublicAPI/