fix: suppress ILLink trim warnings and fix iOS build runner for Xcode 26 - #363
Merged
Merged
Conversation
…S runner for Xcode 26
Copilot created this pull request from a session on behalf of
winnerspiros
May 28, 2026 17:51
View session
winnerspiros
marked this pull request as ready for review
May 28, 2026 18:09
There was a problem hiding this comment.
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.Gameandosu.Desktopproject files. - Correct
#pragma warningsuppression codes inGameplayWinKeyBlockerto include the actual IL3002 warning. - Update the iOS release workflow job to run on
macos-26instead ofmacos-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 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> |
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.
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-iosSDK26.5.10284requires Xcode 26.5;macos-latestrunner ships Xcode 16.4. Changed iOS job runner tomacos-26.IL trim-analysis warnings (31 warnings)
osu.Game/osu.Game.csproj— added<NoWarn>$(NoWarn);IL2026;IL2067;IL3000</NoWarn>:RequiresUnreferencedCode) — Newtonsoft.Json and MessagePack calls throughoutScoreInfo,ScoreImporter,LegacyScoreDecoder, OnlineWebSocket*,HubClientConnector,*RequesttypesDynamicallyAccessedMemberTypes) —Activator.CreateInstance(steps[i])inWizardOverlayAssembly.Location) —OsuGameBaseMD5 hash of the DLL (already guarded by a catch for single-file deployments)osu.Desktop/osu.Desktop.csproj— added<NoWarn>$(NoWarn);IL3002</NoWarn>:RequiresAssemblyFiles) —WindowsKey.Disable()inGameplayWinKeyBlockerGameplayWinKeyBlocker.cs— corrected existing#pragma warning disable IL3000toIL3000, 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 carriesIL2026;IL2067for the same reason (reflection-heavy codebase — Newtonsoft.Json, Realm, AutoMapper — that cannot be statically analysed by the ILLink Roslyn analyser).