Problem
Add a single anonymous fn to nostrand/nostrand/core.clj (a namespace with no stdlib code), rebuild, and every committed clojure.* and compiler DLL drifts, though no stdlib source changed:
;; nostrand/nostrand/core.clj
(def -probe #(identity %))
$ bb build
$ bb check-drift
drift detected # ~147 clojure.* / compiler DLLs modified
The only content difference in each DLL is one type-name counter, bumped by one:
clojure.core.clj.dll: <magic>nostrand_core$<fn>__49 -> __50
bb build compiles each namespace with the ambient *ns* = nostrand.core, so every file's first form is named under it before its own in-ns runs. That name's suffix comes from magic.util/*gensym-map*, which is never reset, so it accumulates across the build and encodes nostrand.core's fn count. #43's reset-global-gensym-counter! resets RT._id per file-writing compile but not *gensym-map*.
Suggestion
Reset magic.util/*gensym-map* at the start of each file-writing compile in magic.api/compile-file, guarded to :write-files like the existing RT._id reset.
Problem
Add a single anonymous fn to
nostrand/nostrand/core.clj(a namespace with no stdlib code), rebuild, and every committedclojure.*and compiler DLL drifts, though no stdlib source changed:The only content difference in each DLL is one type-name counter, bumped by one:
bb buildcompiles each namespace with the ambient*ns*=nostrand.core, so every file's first form is named under it before its ownin-nsruns. That name's suffix comes frommagic.util/*gensym-map*, which is never reset, so it accumulates across the build and encodesnostrand.core's fn count. #43'sreset-global-gensym-counter!resetsRT._idper file-writing compile but not*gensym-map*.Suggestion
Reset
magic.util/*gensym-map*at the start of each file-writing compile inmagic.api/compile-file, guarded to:write-fileslike the existingRT._idreset.