Skip to content

fix: suppress ILLink trim warnings and fix iOS build runner for Xcode 26 - #363

Merged
winnerspiros merged 1 commit into
masterfrom
copilot/fix-build-warnings-errors
May 28, 2026
Merged

fix: suppress ILLink trim warnings and fix iOS build runner for Xcode 26#363
winnerspiros merged 1 commit into
masterfrom
copilot/fix-build-warnings-errors

Conversation

Copilot AI commented May 28, 2026

Copy link
Copy Markdown

Last release build produced 1 error (iOS, exit code 1) and 31 IL trim-analysis warnings across Linux/macOS/Windows desktop builds.

iOS build error

net10.0-ios SDK 26.5.10284 requires Xcode 26.5; macos-latest runner ships Xcode 16.4. Changed iOS job runner to macos-26.

IL trim-analysis warnings (31 warnings)

osu.Game/osu.Game.csproj — added <NoWarn>$(NoWarn);IL2026;IL2067;IL3000</NoWarn>:

  • IL2026 (RequiresUnreferencedCode) — Newtonsoft.Json and MessagePack calls throughout ScoreInfo, ScoreImporter, LegacyScoreDecoder, Online WebSocket*, HubClientConnector, *Request types
  • IL2067 (DynamicallyAccessedMemberTypes) — Activator.CreateInstance(steps[i]) in WizardOverlay
  • IL3000 (Assembly.Location) — OsuGameBase MD5 hash of the DLL (already guarded by a catch for single-file deployments)

osu.Desktop/osu.Desktop.csproj — added <NoWarn>$(NoWarn);IL3002</NoWarn>:

  • IL3002 (RequiresAssemblyFiles) — WindowsKey.Disable() in GameplayWinKeyBlocker

GameplayWinKeyBlocker.cs — corrected existing #pragma warning disable IL3000 to IL3000, IL3002; the previous pragma was suppressing the wrong code and leaving the actual warning live.

All suppressions are consistent with the existing approach in osu.iOS.props, which already carries IL2026;IL2067 for the same reason (reflection-heavy codebase — Newtonsoft.Json, Realm, AutoMapper — that cannot be statically analysed by the ILLink Roslyn analyser).

@winnerspiros
winnerspiros marked this pull request as ready for review May 28, 2026 18:09
Copilot AI review requested due to automatic review settings May 28, 2026 18:09
@winnerspiros
winnerspiros merged commit 8abf069 into master May 28, 2026
18 of 23 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

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 addresses release/CI build noise and failures by suppressing specific ILLink trim-analysis warnings and updating the iOS release workflow runner to a newer macOS image that matches the required Xcode version.

Changes:

  • Suppress ILLink trim-analysis warning codes in osu.Game and osu.Desktop project files.
  • Correct #pragma warning suppression codes in GameplayWinKeyBlocker to include the actual IL3002 warning.
  • Update the iOS release workflow job to run on macos-26 instead of macos-latest.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
osu.Game/osu.Game.csproj Adds project-level suppression for IL2026/IL2067/IL3000 trim-analysis warnings.
osu.Desktop/Windows/GameplayWinKeyBlocker.cs Fixes pragma suppression to include IL3002 alongside IL3000.
osu.Desktop/osu.Desktop.csproj Adds project-level suppression for IL3002 trim-analysis warnings.
.github/workflows/release.yml Switches iOS build job runner from macos-latest to macos-26.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread osu.Game/osu.Game.csproj
Comment on lines +6 to +9
<!-- The codebase uses extensive reflection (Newtonsoft.Json, Realm, AutoMapper, Activator.CreateInstance)
that cannot be statically analysed by the ILLink trim analyser. Suppress trim analysis warnings
here to keep the build output clean; iOS already suppresses these in osu.iOS.props. -->
<NoWarn>$(NoWarn);IL2026;IL2067;IL3000</NoWarn>
Comment on lines +14 to +16
<!-- WindowsKey.Disable() carries [RequiresAssemblyFiles] (IL3002); we already guard the call-site
with a pragma but add the project-level suppression for completeness. -->
<NoWarn>$(NoWarn);IL3002</NoWarn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants