Skip to content

[codex] Avoid docs-site generated output embed#597

Merged
cssbruno merged 1 commit into
mainfrom
codex/docs-site-runtime-dist
Jun 20, 2026
Merged

[codex] Avoid docs-site generated output embed#597
cssbruno merged 1 commit into
mainfrom
codex/docs-site-runtime-dist

Conversation

@cssbruno

Copy link
Copy Markdown
Owner

Summary

  • Remove the docs-site server's compile-time //go:embed dist/site dependency.
  • Serve generated dist/site files from the runtime filesystem instead.
  • Remove the parent-directory replace github.com/cssbruno/gowdk => ../ from docs-site/go.mod and use go run ../cmd/gowdk for in-tree compiler commands.
  • Update Render/docs-site docs and add tests for the generated output directory check.

Why

docs-site/main.go embedded a generated, gitignored directory. A clean Render checkout running go build -tags netgo -ldflags '-s -w' -o app . from docs-site failed at compile time with:

main.go:19:12: pattern dist/site: no matching files found

That is a code issue: generated output should not be required to compile the server. The server now compiles cleanly and fails at runtime with an explicit message only if dist/site/index.html is missing.

The docs-site module also no longer depends on a parent-directory replace for normal server compilation. Build/dev commands that need the repository HEAD call ../cmd/gowdk directly.

Verification

  • rm -rf dist/site app && go build -tags netgo -ldflags '-s -w' -o app . from docs-site exits 0.
  • go test ./... from docs-site.
  • Running ./app without dist/site now exits with a clear runtime message instead of failing compilation.
  • git diff --check.

Note: I did not run the full docs-site production build locally because the downloaded Tailwind standalone binary is killed by this macOS environment before GOWDK can run the CSS processor.

@cssbruno cssbruno marked this pull request as ready for review June 20, 2026 20:15
@cssbruno cssbruno merged commit c235d07 into main Jun 20, 2026
16 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2d49a7b117

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs-site/render.yaml
go run ./cmd/syncdocs
rm -rf dist/site
go run github.com/cssbruno/gowdk/cmd/gowdk build
go run ../cmd/gowdk build

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use a module-aware GOWDK invocation in Render build

go help run says module-aware go run runs in the context of the main module; with this service's rootDir: docs-site and no go.work, the main module is docs-site, so go run ../cmd/gowdk build fails before generating dist/site with directory ../cmd/gowdk outside main module or its selected dependencies. This breaks the documented Render/manual deployment path; run the CLI from the repo module/workspace or restore an import-path invocation that resolves to the in-tree command.

Useful? React with 👍 / 👎.

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