Thirdparty perl stamp - #23
Open
zaucker wants to merge 2 commits into
Open
Conversation
lib/perl5 is only valid for one perl: the XS modules are compiled for a specific version and architecture, the pure perl ones are not. After a perl upgrade the arch independent modules stay behind, cpanm sees them as satisfied dependencies and never installs their arch dependent prerequisites. The result is a tree that loads until something reaches for an XS module, which is hard to tell apart from a bug in our code. Name the build stamp after the perl version and archname, and refuse to build on top of a tree that carries a different one, pointing at clean-local instead of quietly adding to the mix. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…CPAN The build copied cpanfile-$version.snapshot into place and then called cpanm --installdeps, but cpanm does not read cpanfile.snapshot: that is carton's format, and only the snapshot rule ever used carton. So an ordinary build resolved the unversioned cpanfile against live CPAN and the pins had no effect, which is how a tree of 2022 modules could sit next to a snapshot naming quite different versions. Install with carton install --deployment, so the snapshot is what gets installed and a snapshot that does not cover the cpanfile is an error rather than a silent upgrade. Carton itself moves into its own rule, as an order only prerequisite: needing to reinstall the installer says nothing about the dependency tree being stale, and as a normal prerequisite it would retrigger the snapshot rule and rewrite the checked in snapshot as a side effect of building. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Some Makefile improvements suggested by Claude to ensure detection of stale thirdparty contents and also to fix pinning to cpan snapshots.
Action required after merging
Every existing checkout needs a one-time clean rebuild:
Without it the first build after this change stops with:
That is the new guard doing its job, not a broken build: the stamp is now named after the perl version and archname, and an existing tree carries the old version-agnostic
touchstamp instead.clean-localremoveslib/ work/ cache/ carton/ build.logand the old stamp, keeping the Makefiles, the snapshots andbin/cpanm— so the rebuild needs network access. Anything else that buildsthirdparty/(Docker images, release scripts) wants the same one-time clean. No CI job is affected:.gitlab-ci.ymlonly runs gitleaks and sonar-scanner, neither of which builds the tree.Note that after this the build installs the versions the snapshot pins rather than whatever CPAN offers that day, so the rebuilt tree may legitimately contain older modules than the one it replaces.