diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f4230f6efebf..f42168acde4d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -581,7 +581,7 @@ jobs: dotnet-version: "10.0.x" - name: Install .NET iOS workload - run: dotnet workload install ios + run: dotnet workload install ios --skip-manifest-update - name: Authenticate to GitHub Packages run: dotnet nuget update source winnerspiros-github --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text diff --git a/osu.Game.Tournament/Models/StableInfo.cs b/osu.Game.Tournament/Models/StableInfo.cs index 7ee0b4a361af..d9a08ee282e7 100644 --- a/osu.Game.Tournament/Models/StableInfo.cs +++ b/osu.Game.Tournament/Models/StableInfo.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using System; +using System.Diagnostics.CodeAnalysis; using System.IO; using Newtonsoft.Json; using osu.Framework.Platform; @@ -29,6 +30,7 @@ public class StableInfo private readonly Storage configStorage; + [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Tournament uses Newtonsoft.Json which is not subject to IL trimming in this context.")] public StableInfo(TournamentStorage storage) { configStorage = storage.AllTournaments; @@ -43,6 +45,7 @@ public StableInfo(TournamentStorage storage) } } + [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Tournament uses Newtonsoft.Json which is not subject to IL trimming in this context.")] public void SaveChanges() { using (var stream = configStorage.CreateFileSafely(config_path)) diff --git a/osu.Game.Tournament/TournamentGameBase.cs b/osu.Game.Tournament/TournamentGameBase.cs index 63a226f91088..ab7d7aed7620 100644 --- a/osu.Game.Tournament/TournamentGameBase.cs +++ b/osu.Game.Tournament/TournamentGameBase.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using System; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using System.Threading.Tasks; @@ -97,6 +98,7 @@ protected override void LoadComplete() Task.Run(readBracket); } + [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Tournament uses Newtonsoft.Json which is not subject to IL trimming in this context.")] private async Task readBracket() { try @@ -348,6 +350,7 @@ private void saveChanges() sw.Write(serialisedLadder); } + [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Tournament uses Newtonsoft.Json which is not subject to IL trimming in this context.")] public string GetSerialisedLadder() { foreach (var r in ladder.Rounds) diff --git a/osu.Game/Overlays/WizardOverlay.cs b/osu.Game/Overlays/WizardOverlay.cs index a75f1aff3c2d..66ef231f3299 100644 --- a/osu.Game/Overlays/WizardOverlay.cs +++ b/osu.Game/Overlays/WizardOverlay.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using osu.Framework.Allocation; using osu.Framework.Extensions; using osu.Framework.Graphics; @@ -200,6 +201,7 @@ private void showFirstStep() ShowNextStep(); } + [UnconditionalSuppressMessage("Trimming", "IL2072", Justification = "Step types are always WizardScreen subtypes with parameterless constructors.")] protected virtual void ShowNextStep() { Debug.Assert(CurrentStepIndex != null); diff --git a/osu.Game/Rulesets/Mods/IMod.cs b/osu.Game/Rulesets/Mods/IMod.cs index 08e64c4aa9d7..c2637e53b44c 100644 --- a/osu.Game/Rulesets/Mods/IMod.cs +++ b/osu.Game/Rulesets/Mods/IMod.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using System; +using System.Diagnostics.CodeAnalysis; using osu.Framework.Bindables; using osu.Framework.Graphics.Sprites; using osu.Framework.Localisation; @@ -82,6 +83,7 @@ public interface IMod : IEquatable /// /// Create a fresh instance based on this mod. /// + [UnconditionalSuppressMessage("Trimming", "IL2072", Justification = "Concrete mod types always have parameterless constructors.")] Mod CreateInstance() => (Mod)Activator.CreateInstance(GetType())!; /// diff --git a/osu.Game/Rulesets/RealmRulesetStore.cs b/osu.Game/Rulesets/RealmRulesetStore.cs index 52ea5f7f4b74..f72380b12395 100644 --- a/osu.Game/Rulesets/RealmRulesetStore.cs +++ b/osu.Game/Rulesets/RealmRulesetStore.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using osu.Framework.Extensions.ObjectExtensions; @@ -29,6 +30,7 @@ public RealmRulesetStore(RealmAccess realmAccess, Storage? storage = null) informUserAboutBrokenRulesets(); } + [UnconditionalSuppressMessage("Trimming", "IL2057", Justification = "InstantiationInfo is a trusted ruleset type name from loaded assemblies.")] private void prepareDetachedRulesets() { realmAccess.Write(realm => diff --git a/osu.Game/Rulesets/RulesetInfo.cs b/osu.Game/Rulesets/RulesetInfo.cs index ad8a9404897c..866c1d4cb0b0 100644 --- a/osu.Game/Rulesets/RulesetInfo.cs +++ b/osu.Game/Rulesets/RulesetInfo.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using System; +using System.Diagnostics.CodeAnalysis; using JetBrains.Annotations; using osu.Game.Rulesets.Difficulty; using Realms; @@ -94,6 +95,7 @@ public override int GetHashCode() LastAppliedDifficultyVersion = LastAppliedDifficultyVersion, }; + [UnconditionalSuppressMessage("Trimming", "IL2057", Justification = "InstantiationInfo is a trusted ruleset type name from loaded assemblies.")] public Ruleset CreateInstance() { if (!Available) diff --git a/osu.Game/Screens/ScreenWhiteBox.cs b/osu.Game/Screens/ScreenWhiteBox.cs index c8d6c055dc19..7a6e3685cbf2 100644 --- a/osu.Game/Screens/ScreenWhiteBox.cs +++ b/osu.Game/Screens/ScreenWhiteBox.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; @@ -52,6 +53,7 @@ public override void OnResuming(ScreenTransitionEvent e) this.FadeIn(transition_time, Easing.OutExpo); } + [UnconditionalSuppressMessage("Trimming", "IL2072", Justification = "PossibleChildren types always have parameterless constructors.")] public ScreenWhiteBox() { FillFlowContainer childModeButtons; diff --git a/osu.Game/Screens/Select/ModSpeedHotkeyHandler.cs b/osu.Game/Screens/Select/ModSpeedHotkeyHandler.cs index 6d9f58bcfda8..652049233979 100644 --- a/osu.Game/Screens/Select/ModSpeedHotkeyHandler.cs +++ b/osu.Game/Screens/Select/ModSpeedHotkeyHandler.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using osu.Framework.Allocation; using osu.Framework.Bindables; @@ -45,6 +46,7 @@ private void storeLastActiveRateAdjustMod() lastActiveRateAdjustMod = (ModRateAdjust?)selectedMods.Value.OfType().SingleOrDefault()?.DeepClone() ?? lastActiveRateAdjustMod; } + [UnconditionalSuppressMessage("Trimming", "IL2075", Justification = "ModRateAdjust property names are stable and will not be trimmed.")] public bool ChangeSpeed(double delta, IEnumerable availableMods) { double targetSpeed = (selectedMods.Value.OfType().SingleOrDefault()?.SpeedChange.Value ?? 1) + delta; diff --git a/osu.Game/Skinning/SerialisedDrawableInfo.cs b/osu.Game/Skinning/SerialisedDrawableInfo.cs index f3635f841aba..91befb1916d6 100644 --- a/osu.Game/Skinning/SerialisedDrawableInfo.cs +++ b/osu.Game/Skinning/SerialisedDrawableInfo.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using Newtonsoft.Json; using osu.Framework.Bindables; @@ -27,6 +28,7 @@ namespace osu.Game.Skinning [Serializable] public sealed class SerialisedDrawableInfo { + [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] public Type Type { get; set; } = null!; public Vector2 Position { get; set; } diff --git a/osu.Game/Skinning/SkinInfo.cs b/osu.Game/Skinning/SkinInfo.cs index 4c9c16e72115..98d9d3fc558e 100644 --- a/osu.Game/Skinning/SkinInfo.cs +++ b/osu.Game/Skinning/SkinInfo.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using JetBrains.Annotations; using Newtonsoft.Json; using osu.Game.Database; @@ -40,6 +41,7 @@ public class SkinInfo : RealmObject, IHasRealmFiles, IEquatable, IHasG public bool Protected { get; set; } + [UnconditionalSuppressMessage("Trimming", "IL2057", Justification = "InstantiationInfo is a trusted skin type name set from known skin types.")] public virtual Skin CreateInstance(IStorageResourceProvider resources) { var type = string.IsNullOrEmpty(InstantiationInfo)