Repository navigation
build: add zizmor and cargo-dist to the dev shell - #171
Merged
Merged
Conversation
Agents ran these through nix shell, which needed approval every time. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
nixpkgs ships 0.31.0, but Cargo.toml and the release workflow pin 0.30.2, so dist plan exited 255 on the version mismatch. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
flake の devShell に
zizmorとcargo-dist(実行名dist)を追加する.これまでエージェントはnix shell nixpkgs#zizmorなどを都度実行し,そのたびに承認が必要だった.変更内容
flake.nixの devShellpackagesにzizmorとcargo-distを追加Cargo.tomlとrelease_artifacts.ymlは 0.30.2 に固定されており,dist planがバージョン不一致で終了コード 255 になる.そのためoverrideAttrsで devShell の cargo-dist を 0.30.2 に固定した(srcとcargoHashは実ビルドで算出)方針の選択理由
プロジェクト側を 0.31.0 へ上げる案もあったが,
release_artifacts.ymlがCARGO_DIST_VERSION: 0.30.2を直書きしており,tests/release_distribution.rsがCargo.tomlと workflow の一致を検証している.workflow の変更が必須になる(エージェントの App は push できない)ため,workflow に触れない Nix override を採用した.検証
nix develop -c zizmor --version→zizmor 1.31.0nix develop -c dist --version→cargo-dist 0.30.2nix develop -c dist plan --output-format=json→ 終了コード 0nix develop -c cargo test --test release_distribution→ 3 passednix flake check→ all checks passed備考
cargo-dist を更新するときは
Cargo.toml,release_artifacts.yml,flake.nixの override の 3 か所を合わせる必要がある.devShell 外で両ツールを実行している箇所:.github/workflows/gha_lint.yml:zizmorcore/zizmor-action(本体は既定の latest).github/workflows/release_artifacts.yml: cargo-dist を個別にインストールして実行.github/workflows/release_please.yml: 上記を間接的に起動lefthook は両ツールを実行していない.
Refs furedea/dotfiles#264
🤖 Generated with Claude Code