Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .claude/agents/coder.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,8 @@ Projects that import `GumCoreShared.projitems` (verify by grepping if unsure):
- `GumCore/GumCoreXnaPc/GumCore.FNA/GumCore.FNA.csproj`
- `GumCore/GumCoreXnaPc/GumCore.Kni.DesktopGL/GumCore.Kni.DesktopGL.csproj`
- `GumCore/GumCoreXnaPc/GumCore.Kni.Web/GumCore.Kni.Web.csproj`
- `GumCore/GumCoreXnaPc/GumCoreAndroid/GumCoreAndroid.csproj` (and the sibling `GumCoreAndroid.csproj`)
- `GumCore/GumCoreXnaPc/GumCoreUwp/GumCoreUwp.csproj`
- `GumCore/GumCoreXnaPc/GumCoreiOS/GumCoreiOS.csproj` (and the sibling `GumCoreiOS.csproj`)
- `GumCore/GumCoreXnaPc/GumCoreDesktopGL.csproj`
- `GumCore/GumCoreXnaPc/GumCoreXnaPc.csproj`
- `GumCore/GumCoreXnaPc/GumCoreAndroid/GumCoreAndroid.csproj`
- `GumCore/GumCoreXnaPc/GumCoreiOS/GumCoreiOS.csproj`

Pin to the same version used in `GumCommon.csproj` / `MonoGameGum.csproj` so a single bump propagates predictably. Mention the package additions explicitly in your final notes so the user can audit them.

Expand All @@ -75,11 +72,11 @@ Gating pattern:

Don't `#if` away entire types or methods unless you've confirmed no caller references them across targets — that's a much harder refactor.

## `ToolsUtilities/` also compiles into a .NET Framework 4.7.2 project
## `ToolsUtilities/` and `GumDataTypes/` also compile into netstandard2.0 packages

`ToolsUtilities.csproj` is a legacy non-SDK project targeting `v4.7.2` that compiles the same `ToolsUtilities/*.cs` files `GumCommon` does, so net8.0 is not the floor for that folder. A .NET 5+ API compiles in `GumCommon` and breaks CI's `Build-Tool` job while every runtime csproj stays green — build `GumFull.sln` to catch it.
`ToolsUtilities/ToolsUtilitiesStandard.csproj` and `GumDataTypes/GumDataTypesNet6.csproj` multi-target `netstandard2.0` (published as `FlatRedBall.ToolsUtilities.NetStandard` / `FlatRedBall.GumDataTypes`) alongside compiling the same `ToolsUtilities/*.cs` / `GumDataTypes/*.cs` files `GumCommon` does, so net8.0 is not the floor for either folder. A .NET 5+ API compiles fine in `GumCommon` (net8.0) but breaks the `netstandard2.0` leg of these two csproj — a failure `dotnet build GumFull.sln` alone won't catch, since neither is part of that solution; build the csproj directly (`dotnet build ToolsUtilities/ToolsUtilitiesStandard.csproj` / `dotnet build GumDataTypes/GumDataTypesNet6.csproj`) to verify.

Trim and AOT attributes (`RequiresUnreferencedCode`, `DynamicallyAccessedMembers`, `UnconditionalSuppressMessage`) are the common case, since none exist on .NET Framework. Gate the attribute and its `using System.Diagnostics.CodeAnalysis;` with `#if NET5_0_OR_GREATER`.
Trim and AOT attributes (`RequiresUnreferencedCode`, `DynamicallyAccessedMembers`, `UnconditionalSuppressMessage`) are the common case, since none exist pre-.NET 5 / on netstandard2.0. Gate the attribute and its `using System.Diagnostics.CodeAnalysis;` with `#if NET5_0_OR_GREATER`.

## Guard symmetry — a member behind `#if !FRB` cannot be called from shared un-guarded code

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ CLAUDE.local.md
*.user
Gum/objNetFramework/
GumCoreShared.shproj.user
GumDataTypes/objNetFramework/
packages/
Samples/MonoGameGumFontLoading/MonoGameGumFontLoading/.config/*
Samples/MonoGameGumImmediateMode/MonoGameGumImmediateMode/.config/*
Expand Down
6 changes: 0 additions & 6 deletions Gum/DataTypes/StateSaveExtensionMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
using System.CodeDom;
using System.Collections;
using System.Collections.Generic;
#if NET5_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
using System.Linq;
using System.Reflection.Emit;
using System.Security.Cryptography.X509Certificates;
Expand Down Expand Up @@ -965,12 +963,8 @@ public static StateSave Clone(this StateSave whatToClone)

}

// Gated because this file also compiles into GumRuntime.csproj (net472) and is shared
// with FlatRedBall via GumCoreShared.projitems, neither of which has trim attributes.
#if NET5_0_OR_GREATER
[UnconditionalSuppressMessage("Trimming", "IL2026",
Justification = "T is always StateSave (no subclasses exist), which GumCommon's ILLink.Descriptors.xml preserves in full (preserve=\"all\").")]
#endif
public static T Clone<T>(this StateSave whatToClone) where T : StateSave
{
T toReturn = FileManager.CloneSaveObjectCast<StateSave, T>(whatToClone);
Expand Down
6 changes: 0 additions & 6 deletions Gum/Graphics/Animation/Content/AnimationChainListSave.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
#if NET5_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
using System.Xml.Serialization;
using ToolsUtilities;

Expand Down Expand Up @@ -69,12 +67,8 @@ public AnimationChainListSave()

#endregion

// Gated because this file also compiles into GumRuntime.csproj (net472) and is shared
// with FlatRedBall via GumCoreShared.projitems, neither of which has trim attributes.
#if NET5_0_OR_GREATER
[UnconditionalSuppressMessage("Trimming", "IL2026",
Justification = "Deserializes AnimationChainListSave, which GumCommon's ILLink.Descriptors.xml preserves in full (preserve=\"all\") under Gum.Content.AnimationChain.*.")]
#endif
public static AnimationChainListSave FromFile(string fileName)
{
AnimationChainListSave? toReturn = null;
Expand Down
82 changes: 0 additions & 82 deletions GumCore/GumCoreXnaPc/GumCoreAndroid.csproj

This file was deleted.

86 changes: 0 additions & 86 deletions GumCore/GumCoreXnaPc/GumCoreDesktopGL.csproj

This file was deleted.

Loading
Loading