devenv shell fails after the devenv CLI bump to 2.1.2 #25

Closed
opened 2026-10-07 02:52:59 +01:00 by vnprc-agent · 1 comment
Collaborator

Restore devenv shell in this repo, which stopped working when the fleet's move to nixos-26.05 bumped the devenv CLI from 1.11.1 to 2.1.2.

Primary goals:

  • Shell enters again — devenv shell reaches a prompt with the pinned rustc 1.86.0 and a working cc, as it did before the CLI bump.
  • Toolchain pins untouched — nixpkgs and rust-overlay stay at their current revisions, so the time / serde_with / darling / simple_asn1 MSRV pins in roles/Cargo.lock are unaffected.
  • Lock stops drifting — devenv.lock stops being rewritten on every invocation, so a clean worktree stays clean.
  • Dead task references removed — the task dependencies naming tasks that do not exist are deleted rather than left to fail.

Current state and specifics

Two independent problems, both latent before the CLI bump and both fatal after it.

The git-hooks input. devenv 1.x implicitly injected a git-hooks input into devenv.lock: the committed lock carries git-hooks and a pre-commit-hooks follows in its root inputs even though devenv.yaml never declares either. devenv 2.1.2 does not inject it and strips it from the lock on every run, which is why devenv.lock shows as modified after any invocation. The devenv modules input is still pinned at the 1.7.0-era revision 0d39abfb, whose src/modules/integrations/git-hooks.nix:9 reads or (throw "git-hooks or pre-commit-hooks input required"). The new CLI therefore removes exactly what the pinned modules require, and git checkout devenv.lock does not help because the next run strips it again.

Dead task dependencies. devenv.nix:92-99 and devenv.nix:125 declare before = [ "devenv:processes:proxy" "devenv:processes:pool" ... ] on the create:dirs and build:cdk:cli tasks, but the pinned devenv modules define no devenv:processes:* tasks at all — no devenv module source in the Nix store defines that namespace, and the task runner present is devenv-tasks-1.7.0. The 1.11.1 CLI reported this as a soft TasksNotFound and continued into the shell; 2.1.2 treats it as fatal:

× Task dependencies not found: create:dirs is depending on non-existent devenv:processes:pool, ...

Scope

In scope: pin a git-hooks input in devenv.yaml at revision 80479b6ec16fefd9c1db3ea13aeb038c60530f46, the revision the committed lock already carried, and delete the dead before lists from both tasks.

Out of scope, because each moves the Rust toolchain or does not work:

  • A full devenv update fixes both problems but bumps nixpkgs, moving rustc off 1.86.0 and breaking the MSRV pins tracked in the issue about a fresh protocols/Cargo.lock resolving time 0.3.55.
  • devenv update devenv alone keeps nixpkgs pinned and brings modules that do define devenv:processes:*, but their git-hooks.nix needs cspell, which the pinned May-2025 devenv-nixpkgs does not provide.
  • Current modules with git-hooks pinned back to 80479b6e fails with error: infinite recursion at src/modules/integrations/git-hooks.nix:22.

Also out of scope, tracked separately once confirmed: because the before lists never resolved, create:dirs and build:cdk:cli have had no trigger at all, so the log and database directory creation and the cdk-cli build have not been running ahead of devenv up processes. Rewiring them to a trigger that exists is a follow-up, not part of restoring shell entry.

Restore `devenv shell` in this repo, which stopped working when the fleet's move to `nixos-26.05` bumped the `devenv` CLI from 1.11.1 to 2.1.2. Primary goals: - **Shell enters again** — `devenv shell` reaches a prompt with the pinned `rustc` 1.86.0 and a working `cc`, as it did before the CLI bump. - **Toolchain pins untouched** — `nixpkgs` and `rust-overlay` stay at their current revisions, so the `time` / `serde_with` / `darling` / `simple_asn1` MSRV pins in `roles/Cargo.lock` are unaffected. - **Lock stops drifting** — `devenv.lock` stops being rewritten on every invocation, so a clean worktree stays clean. - **Dead task references removed** — the task dependencies naming tasks that do not exist are deleted rather than left to fail. ### Current state and specifics Two independent problems, both latent before the CLI bump and both fatal after it. **The `git-hooks` input.** `devenv` 1.x implicitly injected a `git-hooks` input into `devenv.lock`: the committed lock carries `git-hooks` and a `pre-commit-hooks` follows in its root inputs even though `devenv.yaml` never declares either. `devenv` 2.1.2 does not inject it and strips it from the lock on every run, which is why `devenv.lock` shows as modified after any invocation. The `devenv` modules input is still pinned at the 1.7.0-era revision `0d39abfb`, whose `src/modules/integrations/git-hooks.nix:9` reads `or (throw "git-hooks or pre-commit-hooks input required")`. The new CLI therefore removes exactly what the pinned modules require, and `git checkout devenv.lock` does not help because the next run strips it again. **Dead task dependencies.** `devenv.nix:92-99` and `devenv.nix:125` declare `before = [ "devenv:processes:proxy" "devenv:processes:pool" ... ]` on the `create:dirs` and `build:cdk:cli` tasks, but the pinned `devenv` modules define no `devenv:processes:*` tasks at all — no `devenv` module source in the Nix store defines that namespace, and the task runner present is `devenv-tasks-1.7.0`. The 1.11.1 CLI reported this as a soft `TasksNotFound` and continued into the shell; 2.1.2 treats it as fatal: ``` × Task dependencies not found: create:dirs is depending on non-existent devenv:processes:pool, ... ``` ### Scope In scope: pin a `git-hooks` input in `devenv.yaml` at revision `80479b6ec16fefd9c1db3ea13aeb038c60530f46`, the revision the committed lock already carried, and delete the dead `before` lists from both tasks. Out of scope, because each moves the Rust toolchain or does not work: - A full `devenv update` fixes both problems but bumps `nixpkgs`, moving `rustc` off 1.86.0 and breaking the MSRV pins tracked in the issue about a fresh `protocols/Cargo.lock` resolving `time` 0.3.55. - `devenv update devenv` alone keeps `nixpkgs` pinned and brings modules that do define `devenv:processes:*`, but their `git-hooks.nix` needs `cspell`, which the pinned May-2025 `devenv-nixpkgs` does not provide. - Current modules with `git-hooks` pinned back to `80479b6e` fails with `error: infinite recursion` at `src/modules/integrations/git-hooks.nix:22`. Also out of scope, tracked separately once confirmed: because the `before` lists never resolved, `create:dirs` and `build:cdk:cli` have had no trigger at all, so the log and database directory creation and the `cdk-cli` build have not been running ahead of `devenv up` processes. Rewiring them to a trigger that exists is a follow-up, not part of restoring shell entry.
Author
Collaborator

Fixed and merged. The devenv CLI bump to 2.1.2 broke shell entry two ways: devenv 1.x implicitly injected a git-hooks input that 2.x strips on every run while the pinned devenv modules still throw without it, and the before = [ "devenv:processes:*" ] lists named tasks this devenv version does not define, which 1.11.1 reported as a soft TasksNotFound and 2.1.2 treats as fatal. Master now declares git-hooks explicitly at rev 80479b6ec16fefd9c1db3ea13aeb038c60530f46 and the dead before-lists are gone. Any branch cut before that fix cannot enter devenv shell at all and needs master merged in first.

Fixed and merged. The devenv CLI bump to 2.1.2 broke shell entry two ways: devenv 1.x implicitly injected a `git-hooks` input that 2.x strips on every run while the pinned devenv modules still throw without it, and the `before = [ "devenv:processes:*" ]` lists named tasks this devenv version does not define, which 1.11.1 reported as a soft TasksNotFound and 2.1.2 treats as fatal. Master now declares `git-hooks` explicitly at rev `80479b6ec16fefd9c1db3ea13aeb038c60530f46` and the dead before-lists are gone. Any branch cut before that fix cannot enter `devenv shell` at all and needs master merged in first.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
vnprc/hashpool#25
No description provided.