Skip to content

fix(templates): make the default and minimal starters evaluate - #58

Merged
cooper (czxtm) merged 1 commit into
mainfrom
fix/starter-templates-evaluate
Sep 23, 2026
Merged

cooper (czxtm) merged 1 commit into
mainfrom
fix/starter-templates-evaluate

Conversation

@czxtm

Copy link
Copy Markdown
Member

The default and minimal flake templates failed to evaluate, so every project created from them was broken. The template configs copy option examples verbatim, and two of those examples were invalid:

  • The stackpanel.devshell.packages example used name strings ("git", "ripgrep", "nodePackages.typescript"), but the option is listOf package, and nodePackages is also gone from nixpkgs. It now uses pkgs.git, pkgs.ripgrep and pkgs.typescript.
  • The flakeApps example referenced a nonexistent pkgs.web. It now uses pkgs.hello.

Both examples are fixed at their source (core/options/devshell.nix, outputs.nix). The same change is mirrored into both templates and both embedded Go copies, so the next regeneration doesn't reintroduce the breakage.

Verification by the implementer:

  • All 9 templates pass init, lock and devshell evaluation.
  • default and minimal pass nix flake check --no-build, and so does the repo.
  • tests/test-init-equivalence.sh passes.
  • The real generator reproduces the committed blocks.
  • go build passes. go test fails only tests that already fail on main.

Refs stackpanel-thq.20

The starter configs are rendered verbatim from option `example` values by
generate-template-configs, and two of those examples are not valid in a
fresh project. Every project created with `nix flake init -t #default` or
`#minimal` therefore failed to evaluate.

- stackpanel.devshell.packages is `listOf package`. It has never accepted
  package names (name resolution belongs to the top-level
  stackpanel.packages), but its example listed "git", "ripgrep" and
  "nodePackages.typescript", so the devshell failed with the option
  receiving the string "git". nodePackages has also been removed from
  nixpkgs, so the example now uses pkgs.git, pkgs.ripgrep and
  pkgs.typescript.
- The stackpanel.flakeApps example ran "${pkgs.web}/bin/web". There is no
  pkgs.web, so once the devshell evaluated, `nix flake check` still failed
  on apps.web. The example now runs pkgs.hello, matching the program
  option's own example.

The examples are fixed at the source, and the same edit is applied to the
checked-in templates and the CLI's embedded copies so the next regeneration
does not reintroduce the breakage.

Refs: stackpanel-thq.20
@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Preview pr-58 has been destroyed.

@czxtm
cooper (czxtm) merged commit 87d675a into main Sep 23, 2026
13 of 14 checks passed
@czxtm
cooper (czxtm) deleted the fix/starter-templates-evaluate branch September 23, 2026 13:28
@linear-code

linear-code Bot commented Sep 23, 2026

Copy link
Copy Markdown

ENG-839

@github-actions

Copy link
Copy Markdown
Contributor

Docs preview pr-58 has been destroyed.

This branch had an error being deployed

1 failed and 1 active deployments
docs-preview — 05da62a7 Deployed Sep 23, 2026 by czxtm via deploy #193
pr-58 — 05da62a7 Deployed Sep 23, 2026 by czxtm via deploy #208
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