make deps: repair a module cache whose rastrillo extraction lost files
CI failed vet twice on this branch with "pattern locales/*.toml: no matching files found" (and migrations/*.sql, ui/calendar.js) inside the runner's cached amadan.net/rastrillo/rastrillo 29e4491, while the same commit passed here: the runner's extracted copy is missing its embedded files. main only compiled rastrillo's scope package, which embeds nothing, so it never noticed. vet now depends on deps: go mod download, then go mod verify; a module it reports as "dir has been modified" is deleted and extracted again from the checksummed zip. Reproduced with a scratch GOMODCACHE and two deleted files: bare go vet fails exactly as CI did, make vet repairs and passes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+20
−2
Makefile+20 −2
CI passed — run details
CI log
=== vet === amadan.net/oficina/home/handoff v0.0.0-20260908102137-481d2d57f489: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/amadan.net/oficina/home/handoff@v0.0.0-20260908102137-481d2d57f489) amadan.net/rastrillo/rastrillo v0.26.1-0.20260908075707-29e4491631bd: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/amadan.net/rastrillo/rastrillo@v0.26.1-0.20260908075707-29e4491631bd) github.com/BurntSushi/toml v1.6.0: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/github.com/!burnt!sushi/toml@v1.6.0) github.com/carlosframework/rastrillo v0.23.0: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/github.com/carlosframework/rastrillo@v0.23.0) github.com/dustin/go-humanize v1.0.1: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/github.com/dustin/go-humanize@v1.0.1) github.com/go-chi/chi/v5 v5.3.2: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/github.com/go-chi/chi/v5@v5.3.2) github.com/go-json-experiment/json v0.0.0-20250725192818-e39067aee2d2: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/github.com/go-json-experiment/json@v0.0.0-20250725192818-e39067aee2d2) github.com/google/uuid v1.6.0: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/github.com/google/uuid@v1.6.0) github.com/jinzhu/inflection v1.0.0: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/github.com/jinzhu/inflection@v1.0.0) github.com/jinzhu/now v1.1.5: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/github.com/jinzhu/now@v1.1.5) github.com/keymaildev/signin v0.1.1: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/github.com/keymaildev/signin@v0.1.1) github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/github.com/remyoudompheng/bigfft@v0.0.0-20230129092748-24d4a6f8daec) golang.org/x/crypto v0.55.0: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/golang.org/x/crypto@v0.55.0) golang.org/x/sys v0.47.0: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/golang.org/x/sys@v0.47.0) golang.org/x/text v0.41.0: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/golang.org/x/text@v0.41.0) gorm.io/gorm v1.31.2: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/gorm.io/gorm@v1.31.2) gorm.io/plugin/dbresolver v1.6.2: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/gorm.io/plugin/dbresolver@v1.6.2) modernc.org/libc v1.74.1: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/modernc.org/libc@v1.74.1) modernc.org/mathutil v1.7.1: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/modernc.org/mathutil@v1.7.1) modernc.org/memory v1.11.0: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/modernc.org/memory@v1.11.0) modernc.org/sqlite v1.55.0: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/modernc.org/sqlite@v1.55.0) deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/amadan.net/oficina/home/handoff@v0.0.0-20260908102137-481d2d57f489 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/amadan.net/rastrillo/rastrillo@v0.26.1-0.20260908075707-29e4491631bd deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/github.com/!burnt!sushi/toml@v1.6.0 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/github.com/carlosframework/rastrillo@v0.23.0 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/github.com/dustin/go-humanize@v1.0.1 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/github.com/go-chi/chi/v5@v5.3.2 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/github.com/go-json-experiment/json@v0.0.0-20250725192818-e39067aee2d2 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/github.com/google/uuid@v1.6.0 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/github.com/jinzhu/inflection@v1.0.0 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/github.com/jinzhu/now@v1.1.5 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/github.com/keymaildev/signin@v0.1.1 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/github.com/remyoudompheng/bigfft@v0.0.0-20230129092748-24d4a6f8daec deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/golang.org/x/crypto@v0.55.0 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/golang.org/x/sys@v0.47.0 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/golang.org/x/text@v0.41.0 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/gorm.io/gorm@v1.31.2 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/gorm.io/plugin/dbresolver@v1.6.2 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/modernc.org/libc@v1.74.1 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/modernc.org/mathutil@v1.7.1 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/modernc.org/memory@v1.11.0 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__calendar/cache/go-mod/modernc.org/sqlite@v1.55.0 all modules verified go vet ./... go vet -tags browser ./internal/calendartest/ === fmt === === test === go test ./... ? amadan.net/oficina/calendar/cmd/calendar [no test files] ok amadan.net/oficina/calendar/internal/calendar 5.705s ? amadan.net/oficina/calendar/internal/calendar/icons [no test files] ? amadan.net/oficina/calendar/internal/calendar/seal [no test files] ok amadan.net/oficina/calendar/internal/calendartest 3.371s ok amadan.net/oficina/calendar/internal/guardstest 0.143s ? amadan.net/oficina/calendar/scripts/writeestilo [no test files] === migration-check === go tool rastrillo migration check rastrillo migration check: models and migrations agree
diff --git a/Makefile b/Makefile| index e74f5f8..14b14aa 100644 |
| --- a/Makefile |
| +++ b/Makefile |
| @@ -25,7 +25,7 @@ RELEASE_BIN := releases/$(APP)-$(RELEASE_GOOS)-$(RELEASE_GOARCH) |
| # make release VERSION=v0.1.0 |
| VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null) |
| -.PHONY: build release version-check test vet fmt-check migration-check ci browser |
| +.PHONY: build release version-check deps test vet fmt-check migration-check ci browser |
| # build is the compile check: with more than one package matched, go |
| # build discards the output, so this catches a broken package without |
| @@ -84,9 +84,27 @@ version-check: |
| test: |
| go test ./... |
| +# deps makes sure the module cache holds what go.sum says, and repairs it |
| +# when it does not. A CI runner's cache once held an extracted |
| +# amadan.net/rastrillo/rastrillo whose embedded files (locales/*.toml, |
| +# migrations/*.sql, ui/calendar.js) were missing, so vet failed with |
| +# "pattern ...: no matching files found" on every run, while the same |
| +# commit passed here. `go mod verify` names such a directory as "dir has |
| +# been modified"; deleting it lets `go mod download` extract it again |
| +# from the checksummed zip. |
| +deps: |
| + @go mod download |
| + @out=$$(go mod verify 2>&1) || { \ |
| + echo "$$out"; \ |
| + echo "$$out" | sed -n 's/.*: dir has been modified (\(.*\))$$/\1/p' | while read -r dir; do \ |
| + echo "deps: re-extracting $$dir"; chmod -R u+w "$$dir" && rm -rf "$$dir"; \ |
| + done; \ |
| + go mod download && go mod verify; \ |
| + } |
| + |
| # Also vets the browser-tagged tests: they are outside `make ci`, and a |
| # test behind a tag that nothing compiles rots silently. |
| -vet: |
| +vet: deps |
| go vet ./... |
| go vet -tags browser ./internal/calendartest/ |