fix(build): sync VERSION into every .el header, not just the resource - #28
Open
BuddhiLW wants to merge 1 commit into
Open
fix(build): sync VERSION into every .el header, not just the resource#28BuddhiLW wants to merge 1 commit into
BuddhiLW wants to merge 1 commit into
Conversation
sync-version propagated /VERSION to resources/clojure-elisp/VERSION and nothing else, while six locations restate the version. The result: clojure-elisp-mode.el and cider-clojure-elisp.el read 0.5.0 while VERSION read 0.6.1 - two releases of drift, invisible because no gate looked at them, and hand-fixed twice. MELPA Stable reads that header, so drift ships the wrong version. sync-version! now stamps all three .el packages and THROWS when a header is missing, so a renamed or restructured file fails the release loudly instead of dropping silently out of the sync - that silence is what let the drift last two releases. Stamping the runtime header here too means a bump no longer needs a regen to reach the shipped file. version-consistency-test asserts all three against /VERSION, and a second test fails if an .el appears in resources/clojure-elisp that is in neither list, so a new package cannot quietly keep the header it was born with. Also fixes a flake that kept masking runs: cross-file-warning-test passed (.getParent f1) - the shared /tmp - to compile-project, so it compiled every .cljel any other process had left there. Reproduced by dropping one unparseable .cljel in /tmp: errors before, passes after. Closes 20260905161109-0e698b23, 20260713171046-5d818865 and 20260905173027-253109a0.
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 CLJEL-SYNC-VERSION (
20260905161109-0e698b23), CLJEL-MELPA propagate-VERSION(
20260713171046-5d818865, the same concern filed twice) and CLJEL-TEST-TMPDIR(
20260905173027-253109a0).Stacked on #27, which is stacked on #26. Bases retarget as those merge.
The drift
sync-versionpropagated/VERSIONtoresources/clojure-elisp/VERSIONandnothing else, while six locations restate the version. Measured on this branch
before the fix:
Historically those two sat at 0.5.0 while VERSION read 0.6.1 — two releases
behind, invisible because no gate looked at them, hand-fixed twice. MELPA
Stable reads that header, so drift ships the wrong version.
The fix
sync-version!stamps all three.elpackages, and throws when a header isabsent rather than writing nothing. That matters: the sync writes by regex, so
a renamed or restructured file would otherwise drop out of it silently — and
silence is exactly what let this last two releases.
Stamping the runtime header here too means a bump no longer needs a regen to
reach the shipped file. (I hit that trap myself in #26: regenerated before
bumping, and shipped a runtime naming the previous release.)
Two tests, both non-vacuous:
.elheader equals/VERSION— verified to fail when one is edited back.elinresources/clojure-elispis missing from the list, so a newpackage cannot quietly keep whatever header it was born with
Also: a flake that kept masking runs
cross-file-warning-testpassed(.getParent f1)— the shared system tempdirectory — to
compile-project, so it compiled every.cljelany otherprocess happened to leave in
/tmp. It errored twice during this session andpassed on re-run, which is the worst kind of red: unreproducible locally,
intermittent in CI.
Proven rather than assumed. With one unparseable
.cljeldropped in/tmp:609 Clojure tests, 3063 assertions, 0 failures. 28 ERT tests, 0 unexpected.