Open
Conversation
|
Azure Pipelines: 16 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Copilot
AI
changed the title
[WIP] Fix modifiers order errors on osx-arm64 build
Fix CoreLib extern modifier ordering
Aug 12, 2026
Member
|
@copilot where are the changes? |
Co-authored-by: EgorBo <523221+EgorBo@users.noreply.github.com>
Contributor
Author
Member
|
@copilot plz fix |
Member
|
@copilot plz fix |
Co-authored-by: EgorBo <523221+EgorBo@users.noreply.github.com>
Contributor
Author
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.
Suppressed comments (1)
src/tools/illink/src/ILLink.CodeFix/UnsafeModifierCodeFixHelpers.cs:274
AddModifier(SyntaxTokenList ...)still inserts the safety modifier beforeexternwheninsertAfterModifieris left as the default (SyntaxKind.None). That means other code fixes that reuse this helper without specifyinginsertAfterModifiercan still generateunsafe extern/safe externand reintroduce IDE0036-style modifier ordering problems (the same class of issue this PR is addressing for CoreLib).
Consider treating extern as a special case in the default insertion logic (insert after extern when present), while keeping the existing partial behavior for non-extern declarations.
// 'extern' and 'partial' conventionally sit closest to the return type, so the safety modifier goes
// before them. Otherwise it is appended, which matches the repo's preferred modifier order where
// 'unsafe' follows 'virtual', 'abstract', 'sealed' and 'override'.
insertionIndex = GetFirstModifierIndex(modifiers, SyntaxKind.ExternKeyword, SyntaxKind.PartialKeyword);
}
EgorBo
marked this pull request as ready for review
August 13, 2026 00:56
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
EgorBo
approved these changes
Aug 13, 2026
This was referenced Aug 13, 2026
Open
jkotas
approved these changes
Aug 13, 2026
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.
Reorders CoreLib safety modifiers from
safe extern/unsafe externtoextern safe/extern unsafe, satisfying IDE0036 and restoring macOS ARM64 builds.