You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mkRustProject drops the .vig-os hook knobs, so the Rust scaffold fails deadnix/statix #1810
A repo scaffolded with the Rust language pack (vigos.lib.mkRustProject, devkit 1.17.0) gets a flake.nix that fails its own pre-commit hooks, and whose .vig-os knobs are silently ignored.
Both come from the same gap: mkRustProject has no branchTypes / commitTypes / refsPolicy / refsOptionalTypes arguments.
Seen in vig-os/stepv.
Problem 1: the knobs don't reach the hooks
The scaffolded flake computes branchTypes, commitTypes, refsPolicy and refsOptionalTypes
from .vig-os (the managed block marked "leave it"), but has nowhere to pass them: mkRustProject
doesn't accept them, unlike mkProjectShell. Setting DEVKIT_BRANCH_TYPES (etc.) in a Rust repo
is therefore silently ignored by the flake-generated branch guard and commit-message hook.
Problem 2: the scaffold fails deadnix and statix
Because those bindings are computed and never used, a fresh Rust scaffold fails:
statix [04]:checks = rust.checks; packages = rust.packages; should be inherit (rust) checks packages;
The first commit touching flake.nix then can't pass the hooks without --no-verify or hand edits
to the managed block. stepv works around it with # deadnix: skip on the five bindings and the inherit.
Proposed solution
Add the four arguments to mkRustProject and forward them as mkProjectShell does, and have the
Rust scaffold pass them, which fixes both problems. Emit inherit (rust) checks packages; in the
template.
Repro
Scaffold a repo with DEVKIT_LANGUAGES=rust on 1.17.0, then run prek run --files flake.nix.
Activity
docs(plan): link every step to its issue; correct the credentials claim
test(nix): mkRustProject must forward the .vig-os hook knobs
fix(nix): forward the .vig-os hook knobs through mkRustProject
fix(nix): forward the .vig-os hook knobs through mkRustProject (#1835)
feat: seed the Rust pack on cold adoption (cargo recipes, tool config…
build: adopt the devkit Rust pack (mkRustProject)
build: adopt the devkit Rust pack (mkRustProject)
chore: release 1.19.0 (#2033)
build: adopt the devkit Rust pack (mkRustProject)