Skip to content

fix(build): gate DLL deploys to Release and make them deterministic - #164

Merged
VPDPersonal merged 2 commits into
mainfrom
build/release-gate-deterministic-dlls
Aug 6, 2026
Merged

fix(build): gate DLL deploys to Release and make them deterministic#164
VPDPersonal merged 2 commits into
mainfrom
build/release-gate-deterministic-dlls

Conversation

@VPDPersonal

Copy link
Copy Markdown
Owner

Fixes two release-readiness audit findings around the shipped Roslyn DLLs.

Summary

  • 🐛 CopyToUnity in the generators' Directory.Build.targets now runs only for Release, mirroring the analyzers' gate — before, any Debug build (including a plain dotnet test) silently redeployed a Debug DLL into the Unity package.
  • 🔧 Both shipped projects build deterministically (Deterministic + ContinuousIntegrationBuild, source revision kept out of InformationalVersion): no absolute local checkout paths in the binaries (the analyzer DLL embedded the /Users/<name>/…/obj/Release/….pdb path) and no git SHA of whatever tree happened to build them.
  • 📦 Both package DLLs redeployed from a clean Release build with the new settings.

Notes for review

  • ✅ Gate proof: a Debug dotnet test run in a clean tree leaves the package DLLs untouched (git status stays clean); tests green — generators 38/38, analyzers 47/47.
  • ✅ Determinism proof: a repeated dotnet build -c Release --no-incremental reproduces both DLLs bit-for-bit (md5 match), including the ILRepack-merged generator DLL; strings <dll> | grep -i users is now empty for both.
🇷🇺 Описание на русском

Закрывает две находки аудита релизной готовности, касающиеся поставляемых Roslyn-DLL.

Кратко

  • 🐛 CopyToUnity в Directory.Build.targets генераторов теперь срабатывает только в Release — зеркально гейту анализаторов; раньше любая Debug-сборка (включая обычный dotnet test) молча заливала Debug-DLL в Unity-пакет.
  • 🔧 Оба поставляемых проекта собираются детерминированно (Deterministic + ContinuousIntegrationBuild, ревизия исходников убрана из InformationalVersion): в бинарниках больше нет абсолютных локальных путей (analyzer-DLL вшивала путь /Users/<имя>/…/obj/Release/….pdb) и git-SHA дерева сборки.
  • 📦 Обе пакетные DLL переразвёрнуты из чистой Release-сборки с новыми настройками.

Заметки для ревью

  • ✅ Проверка гейта: Debug-прогон dotnet test в чистом дереве не трогает пакетные DLL (git status остаётся чистым); тесты зелёные — генераторы 38/38, анализаторы 47/47.
  • ✅ Проверка детерминизма: повторный dotnet build -c Release --no-incremental воспроизводит обе DLL байт-в-байт (md5 совпадает), включая merged-DLL генератора после ILRepack; strings <dll> | grep -i users теперь пуст для обеих.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LsVLAxv4eia9yv4TjSaP3G

VPDPersonal and others added 2 commits August 6, 2026 21:26
Any Debug build — including a plain `dotnet test` run — silently
redeployed a Debug DLL into the Unity package because CopyToUnity had no
Configuration gate. Mirror the analyzer's Release-only condition.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsVLAxv4eia9yv4TjSaP3G
Enable Deterministic + ContinuousIntegrationBuild for both shipped
projects so identical sources produce byte-identical DLLs: PathMap
strips the local checkout path (the analyzer DLL embedded the absolute
pdb path with the user name), and InformationalVersion no longer bakes
in the git SHA of whatever tree happened to build it. Redeploy both
package DLLs rebuilt with these settings; a repeated clean Release
build now reproduces them bit-for-bit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsVLAxv4eia9yv4TjSaP3G
@VPDPersonal VPDPersonal added type: fix Bug fix status: work-in-progress Draft / not ready for review area: generator Roslyn source generator area: ci CI / GitHub Actions workflows labels Aug 6, 2026
VPDPersonal added a commit that referenced this pull request Aug 6, 2026
Per the repo owner: an intermediate 1.0.0-rc.6 ships first because a lot
of manual testing is still ahead. The checklist tail is now two stages -
rc.6 (merge audit PRs #163/#164+, bump to rc.6, [1.0.0-rc.6] CHANGELOG
section, v1.0.0-rc.6 tag with release.yml publishing upm-preview, clean
install check, full manual QA pass) and 1.0.0 (only after all QA
findings are closed: bump, [Unreleased] -> [1.0.0], v1.0.0 tag + GitHub
Release, upm branch update, migration note verified).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsVLAxv4eia9yv4TjSaP3G
@VPDPersonal
VPDPersonal marked this pull request as ready for review August 6, 2026 18:46
@VPDPersonal
VPDPersonal merged commit ac06433 into main Aug 6, 2026
@VPDPersonal
VPDPersonal deleted the build/release-gate-deterministic-dlls branch August 6, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI / GitHub Actions workflows area: generator Roslyn source generator status: work-in-progress Draft / not ready for review type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant