raco glaze install/doctor: pin checkouts, fix link drift - #7
Merged
Merged
Conversation
Every downstream project hand-rolled the same clone-and-link script and real machines drift into broken states that fail with messages naming no package. This bakes the recipe into the CLI, with the failure modes named out loud. raco glaze install <sha|branch|tag> [--dir <path>]: - resolves branches/tags to shas via ls-remote, shallow-clones exactly that revision, links it under the canonical package name (--name glaze; without it raco registers the checkout DIRECTORY name — glaze-src, glaze-pinned, ... — which is how duplicate conflicting owners appear) - removes every glaze-related package link first: the pre-rename names (glaze-lib/cli/doc/test) plus any discovered *glaze* entry raco glaze doctor [--fix]: - audits the package table: legacy links, links to deleted checkouts, non-canonical owners, unresolved collection path - --fix removes the offending links; an install follows Also fixes two latent warts this work surfaced: - glaze-cli/info.rkt still declared a dependency on the removed glaze-lib package, so every --auto install reported setup errors - string-keyed lookups now use equal? hashing (hasheq silently misses string literals from other modules) 13 new unit tests; live-verified end-to-end on a machine that had the exact drift this exists to fix.
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.
Every downstream project hand-rolled the same clone-and-link script, and real machines drift into states that fail with messages naming no package. This bakes the recipe into the CLI.
raco glaze install <sha|branch|tag> [--dir]--name glaze) — without it, raco registers the checkout directory name (glaze-src, glaze-pinned, …), which is how duplicate conflicting owners appear*glaze*entryraco glaze doctor [--fix]--fixremoves the offending linksTwo latent warts fixed along the way
glaze-cli/info.rktstill declared a dependency on the removedglaze-libpackage — every--autoinstall reported setup errorsVerification
glaze-pinnedowner + stale legacy links; install pinned a checkout byte-exactly and left a clean single-glazetable