Skip to content

Conversation

@kotlarmilos
Copy link
Member

@kotlarmilos kotlarmilos commented Jan 8, 2026

Description

This PR fixes modifiers order encountered when building mono runtime.

src/libraries/System.Private.CoreLib/src/System/SpanHelpers.ByteMemOps.cs(259,9): error IDE0036: Modifiers are not ordered (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0036) [/Users/miloskotlar/dotnet/runtime-ios/src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj]
src/libraries/System.Private.CoreLib/src/System/SpanHelpers.ByteMemOps.cs(482,9): error IDE0036: Modifiers are not ordered (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0036) [/Users/miloskotlar/dotnet/runtime-ios/src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj]

Introduced in #122791

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-memory
See info in area-owners.md if you want to be subscribed.

@kotlarmilos kotlarmilos added this to the 11.0.0 milestone Jan 8, 2026
@kotlarmilos kotlarmilos enabled auto-merge (squash) January 8, 2026 14:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes modifier ordering issues in two method declarations that were causing build errors when building the Mono runtime. The changes ensure compliance with the C# modifier ordering rules specified in .editorconfig.

  • Reorders modifiers from private static unsafe extern to private static extern unsafe for two internal methods
  • Resolves IDE0036 compiler errors that were blocking Mono builds

@jkotas
Copy link
Member

jkotas commented Jan 14, 2026

I am wondering why this was not caught by CI. Do you happen to know? It is not the first time something like this happened, but I was not able to figure out how it sneaked through.

@kotlarmilos
Copy link
Member Author

kotlarmilos commented Jan 14, 2026

I was building runtime packs using the following command:

./build.sh --restore --build --pack --configuration Release /p:TargetRid=ios-arm64 --arch arm64 --os ios /p:DotNetBuildAllRuntimePacks=true

I see that the ios packs were built on the PR. I will check if there is any difference when DotNetBuildAllRuntimePacks is passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants