mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-22 23:17:15 +03:00
docs: add section about using different toolchains (#256)
This commit is contained in:
parent
685e7494b0
commit
ac145b7ae5
@ -26,6 +26,7 @@
|
||||
* [Customizing nixpkgs and other inputs](./faq/custom-nixpkgs.md)
|
||||
* [IFD (import from derivation) errors](./faq/ifd-error.md)
|
||||
* [Constantly rebuilding from scratch](./faq/constant-rebuilds.md)
|
||||
* [Crates being rebuilt when using different toolchains](./faq/rebuilds-with-different-toolchains.md)
|
||||
* [Building upstream cargo crate with no `Cargo.lock`](./faq/no-cargo-lock.md)
|
||||
* [Patching `Cargo.lock` during build](./faq/patching-cargo-lock.md)
|
||||
* [Building a subset of a workspace](./faq/build-workspace-subset.md)
|
||||
|
15
docs/faq/rebuilds-with-different-toolchains.md
Normal file
15
docs/faq/rebuilds-with-different-toolchains.md
Normal file
@ -0,0 +1,15 @@
|
||||
## Dependencies being rebuilt even with proper source filtering applied
|
||||
|
||||
If the dependency crates are being rebuilt even after proper source filtering
|
||||
has been applied (i.e. the `crate-depsOnly` derivation is NOT being rebuilt)
|
||||
check that the same Rust/Cargo toolchain is being used when building artifacts
|
||||
and vendoring crate sources.
|
||||
|
||||
The crate artifacts can only be used for the same compiler version, so if cargo
|
||||
sees artifacts for the wrong toolchain it will rebuild everything from scratch.
|
||||
|
||||
Note that each instance of `crane` tied to a single Rust toolchain (by default
|
||||
the one available in `nixpkgs`, but this can be overridden by the caller). If
|
||||
you are using multiple `craneLib` instantiations and you see this occurring,
|
||||
double check that they aren't being created with a different toolchain
|
||||
(especially if cross-compilation is being used for the project).
|
Loading…
Reference in New Issue
Block a user