Skip to content

build(nix): add llvm-tools to the development shell - #70

Merged
thebrandonlucas merged 1 commit into
masterfrom
chore/flake-llvm-tools
Oct 21, 2026
Merged

thebrandonlucas merged 1 commit into
masterfrom
chore/flake-llvm-tools

Conversation

@tee8z

@tee8z tee8z commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Problem

scripts/crap-report.sh failed in nix develop with this error:

error: failed to find llvm-tools-preview, please install llvm-tools-preview, or set LLVM_COV and LLVM_PROFDATA environment variables

The flake built its toolchain only from rust-toolchain.toml, which lists rustfmt and clippy and not llvm-tools-preview. cargo-llvm-cov needs that component.

Change

  • flake.nix reads rust-toolchain.toml and adds llvm-tools-preview to its components. The channel and profile are still taken from that file.
  • rust-toolchain.toml is unchanged, so CI and rustup users do not download the component.
  • docs/quality.md (CRAP risk check) says that cargo-llvm-cov needs the component, that the Nix shell includes it, and how a rustup user adds it.

Checks

  • On this branch, in nix develop: cargo fmt --check, cargo clippy --locked --all-targets -- -D warnings, cargo machete --with-metadata, cargo test --locked (108 unit, 91 integration) and python3 scripts/check-coverage.py pass. rustc is 1.98.1, as pinned, and its sysroot holds the LLVM tools.
  • CRAP: not required, because no file in src/ or tests/ changed. With this flake, scripts/crap-report.sh ran to completion on the head of feat(cli): name VOLTAGE_API_KEY and the organization source on a 403 #66: 0 of 527 measured functions at or above 20, highest wait_for_payment at 19.60.
  • I evaluated and ran only the x86_64 Linux shell. The other three shell targets get the same component list, but I did not build them.
  • cargo-llvm-cov and knots are still not in the flake. Install them as docs/quality.md describes.
  • The no-changelog label is set, because the change is to development tooling and is not user-visible.

scripts/crap-report.sh runs cargo-llvm-cov, which needs the
llvm-tools-preview component. The Nix shell installed only the
components in rust-toolchain.toml, so the report failed there. The
flake now adds llvm-tools-preview to those components. CI and rustup
users still install only rust-toolchain.toml.
@tee8z tee8z added the no-changelog Skip the Changelog check: the change has no user-visible effect label Oct 21, 2026
@tee8z tee8z self-assigned this Oct 21, 2026
@tee8z
tee8z requested a review from thebrandonlucas October 21, 2026 14:08
@thebrandonlucas
thebrandonlucas merged commit 905cf4e into master Oct 21, 2026
8 checks passed
@thebrandonlucas
thebrandonlucas deleted the chore/flake-llvm-tools branch October 21, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Skip the Changelog check: the change has no user-visible effect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants