Skip to content

fix(build): apply patches on pipefail, dedupe optimum types in donor csproj - #97

Open
dxcvvxd wants to merge 1 commit into
StratumServer:mainfrom
dxcvvxd:fix/patch-application-and-overlay-csproj
Open

dxcvvxd wants to merge 1 commit into
StratumServer:mainfrom
dxcvvxd:fix/patch-application-and-overlay-csproj

Conversation

@dxcvvxd

@dxcvvxd dxcvvxd commented Sep 16, 2026

Copy link
Copy Markdown

fixes #94, #90, #96

fix 1 (issue #94 & #90): csproj owned by both sources/ overlay and old patches/ file

  • sources/VintagestoryApi/VintagestoryAPI.csproj overlay now canonical owner of donor csproj.
  • delete stale patches/VintagestoryApi/VintagestoryAPI.csproj.patch, its 2 <Compile Remove> lines merged into overlay.
  • one file, one owner. bootstrap no longer dies on ownership-conflict check.

fix 2 (issue #96, first part): patch gate die on sigpipe

  • bootstrap runs set -o pipefail. gate find "$patches_dir" -name '*.patch' -print | head -n 1 | grep -q .. head exits after first line, find gets SIGPIPE (141), pipeline fails, else branch runs. "No patches/ to apply." every run.
  • fix: find "$patches_dir" -name '*.patch' -print -quit >/dev/null 2>&1. -quit stops find after first match, no broken pipe. all 118 patches apply.

fix 3 (issue #96, second part): cs0433 same type in two dll

  • overlay csproj removed 18 of 21 Optimum files from donor compile. missed 3: OptimumCompatibilityGuard, OptimumFrustumCullSimd, OptimumKometGuard.
  • those, plus OptimumMeshPartPool and OptimumChunkVisibilityBfs (taken from deleted patch), compiled into both VintagestoryAPI.dll and Optimum.Api.Contracts.dll, so mods referencing both get cs0433.
  • add all 5 missing <Compile Remove> entries to overlay. Optimum types compile only in contracts.

verify

  • make refresh prints "Patches: 118 applied, 0 skipped, 0 failed"
  • dotnet build VintageStory.slnx -c Release succeeds, 0 errors
  • dotnet test passes 1042 tests

…csproj

fixes StratumServer#94, StratumServer#96

- bootstrap.sh: find|head|grep sigpipe under set -o pipefail skipped all
  patches. use find -print -quit.
- sources/VintagestoryApi/VintagestoryAPI.csproj: overlay now owns
  csproj, remove stale patches/VintagestoryApi/VintagestoryAPI.csproj.patch.
  add missing Compile Removes (OptimumMeshPartPool, OptimumChunkVisibilityBfs,
  OptimumCompatibilityGuard, OptimumFrustumCullSimd, OptimumKometGuard) so
  Optimum types compile only in Optimum.Api.Contracts, not also in
  VintagestoryAPI.dll (cs0433).
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.

[Bug] csproj owned by both sources/ overlay and old patches/ file

1 participant