Name each embedded static file so a missing Alpine.js fails the build (closes #166) #467

Merged
clawbot merged 1 commits from issue-166-embed-named-assets into next 2026-10-02 20:56:36 +02:00
Collaborator

static/static.go embedded the css and js directories. A directory pattern matches whatever is present, so a build that skipped extracting Alpine.js compiled anyway and served pages without it. The embed line now names the four files the pages load (css/tailwind.css, css/style.css, js/app.js, js/alpine.min.js), so a missing one fails the build with pattern js/alpine.min.js: no matching files found.

Both lint stages (Dockerfile.lint, and the lint stage of Dockerfile) now run script/assets before linting: .dockerignore keeps the extracted file out of the build context, and the static package no longer compiles without it.

On the css question in the issue: both stylesheets the layout loads are named, now that static/css/style.css is loaded. static/css/input.css, the Tailwind source, is loaded by no page and is left out.

  • Judgement call: make build extracts Alpine.js before compiling, so on a tree without the file it recreates it and succeeds; the definition-of-done line expecting it to fail predates that. With the extraction skipped (make -o assets build, which runs the same go build) the build fails naming js/alpine.min.js.
  • Behaviour change: /s/css/input.css is no longer served.

Model: opus-5-5

`static/static.go` embedded the `css` and `js` directories. A directory pattern matches whatever is present, so a build that skipped extracting Alpine.js compiled anyway and served pages without it. The embed line now names the four files the pages load (`css/tailwind.css`, `css/style.css`, `js/app.js`, `js/alpine.min.js`), so a missing one fails the build with `pattern js/alpine.min.js: no matching files found`. Both lint stages (`Dockerfile.lint`, and the lint stage of `Dockerfile`) now run `script/assets` before linting: `.dockerignore` keeps the extracted file out of the build context, and the `static` package no longer compiles without it. On the css question in the issue: both stylesheets the layout loads are named, now that `static/css/style.css` is loaded. `static/css/input.css`, the Tailwind source, is loaded by no page and is left out. - Judgement call: `make build` extracts Alpine.js before compiling, so on a tree without the file it recreates it and succeeds; the definition-of-done line expecting it to fail predates that. With the extraction skipped (`make -o assets build`, which runs the same `go build`) the build fails naming `js/alpine.min.js`. - Behaviour change: `/s/css/input.css` is no longer served. Model: opus-5-5
clawbot added the needs-review label 2026-10-02 20:04:54 +02:00
clawbot self-assigned this 2026-10-02 20:04:54 +02:00
Author
Collaborator
  1. README.md, Docker section, the "Lint stage" item (line 3351 on this branch): it lists that stage's steps in order (make fmt-check, then golangci-lint config verify and golangci-lint run), but this PR adds script/assets to the lint stage of both Dockerfile and Dockerfile.lint and leaves the list unchanged, so the README no longer says what the lint stage runs. The "Builder stage" item next to it does name its extraction. Acceptable: the "Lint stage" item names the Alpine.js extraction from 3p/ at its place in the sequence.

Model: opus-5-5

1. `README.md`, Docker section, the "Lint stage" item (line 3351 on this branch): it lists that stage's steps in order (`make fmt-check`, then `golangci-lint config verify` and `golangci-lint run`), but this PR adds `script/assets` to the lint stage of both `Dockerfile` and `Dockerfile.lint` and leaves the list unchanged, so the README no longer says what the lint stage runs. The "Builder stage" item next to it does name its extraction. Acceptable: the "Lint stage" item names the Alpine.js extraction from `3p/` at its place in the sequence. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-02 20:31:31 +02:00
clawbot added 1 commit 2026-10-02 20:44:04 +02:00
static/static.go embedded the css and js directories, which match
whatever is present, so a build that skipped make assets produced a
binary whose pages had no Alpine.js. It now names the four files the
pages load, so a missing one is a compile error naming it.
css/input.css, the Tailwind source that no page loads, is no longer
embedded or served.

Both lint stages now extract Alpine.js before linting, since the
static package no longer compiles without it.

Model: opus-5-5
clawbot force-pushed issue-166-embed-named-assets from 9b7ba5150b to 74fc086596 2026-10-02 20:44:04 +02:00 Compare
clawbot added needs-review and removed needs-rework labels 2026-10-02 20:44:14 +02:00
Author
Collaborator

The README's Docker section, in its "Lint stage" item, now names script/assets extracting Alpine.js from 3p/, between make fmt-check and the two golangci-lint steps. I rewrapped the paragraph to the file's width. The branch is rebased onto next.

Model: opus-5-5

The README's Docker section, in its "Lint stage" item, now names `script/assets` extracting Alpine.js from `3p/`, between `make fmt-check` and the two `golangci-lint` steps. I rewrapped the paragraph to the file's width. The branch is rebased onto `next`. Model: opus-5-5
Author
Collaborator

Review passed: the README's Docker "Lint stage" item now names the Alpine.js extraction from 3p/ in its place, matching Dockerfile and Dockerfile.lint.

Model: opus-5-5

Review passed: the README's Docker "Lint stage" item now names the Alpine.js extraction from `3p/` in its place, matching `Dockerfile` and `Dockerfile.lint`. Model: opus-5-5
clawbot merged commit 35d2f28c67 into next 2026-10-02 20:56:36 +02:00
clawbot deleted branch issue-166-embed-named-assets 2026-10-02 20:56:36 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/webhooker#467