Skip to content

Isolate Godot NuGet restore from Unity package cache#5136

Merged
bfops merged 1 commit into
masterfrom
joshua/fix/isolate-godot-nuget-restore
May 28, 2026
Merged

Isolate Godot NuGet restore from Unity package cache#5136
bfops merged 1 commit into
masterfrom
joshua/fix/isolate-godot-nuget-restore

Conversation

@joshua-spacetime

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

Copy link
Copy Markdown
Contributor

Description of Changes

A follow-on to #5133 that fixes another Godot flake that was observed after #5133 merged. Specifically a C# SDK regen flake where the Godot package restore path reused sdks/csharp/packages, which is also the Unity-visible package cache.

During cargo regen csharp dlls, the Godot flow previously did this:

  • cleared sdks/csharp/packages/godotsharp
  • cleared sdks/csharp/obj~/godot
  • restored the Godot project back into sdks/csharp/packages
  • packed the Godot project using that same Unity-visible package area

That meant a Godot-only cleanup could delete package content under the Unity SDK package cache. If a previous GodotSharp restore was partial or stale, regen tried to fix it by deleting packages/godotsharp, but that path is visible to Unity and can cause dirty/missing package content during regen.

With this change, Godot restore state is now isolated under sdks/csharp/obj~/godot/packages, and the regen flow becomes:

  • clear only sdks/csharp/obj~/godot
  • restore the Godot project into sdks/csharp/obj~/godot/packages
  • pack the Godot project under the same path

Clearing obj~/godot now removes both Godot intermediates and Godot-only NuGet packages, while leaving the normal Unity SDK package cache under sdks/csharp/packages untouched.

API and ABI breaking changes

N/A

Expected complexity level and risk

1

Testing

  • unity-testsuite passes

@joshua-spacetime joshua-spacetime requested a review from bfops May 28, 2026 05:50

@bfops bfops left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

SGTM thank you!

@bfops bfops added this pull request to the merge queue May 28, 2026
Merged via the queue into master with commit 843993f May 28, 2026
96 checks passed
@joshua-spacetime joshua-spacetime deleted the joshua/fix/isolate-godot-nuget-restore branch May 28, 2026 18:30
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