Makefile has no cibuild or precommit shims, so two documented entrypoints have no make target #34
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
REPO_POLICIES.md: "The Makefile is authoritative documentation for how therepo is used… If someone checks out the repo and types
make<tab>, they shouldsee every meaningful operation available."
The
Makefileprovidesbootstrap setup test lint fmt fmt-check check docker hooks serve. It has no target forscript/cibuildorscript/precommit,both of which exist, are documented in the README's Entrypoints section, and
are part of the standard entrypoint set.
Raised independently by two reviewers, most recently on PR #32 where the
reviewer had to invoke
script/cibuilddirectly because no make target exists.This matters more than it did before two recent changes:
docker build .fails by design (theCHECK_EPOCHguard),and
README.mdnow tells people to build the image only viascript/cibuildor
script/docker. So the one build path a newcomer is directed to has nomake target, while
make docker— the other path — does.tools. That is impossible for the CI build as things stand.
Fix
Add thin shims, consistent with every existing target:
and add both to
.PHONY.Check
.PHONYis complete while there — it should list every target theMakefiledefines.Definition of done
make cibuildandmake precommitexist and shim to the correspondingscripts, matching the existing target style.
.PHONYlists every target defined in theMakefile.make cibuildsucceeds and its check layer genuinely executes — it must notreport
CACHEDonRUN ... make check(see #23/#30).make precommitsucceeds on a clean tree.names only the scripts, so the two documents agree.
make checkpasses.TODO.mdupdated.Note
script/cibuildrunsdocker build, somake cibuildwill be slow comparedwith other targets. That is expected — it is the CI build — but worth a word in
the README so nobody types it expecting
make checkspeed.Out of scope
script/cibuildorscript/precommitdo.alongside this one.
Two premises in the body are stale after
25b6c0a; DoD item 3 needs restating.Dockerfileno longer runsmake check— it runsscript/testthenscript/fmt-check, and lint runs inDockerfile.lint. So "must not reportCACHEDonRUN ... make check" no longer names a real line. The requirement it stands for survives:make cibuildmust be shown to execute its checks rather than return a warm-cache green, andscript/cibuildnow runsscript/lintfirst, so there are two builds to account for, not one.make lintnow requires buildx. Do not paper over that here; it is #40 .Everything else in the DoD stands. Scope stays exactly what the title says — Makefile shims plus the README wording that makes the two agree. Do not touch
script/cibuildorscript/precommitbehaviour, and leave the README'sscript/lintentry alone; it is owned by #40 .Done in
341c8afonnext, carried by #41 .make cibuildandmake precommitadded as thin shims;.PHONYlists both (it was already complete otherwise). README's Entrypoints section now carries the script-to-target mapping, the two names that differ (script/install-precommitismake hooks,script/precommitismake precommit), and the note thatmake cibuildcosts minutes. Thescript/lintbullet was left alone per #40 .Verification:
make checkgreen,make precommitgreen on a clean tree.make cibuildwas shown to execute rather than replay cache — one invocation, 9.8s wall, ran both builds with distinctCHECK_EPOCHvalues,RUN script/bootstrapCACHEDabove and no check layer cached below: theDockerfile.lintbuild echoedlint epoch: 17863691323256328833837425and printed hugo's build table, then the main image build echoedcheck epoch: 17863691366690793943837425, ranscript/test, and ranscript/fmt-checkfor 3.7s printingAll matched files use Prettier code style!.Buildx was present on the machine used, so the
make lintbuildx dependency did not bite here.