feat(bb): add sync-clojure-clr and author the Unity runtime-selection constraints (#120) - #124
Open
parth-io wants to merge 2 commits into
Open
feat(bb): add sync-clojure-clr and author the Unity runtime-selection constraints (#120)#124parth-io wants to merge 2 commits into
parth-io wants to merge 2 commits into
Conversation
parth-io
marked this pull request as ready for review
August 4, 2026 06:29
The file-existence checks were redundant with the smoke test that followed them. nos version boots the whole runtime to print it, so a missing launcher, runtime DLL or stdlib .clj.dll causes it to fail. The magic-unity Export and Stock DLLs it also checked are tracked in git, and check-drift byte-diffs them on every pull request and on pushes already. That leaves nostrand/bin, the one path that is untracked build output, and it is exactly what the smoke test covers.
… constraints (flybot-sg#120) Vendoring stock ClojureCLR alongside MAGIC means every shipped DLL needs a defineConstraints block deciding which runtime the Editor loads. Both halves of that now live in bb: sync-clojure-clr vendors a release into Stock, write-metas authors the metas, and check-constraints fails when a shipped DLL is missing its block.
parth-io
force-pushed
the
feat/runtime-selection-tooling
branch
from
August 4, 2026 06:46
ebb8a4a to
56f0a6e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #120
bb sync-clojure-clr [tag]downloads the DLLs of aflybot-sg/clojure-clrrelease intomagic-unity/Runtime/Infrastructure/Stock/withgh, defaulting to the newest release rather than/releases/latest, which skips prereleases.magic.unity/constraint-blocksholds the runtime policy —Exportgets'!UNITY_EDITOR || MAGIC_RUNTIME_IN_EDITOR',StockgetsUNITY_EDITORand'!MAGIC_RUNTIME_IN_EDITOR', so players always load MAGIC and the Editor follows the symbol — andbb/templates/plugin-meta/{Export,Stock}.meta.tmplcarry the surrounding importer YAML with{{guid}}and{{defineConstraints}}filled in per DLL.write-metas!creates a plugin.metafor every shipped DLL that lacks one, with a deterministic GUID, and never overwrites: a GUID must not churn under a consumer, so a wrong-but-present meta ischeck-constraints!'s to report.check-constraints!iterates the DLLs rather than the metas, since a missing meta is the one case a sweep over*.dll.metacannot see, and it cross-checks the C# import-time stamper against theExportentry.bb build,bb bootstrapandbb refresh-stdlibnow callwrite-metas!, so a freshly deployed DLL cannot ship unconstrained.verify-distdrops its file-existence checks and keeps thenos versionsmoke test, which boots the whole runtime anyway; the magic-unity DLLs are byte-diffed bycheck-drift.bb write-metasstill fails on it — the vendoredStock/*.dll, the constraint blocks on the 39Export/*.dll.meta(stilldefineConstraints: []), andmagic-unity/Editor/CljPluginConstraints.csall land in the follow-up.