-
Hello! I'm currently having problems building my crate with crane, as trying to do so errors on a build script:
To reproduce, one can run this command: It works fine in the development shell of that flake. I've tried looking for a reason for this everywhere, but have not found anything :/ Thanks for insights! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Thanks for the report @TheNeikos ! One thing I noticed about your flake is that the
# Transcribed for posterity
let
cargoArtifacts = craneLib.buildDepsOnly {
inherit src;
};
cloudmqtt = craneLib.buildPackage {
inherit cargoArtifacts src version;
cargoExtraArgs = "--all-features --all";
};
in
{
checks = {
inherit cloudmqtt;
cloudmqtt-clippy = craneLib.cargoClippy {
inherit cargoArtifacts src;
cargoExtraArgs = "--all --all-features";
cargoClippyExtraArgs = "-- --deny warnings";
};
};
} |
Beta Was this translation helpful? Give feedback.
Thanks for the report @TheNeikos !
One thing I noticed about your flake is that the
buildDepsOnly
closure is not building the entire workspace, while the clippy derivation builds all crates with all features. Although you likely don't want to be doing this (for caching efficiency, changing the flags will require cargo to rebuild parts of the dependency closure which won't get cached) it seems to be tickling the actual bug. Here's what I think is happeningmemchr
somewherememchr'
s build script, which is writable and executable, and runs it with no problem