Repository navigation
Commit e9349eb
committed
perf(nix): follow away fenix's 28 MB rust-analyzer-src
85% of what crane+fenix cost a downstream consumer was one transitive
input devkit never chose. fenix pulls the rust-analyzer SOURCE TREE to
build its *nightly* rust-analyzer derivation — which this pack never
touches, because fromToolchainFile takes its components from the
release-channel manifest instead.
Following it to nixpkgs removes the node outright rather than replacing
it, since every consumer already has nixpkgs. Lock nodes 15 -> 14,
fetched source ~33 MB -> ~5 MB.
Verified rather than reasoned about, because the obvious worry is that
this breaks the rust-analyzer component: built a toolchain from
filesender's rust-toolchain.toml (which lists rust-analyzer) with the
follows in place, and result/bin contains rust-analyzer alongside cargo,
clippy, rustfmt and rustc. filesender's full nix flake check stays green
on all nine checks.
Measured while spiking #1440, which also corrected a claim I had made
about what these inputs cost. Deleting an unreferenced 20.8 MB input from
the store and re-running each operation shows nix eval, flake show, flake
check, flake metadata, develop and build all leave it absent; only flake
archive and re-locking fetch it. So the recurring cost of a shared input
is confined to nix flake update, not to everyday consumer operations.
That measurement is on Nix 2.34.7+1 with fetch-tree and no lazy-trees;
another Nix may differ, and CI images should be re-measured.
This lands the part of #1440 that every reviewer agreed on regardless of
how the larger question goes. Whether crane and fenix belong in devkit at
all is still open there.
Refs: #14401 parent f64240e commit e9349eb
2 files changed
Lines changed: 19 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
51 | 67 | | |
52 | 68 | | |
53 | 69 | | |
| |||
0 commit comments