Skip to content

fix unity-testsuite: clear intermediate Godot build state#5133

Merged
bfops merged 3 commits into
masterfrom
joshua/fix-godot-regen-restore
May 28, 2026
Merged

fix unity-testsuite: clear intermediate Godot build state#5133
bfops merged 3 commits into
masterfrom
joshua/fix-godot-regen-restore

Conversation

@joshua-spacetime
Copy link
Copy Markdown
Contributor

@joshua-spacetime joshua-spacetime commented May 27, 2026

Description of Changes

Harden cargo regen csharp dlls against flaky Godot restore/build state in the Unity test suite.

I suspect this flake is runner specific. Some Unity runners appear to have incomplete Godot package state, where sdks/csharp/packages/godotsharp exists but is missing GodotSharp.dll. In that state, NuGet can still report restore success and generate a project.assets.json that contains GodotSharp metadata but no usable compile asset.

The regen flow now removes the Godot MSBuild intermediate directory (sdks/csharp/obj~/godot) before restoring SpacetimeDB.ClientSDK.Godot.csproj. It also clears the targeted GodotSharp package cache (sdks/csharp/packages/godotsharp) so NuGet cannot reuse a partially restored package missing GodotSharp.dll.

After restore, regen parses project.assets.json and verifies that GodotSharp is present and that the referenced GodotSharp.dll exists before running dotnet pack --no-restore.

This should either prevent the flaky missing-Godot namespace failure, or fail earlier with a clearer restore/package-state error.

NOTE/WARNING: This code was entirely AI generated.

API and ABI breaking changes

N/A

Expected complexity level and risk

~

Testing

  • unity-testsuite passes (I ran it at least 5 times to try to get it scheduled to different runners)

@joshua-spacetime joshua-spacetime force-pushed the joshua/fix-godot-regen-restore branch from 262af7d to 0a9ae13 Compare May 27, 2026 21:23
@joshua-spacetime joshua-spacetime changed the title Harden Godot regen restore fix unity-testsuite: clear intermediate Godot build state May 27, 2026
@joshua-spacetime joshua-spacetime marked this pull request as ready for review May 27, 2026 22:28
Comment thread tools/regen/src/csharp.rs Outdated
Comment thread tools/regen/Cargo.toml Outdated
Comment thread tools/regen/src/csharp.rs
@joshua-spacetime joshua-spacetime force-pushed the joshua/fix-godot-regen-restore branch from ec49780 to 2de1938 Compare May 27, 2026 23:04
Copy link
Copy Markdown
Collaborator

@bfops bfops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it

@bfops bfops enabled auto-merge May 27, 2026 23:07
@bfops bfops added this pull request to the merge queue May 28, 2026
Merged via the queue into master with commit 6e4b83a May 28, 2026
71 of 73 checks passed
@joshua-spacetime joshua-spacetime deleted the joshua/fix-godot-regen-restore branch May 28, 2026 02:31
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.

2 participants