Skip to content

raco glaze install/doctor: pin checkouts, fix link drift - #7

Merged
turinglambdaai merged 1 commit into
mainfrom
feat/cli-install-doctor
Sep 26, 2026
Merged

turinglambdaai merged 1 commit into
mainfrom
feat/cli-install-doctor

Conversation

@turinglambdaai

Copy link
Copy Markdown
Owner

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]

  • Resolves branches/tags via ls-remote; shallow-clones exactly that revision
  • Links it under the canonical 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: pre-rename names 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

Two latent warts fixed along the way

  • glaze-cli/info.rkt still declared a dependency on the removed glaze-lib package — every --auto install reported setup errors
  • String-keyed lookups switched to equal? hashing (hasheq silently misses string literals from other modules)

Verification

  • 13 new unit tests (pkg-show parsing both display formats, problem detection, sha/ref validation); full suite 210 green
  • Live end-to-end on a machine that had the exact drift this fixes: doctor identified a non-canonical glaze-pinned owner + stale legacy links; install pinned a checkout byte-exactly and left a clean single-glaze table

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.
@turinglambdaai
turinglambdaai merged commit 59ca209 into main Sep 26, 2026
9 checks passed
@turinglambdaai
turinglambdaai deleted the feat/cli-install-doctor branch September 26, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant