Skip to content

Scaffolded flake breaks on fresh install while devkit main predates the workflow argument #1249

Closed

Description

@c-vigo

Description

The scaffolded flake.nix (#1224) unconditionally forwards the new workflow argument to vigos.lib.mkProjectShell, but its vigos input ships unpinned (github:vig-os/devkit), so a fresh scaffold resolves devkit from main. Until 1.4.1 is promoted, main (= 1.4.0, d16541f5) has no workflow parameter, and every fresh direnv scaffold dies on first shell entry:

error: function 'mkProjectShell' called with unexpected argument 'workflow'
at «github:vig-os/devkit/d16541f5…»/flake.nix:241:9

Live impact (release-blocking)

  • devkit-smoke-test release/1.4.1 PR chore(ci): bump commit-action pins to v0.1.5 #288: both Direnv Smoke jobs (fresh-install and preinstalled) fail with exactly this eval error.
  • The smoke-test rc1 Release dispatch then fails on ERROR: PR #288 has failed CI checks.
  • This deadlocks the promote precondition: devkit promote requires smoke-test's published final 1.4.1, but smoke-test's direnv gate cannot go green until devkit main carries the workflow argument — i.e. after promote.

Also reproduced locally: a fresh install.sh --version 1.4.1-rc1 --mode direnv scaffold cannot enter its shell (works after hand-pinning vigos.url to ?ref=1.4.1-rc1).

Upgrades are NOT affected: flake.nix is on the preserve list (#640), so existing consumers keep their own flake.

Expected Behavior

The template must stay compatible with the floating vigos input resolving to an older devkit. Forward workflow defensively — only when the resolved builder accepts it:

devShells.default = vigos.lib.mkProjectShell (
  { inherit pkgs; extraPackages = extraPackages pkgs; ... }
  // nixpkgs.lib.optionalAttrs
       (builtins.functionArgs vigos.lib.mkProjectShell ? workflow)
       { inherit workflow; }
);

This keeps the unpinned-input design (consumers ride main releases via nix flake update) while making new-template + old-devkit combinations degrade gracefully (gitflow default) instead of failing eval. Same rule for any future forwarded argument.

Fix targets release/1.4.1 (rc respin), like #1216 in the 1.4.0 train.

Found during 1.4.1-rc1 validation, 2026-07-21.

Activity

  1. added this to the 1.4.1 milestone on Jul 22, 2026
  2. added
    bug
    priority:blocking
    area:workspace
    effort:small
    semver:patch
    on Jul 22, 2026
  3. added a commit that references this issue on Jul 23, 2026
  4. added a commit that references this issue on Jul 23, 2026
  5. c-vigo commented on Jul 23, 2026

    @c-vigo
    ContributorAuthor

    Fixed by PR #1252 (functionArgs-guarded workflow forwarding; follow-up e60518b for the #1167 awk anchor), merged into release/1.4.1. Live-proven by the automatic smoke-test chain (Direnv Smoke green at rc2–rc4 and final). Shipped in 1.4.1. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:workspacebugeffort:smallpriority:blockingsemver:patch

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions