Commit 843993f
authored
Isolate Godot NuGet restore from Unity package cache (#5136)
# 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
- [x] `unity-testsuite` passes1 parent 2af138f commit 843993f
2 files changed
Lines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
117 | 116 | | |
118 | 117 | | |
119 | 118 | | |
120 | | - | |
| 119 | + | |
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
| |||
219 | 218 | | |
220 | 219 | | |
221 | 220 | | |
222 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
223 | 224 | | |
224 | | - | |
225 | | - | |
| 225 | + | |
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| 247 | + | |
247 | 248 | | |
248 | 249 | | |
249 | 250 | | |
| |||
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
275 | | - | |
| 276 | + | |
| 277 | + | |
276 | 278 | | |
277 | 279 | | |
278 | 280 | | |
| |||
0 commit comments