fix: resolve three CI build/quality errors - #361
Merged
Conversation
…lculations (ppy#37921) - Part of ppy#37818 Access to difficulty info is required for the upcoming multiplier proposals. All places providing difficulty info intentionally use `IBeatmapInfo` as the difficulty info exposed to the calculator should _always_ be pre-mods for our usecase. There's a couple of quirks: - The usage in `ScoreProcessor` is a bit troubling to me but I can't see a way to make it better without refactoring it. Essentially, we don't have a beatmap until `ApplyBeatmap` is called, but most usages of `ScoreProcessor` are setting `Mods` prior to `ApplyBeatmap` so there is a `null` check in the logic for when mods change. Additionally, this means a new bindable of the beatmap via `ApplyBeatmap` which also feels a bit dirty. Open to suggestions. - ~~`BeatmapLeaderboardScore.Tooltip` is using a null-forgiving on the `BeatmapInfo`, but there's basically no context available on if this is an issue - the only code path which sets the score is `SetContent` which has no callers, so it's essentially dead code. Makes sense given it's Select V1.~~ --------- Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
…-commit-fix-build-errors
- Merge ppy/osu commit 45234b5 (add beatmap difficulty before mods as context for score multiplier calculations) - Fix iOS build error: remove ServerGarbageCollection/ConcurrentGarbageCollection from iOS dotnet publish step (not supported by .NET for iOS) - Add [DynamicallyAccessedMembers] annotations to SettingSourceAttribute: declaringType param, SettingControlType property - Add [RequiresUnreferencedCode] to SettingSourceAttribute extension methods: CreateSettingsControls, GetSettingsSourceProperties, GetOrderedSettingsSourceProperties, GetUnderlyingSettingValue - Add [RequiresUnreferencedCode] to BindableValueAccessor.GetValue/SetValue - Add [RequiresUnreferencedCode] to SnakeCaseKeyContractResolver class - Fix Assembly.Location → AppContext.BaseDirectory in Icons.cs, MacOSAppLocationChecker.cs, WindowsAssociationManager.cs - Add [RequiresUnreferencedCode] to LegacyTcpIpcProvider class - Add [RequiresUnreferencedCode] to DiscordRichPresence class - Add [RequiresAssemblyFiles] to WindowsKey.Disable() - Add #pragma warning disable IL2026 around AsQueryable() in DatabasedKeyBindingContainer.LoadComplete() - Add [RequiresUnreferencedCode] to BackgroundDataStoreProcessor processScoresWithMissingStatistics() and LoadComplete()
…p setter The fork uses C# 13 `field` keyword so there's no explicit `score` backing field in scope. The upstream-merged line incorrectly referenced `score`; `value` (the setter parameter) is the correct variable here.
Copilot created this pull request from a session on behalf of
winnerspiros
May 28, 2026 15:47
View session
…r, DatabasedKeyBindingContainer
Copilot
AI
changed the title
Merge ppy upstream + fix iOS build failure + suppress trimming/AOT warnings
fix: resolve three CI build/quality errors
May 28, 2026
winnerspiros
approved these changes
May 28, 2026
There was a problem hiding this comment.
Pull request overview
This PR addresses scoring multiplier construction and trim/single-file publish related warnings, but it is broader than the stated three CI fixes. It updates score multiplier context creation across runtime, tests, and benchmarks, adds trim annotations/suppressions, adjusts desktop app path lookup, and changes the iOS release publish flags.
Changes:
- Redesigns
ScoreMultiplierContextto require beatmap difficulty and updates affected score multiplier call sites. - Adds trim/AOT annotations or suppressions around reflection/Newtonsoft usage.
- Replaces some assembly-location path lookups with
AppContext.BaseDirectoryand removes iOS GC publish properties.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
osu.Game/Rulesets/Scoring/ScoreMultiplierCalculator.cs |
Makes beatmap difficulty required in score multiplier context. |
osu.Game/Rulesets/Scoring/ScoreProcessor.cs |
Tracks current beatmap and recalculates multiplier from beatmap difficulty. |
osu.Game/Screens/Select/FooterButtonMods.cs |
Uses current beatmap difficulty when displaying mod multiplier. |
osu.Game/Screens/Select/BeatmapLeaderboardScore.Tooltip.cs |
Uses score beatmap difficulty for tooltip multiplier. |
osu.Game/Overlays/Mods/ModSelectFooterContent.cs |
Uses working beatmap difficulty for mod footer multiplier. |
osu.Game/Scoring/Legacy/LegacyScoreDecoder.cs |
Supplies score beatmap difficulty during legacy score multiplier calculation. |
osu.Game/Database/StandardisedScoreMigrationTools.cs |
Supplies beatmap difficulty during score migration multiplier calculation. |
osu.Game/Database/BackgroundDataStoreProcessor.cs |
Adds trim-related annotations around score statistic processing. |
osu.Game/Configuration/SettingSourceAttribute.cs |
Adds trim annotations for reflection-based settings helpers. |
osu.Game/Utils/BindableValueAccessor.cs |
Marks reflection-based bindable accessors as trim-unsafe. |
osu.Game/IO/Serialization/SnakeCaseKeyContractResolver.cs |
Marks Newtonsoft contract resolver as trim-unsafe. |
osu.Game/Input/Bindings/DatabasedKeyBindingContainer.cs |
Suppresses IL2026 around realm query mapping reload. |
osu.Desktop/DiscordRichPresence.cs |
Marks rich presence component as trim-unsafe due to Newtonsoft usage. |
osu.Desktop/LegacyIpc/LegacyTcpIpcProvider.cs |
Marks legacy IPC provider as trim-unsafe due to Newtonsoft usage. |
osu.Desktop/Windows/WindowsKey.cs |
Marks Windows key hook disable path as requiring assembly files. |
osu.Desktop/Windows/WindowsAssociationManager.cs |
Builds executable path from app base directory and friendly name. |
osu.Desktop/Windows/Icons.cs |
Uses app base directory for icon lookup. |
osu.Desktop/MacOS/MacOSAppLocationChecker.cs |
Uses app base directory for macOS install-location checks. |
.github/workflows/release.yml |
Removes server/concurrent GC properties from iOS publish. |
| Test and benchmark files | Update score multiplier tests/benchmarks to pass beatmap difficulty context. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+81
to
82
| [RequiresUnreferencedCode("Calls processScoresWithMissingStatistics which uses Newtonsoft.Json reflection.")] | ||
| protected override void LoadComplete() |
| /// In usages where the current valid score multipliers are required, pass <see langword="null"/> or omit this parameter entirely. | ||
| /// </param> | ||
| public ScoreMultiplierContext(ScoreInfo? score) | ||
| public ScoreMultiplierContext(IBeatmapDifficultyInfo beatmapDifficultyWithoutMods, ScoreInfo? score = null) |
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.
CI was failing across all jobs due to a compile error in
ScoreProcessor, plus two code quality violations caught by the Code Quality job.Changes
ScoreProcessor.cs—Mods.ValueChangedhandler callednew ScoreMultiplierContext()with no arguments, but the constructor requiresIBeatmapDifficultyInfo beatmapDifficultyWithoutMods. Replaced the inline calculator construction with a call to the already-existingupdateScoreMultiplier(), which null-guardsBeatmap.Valueand passes the correct difficulty:BackgroundDataStoreProcessor.cs—LoadCompletehad{on the same line as), violating IDE0055 (fix formatting).DatabasedKeyBindingContainer.cs—using System.Diagnostics.CodeAnalysis;was unused (IDE0005). Removed.