Git Product home page Git Product logo

Comments (3)

nmattia avatar nmattia commented on May 21, 2024

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.

ldesgoui avatar ldesgoui commented on May 21, 2024

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.

ldesgoui avatar ldesgoui commented on May 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.