Comments (3)
Definitely. Just override the cargoTestCommands
(see the configuration doc) and add (for instance) clippy to the nativeBuildInputs
in override
. Just make sure that doCheck
is set.
from naersk.
That seems fine on some projects, but it seems like some dependencies cause trouble, namely proc_macro_hack
via const-random
or wasm_bindgen_macro
via wasm-bindgen
(build deps only?)
these derivations will be built:
/nix/store/hkrjjj53jf9x8ps3gfch7149jz8v2wm3-rust-workspace-unknown.drv
building '/nix/store/hkrjjj53jf9x8ps3gfch7149jz8v2wm3-rust-workspace-unknown.drv'...
unpacking sources
unpacking source archive /nix/store/4a8aqp67p0n1j21w9mkqgjinhza3hzqc-source
source root is source
patching sources
configuring
[naersk] cargo_version (read): 1.48.0-nightly (9d1a4863a 2020-10-05)
[naersk] cargo_message_format (set): json-diagnostic-rendered-ansi
[naersk] cargo_release: --release
[naersk] cargo_options: -Z unstable-options
[naersk] cargo_build_options: $cargo_release -j "$NIX_BUILD_CORES" --out-dir out --message-format=$cargo_message_format
[naersk] cargo_test_options: $cargo_release -j "$NIX_BUILD_CORES"
[naersk] RUST_TEST_THREADS: 4
[naersk] cargo_bins_jq_filter: select(.reason == "compiler-artifact" and .executable != null and .profile.test == false)
[naersk] cargo_build_output_json (created): /build/tmp.xRCWxwW5Na
[naersk] crate_sources: /nix/store/2w48j9x6kf854gl6m0af7i8z7q6pl5qn-crates-io
[naersk] RUSTFLAGS:
[naersk] CARGO_BUILD_RUSTFLAGS:
[naersk] CARGO_BUILD_RUSTFLAGS (updated): --remap-path-prefix /nix/store/2w48j9x6kf854gl6m0af7i8z7q6pl5qn-crates-io=/sources
[naersk] pre-installing dep /nix/store/l1xc4v4lfsam6888vv498ywrcfm658gn-rust-workspace-deps-unknown
building
cargo -Z unstable-options build $cargo_release -j "$NIX_BUILD_CORES" --out-dir out --message-format=$cargo_message_format
Compiling naersk-test v0.1.0 (/build/source/naersk-test)
Finished release [optimized] target(s) in 0.14s
running tests
cargo -Z unstable-options test $cargo_release -j "$NIX_BUILD_CORES"
Compiling naersk-test v0.1.0 (/build/source/naersk-test)
Finished release [optimized] target(s) in 0.18s
Running target/release/deps/wasm_test-368f5d4a0dc7dd52
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
cargo -Z unstable-options clippy $cargo_release -j "$NIX_BUILD_CORES"
Checking const-random v0.1.11
error[E0463]: can't find crate for `proc_macro_hack`
--> /sources/const-random-0.1.11/src/lib.rs:2:5
|
2 | use proc_macro_hack::proc_macro_hack;
| ^^^^^^^^^^^^^^^ can't find crate
error: aborting due to previous error
For more information about this error, try `rustc --explain E0463`.
error: could not compile `const-random`
To learn more, run the command again with --verbose.
builder for '/nix/store/hkrjjj53jf9x8ps3gfch7149jz8v2wm3-rust-workspace-unknown.drv' failed with exit code 101
error: build of '/nix/store/hkrjjj53jf9x8ps3gfch7149jz8v2wm3-rust-workspace-unknown.drv' failed
It also forces clippy to run and pass on every build, I could live with it but I'd rather have it run in a different GitLab job that's allowed to fail.
from naersk.
I came back to this, the failure only happens when I mix and match nightly cargo and stable rust, when they're both nightly it's fine! Closing
from naersk.
Related Issues (20)
- Building crate that has a git submodule that is a crate that one depends on as a path dependency seems to fail? HOT 4
- no matching package named `sea-orm` HOT 4
- Cargo/rustc linker serach path when in developer shell HOT 7
- how do i build examples like cargo build --example example_name HOT 3
- Passing options to clippy HOT 2
- Monorepo with multiple crates that can not share a workspace is not possible to build? HOT 6
- Project's build.rs file not getting executed at all HOT 2
- Issues with `autocxx` in sandbox. HOT 14
- dummy-src build failed with "cp: missing file operand" HOT 4
- missing field `unused` for key `patch` HOT 1
- Error when using a `git` dependency that includes a workspace, when the flake is also in a workspace HOT 4
- `unpack-*` derivations end up in closure HOT 1
- The 'proper' way of doing a debug build? HOT 4
- Looking for a maintainer HOT 2
- Dependencies with inherited workspace info fails with parse error HOT 4
- How to build tauri with naersk? HOT 1
- Looking for a maintainer
- getting file/folder permission issue when building
- Nix store output path is empty unless `name` is specified
- Binaries missing from `$out/bin/` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from naersk.