Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_opening_simple_nft_manifest_should_return_fresh_analysis is failing after compiling with my nix package definition #1546

Open
malikwirin opened this issue Aug 24, 2024 · 5 comments
Assignees

Comments

@malikwirin
Copy link

I am currently trying to package clarinet for NixOS like I talked about in #1515 .
I have the following package definition:

{
  lib,
  rustPlatform,
  fetchFromGitHub,
  pkg-config,
  rust-jemalloc-sys,
  sqlite,
  zstd,
  stdenv,
  darwin ? null,
}:

rustPlatform.buildRustPackage rec {
  pname = "clarinet";
  version = "2.8.0";

  src = fetchFromGitHub {
    owner = "hirosystems";
    repo = "clarinet";
    rev = "v${version}";
    hash = "sha256-Eigyh09E9stQ1Z23Ao0Aa9JMjs6YCbzZyEjXdXc2xBY=";
  };

  cargoLock = {
    lockFile = ./Cargo.lock;
    outputHashes = {
      "chainhook-sdk-0.12.11" = "sha256-uJB+SEBBqWtkFi55GMohm5SgQtuYbBa5gnNGo/Hq2oU=";
      "clar2wasm-0.1.0" = "sha256-Mbjwawscfe3PN6en5vRDL6pvbA4h+uUvv/E+h5BGRhg=";
      "clarity-2.3.0" = "sha256-FHpWC5AYncbhj1s1tU7Bfctqk5FRLaQmPkqbGnSno/U=";
      "schemars-0.8.16" = "sha256-xg7TUTxo+7vDSOQQuWkTl0ajcvO9iP9IP8x8uWUcFqM=";
    };
  };

  nativeBuildInputs = [
    pkg-config
  ];

  buildInputs = [
    rust-jemalloc-sys
    sqlite
    zstd
  ] ++ lib.optionals stdenv.isDarwin [
    darwin.apple_sdk.frameworks.Security
  ];

  env = {
    ZSTD_SYS_USE_PKG_CONFIG = true;
  };

  meta = {
    description = "Write, test and deploy high-quality smart contracts to the Stacks blockchain and Bitcoin";
    homepage = "https://github.com/hirosystems/clarinet";
    changelog = "https://github.com/hirosystems/clarinet/blob/${src.rev}/CHANGELOG.md";
    license = lib.licenses.gpl3Only;
    maintainers = with lib.maintainers; [ ];
    mainProgram = "clarinet";
  };
}

There is also a Cargo.lock file in the directory of the nix file. I can post its content if necessary.
The build phase runs successful, but the checkPhase doesn't. With the following log:

   Compiling stacks-network v2.8.0 (/build/source/components/stacks-network)
   Compiling clarinet-cli v2.8.0 (/build/source/components/clarinet-cli)
    Finished release [optimized] target(s) in 16m 39s
Executing cargoInstallPostBuildHook
Finished cargoInstallPostBuildHook
Finished cargoBuildHook
buildPhase completed in 16 minutes 40 seconds
@nix { "action": "setPhase", "phase": "checkPhase" }
Running phase: checkPhase
Executing cargoCheckHook
++ cargo test -j 8 --profile release --target x86_64-unknown-linux-gnu --frozen -- --test-threads=8
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /build/source/components/clarinet-sdk-wasm/Cargo.toml
workspace: /build/source/Cargo.toml
   Compiling sha2-asm v0.6.3
   Compiling secp256k1-sys v0.6.1
   Compiling ittapi-sys v0.4.0
   Compiling psm v0.1.21
   Compiling wasmtime-runtime v15.0.1
   Compiling p256k1 v7.1.0
   Compiling libsqlite3-sys v0.28.0
   Compiling ring v0.17.3
   Compiling sha2-asm v0.5.5
   Compiling stacker v0.1.15
   Compiling serde_stacker v0.1.7
   Compiling secp256k1-sys v0.9.2
   Compiling sha2 v0.10.8
   Compiling wasmtime-cache v15.0.1
   Compiling ed25519-dalek v2.1.1
   Compiling ittapi v0.4.0
   Compiling wasmtime-jit v15.0.1
   Compiling pbkdf2 v0.12.2
   Compiling clarinet-utils v1.0.0 (/build/source/components/clarinet-utils)
   Compiling wasmtime v15.0.1
   Compiling wsts v9.0.0
   Compiling secp256k1 v0.24.3
   Compiling bitcoin v0.29.2
   Compiling secp256k1 v0.28.2
   Compiling bitcoin v0.31.2
   Compiling bitcoincore-rpc-json v0.16.0
   Compiling bitcoincore-rpc-json v0.18.0
   Compiling bitcoincore-rpc v0.16.0
   Compiling miniscript v11.0.0
   Compiling rustls v0.22.4
   Compiling rustls-webpki v0.102.5
   Compiling bitcoincore-rpc v0.18.0
   Compiling tokio-rustls v0.25.0
   Compiling hyper-rustls v0.26.0
   Compiling reqwest v0.12.4
   Compiling segment v0.2.4
   Compiling rusqlite v0.31.0
   Compiling stacks-common v0.0.2 (https://github.com/stacks-network/stacks-core.git?branch=feat/clarity-wasm-develop#71604184)
   Compiling clarity v2.3.0 (https://github.com/stacks-network/stacks-core.git?branch=feat/clarity-wasm-develop#71604184)
   Compiling clar2wasm v0.1.0 (https://github.com/stacks-network/clarity-wasm.git?branch=main#8ce55662)
   Compiling pox-locking v2.4.0 (https://github.com/stacks-network/stacks-core.git?branch=feat/clarity-wasm-develop#71604184)
   Compiling stacks-codec v2.8.0 (/build/source/components/stacks-codec)
   Compiling libstackerdb v0.0.1 (https://github.com/stacks-network/stacks-core.git?branch=feat/clarity-wasm-develop#71604184)
   Compiling stacks-rpc-client v2.8.0 (/build/source/components/stacks-rpc-client)
   Compiling chainhook-sdk v0.12.11 (https://github.com/hirosystems/chainhook.git#c9675894)
   Compiling clarity-repl v2.8.0 (/build/source/components/clarity-repl)
   Compiling stackslib v0.0.1 (https://github.com/stacks-network/stacks-core.git?branch=feat/clarity-wasm-develop#71604184)
   Compiling clarinet-files v2.8.0 (/build/source/components/clarinet-files)
   Compiling clarinet-deployments v2.8.0 (/build/source/components/clarinet-deployments)
   Compiling clarity-lsp v2.8.0 (/build/source/components/clarity-lsp)
   Compiling stacks-network v2.8.0 (/build/source/components/stacks-network)
   Compiling clarinet-cli v2.8.0 (/build/source/components/clarinet-cli)
    Finished release [optimized] target(s) in 9m 17s
     Running unittests src/lib.rs (target/x86_64-unknown-linux-gnu/release/deps/clarinet_lib-91ea96d80b0ad8de)

running 5 tests
test frontend::cli::tests::test_sanitize_project_name ... ok
test frontend::cli::tests::test_completion_for_shells ... ok
test lsp::test_opening_simple_nft_manifest_should_return_fresh_analysis ... FAILED
test lsp::test_opening_counter_manifest_should_return_fresh_analysis ... ok
test lsp::test_opening_counter_contract_should_return_fresh_analysis ... ok

failures:

---- lsp::test_opening_simple_nft_manifest_should_return_fresh_analysis stdout ----
thread 'lsp::test_opening_simple_nft_manifest_should_return_fresh_analysis' panicked at components/clarinet-cli/src/lsp/mod.rs:231:5:
assertion `left == right` failed
  left: 0
 right: 1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    lsp::test_opening_simple_nft_manifest_should_return_fresh_analysis

test result: FAILED. 4 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.15s

error: test failed, to rerun pass `--lib`

Inside the failing test response.aggregated_diagnostics.len() returns 0 even though it should return 1.
What may cause this?

@github-project-automation github-project-automation bot moved this to 🆕 New in DevTools Aug 24, 2024
@andresgalante andresgalante moved this from 🆕 New to 📋 Backlog in DevTools Aug 26, 2024
@andresgalante andresgalante moved this from 📋 Backlog to 🆕 New in DevTools Aug 26, 2024
@hugocaillard
Copy link
Collaborator

Hello @malikwirin
Thanks for reporting, I'm looking into this now.

Couple of things to consider:

  • do you have the control over which command is executed to run the tests?
    Looks like it runs cargo test -j 8 ..., ideally, we would want to run cargo tst which is an alias for cargo nextest.

But this is a side note, I don't think it would actually fix the issue.

  • do you have the possibility to add a log an re-run the test?
    I don't know how to reproduce so I'll have to rely on you for debugging.
    It would be helpful to add a log here to know what's the value of the manifest_location.
    I have no idea to know what could cause this particular test to fail depending on the env

@hugocaillard hugocaillard moved this from 🆕 New to 🏗 In Progress in DevTools Aug 29, 2024
@hugocaillard hugocaillard self-assigned this Aug 29, 2024
@malikwirin
Copy link
Author

Hi @hugocaillard
Thanks for your response. I am very busy but still very determined to get it packaged for nix eventually.
For the test comand:

rustPlatform.buildRustPackage {
  /* ... */
  useNextest = true;

  checkFlags = [
    "--workspace --locked --exclude clarinet-sdk-wasm --exclude clarity-jupyter-kernel"
  ];
}

Currently I am doing this for my setup but I could imagine upstreaming it when it follows best practices.
I am currently not sure where. You could propably eventually write everything into a single flake.nix and have it in the root directory of clarinet like how its done in many projects. Maybe Nix-Bitcoin would accept it and eventually the regular nixpkgs.

Opening up such a Pull Request would enable more people to debug this.
But I will give you info when rebuilding it with the new testing config.

@malikwirin
Copy link
Author

This did not work actually it should have been

rust.Platform.buildRustPackage {
  /* ... */
  useNextest = true;

  checkPhase = ''
    cargo tst
  '';
}

So we are making progress. This time I had 174 passing tests.

     Running [ 00:00:02] [=>    ] 142/460: 8 running, 142 passed, 0 skipped     ^M     Running [ 00:00:02] [=>    ] 143/460: 7 running, 143 passed, 0 skipped     ^M        PASS [   0.056s] clarity-repl analysis::check_checker::tests::trusted_caller
     Running [ 00:00:02] [=>    ] 143/460: 8 running, 143 passed, 0 skipped     ^M     Running [ 00:00:02] [=>    ] 143/460: 8 running, 143 passed, 0 skipped     ^M     Running [ 00:00:02] [=>    ] 144/460: 7 running, 144 passed, 0 skipped     ^M        PASS [   0.056s] clarity-repl analysis::check_checker::tests::trusted_caller_after
     Running [ 00:00:02] [=>    ] 144/460: 8 running, 144 passed, 0 skipped     ^M     Running [ 00:00:02] [=>    ] 145/460: 7 running, 145 passed, 0 skipped     ^M        PASS [   0.056s] clarity-repl analysis::check_checker::tests::trusted_caller_disabled
     Running [ 00:00:02] [=>    ] 145/460: 8 running, 145 passed, 0 skipped     ^M     Running [ 00:00:02] [=>    ] 145/460: 8 running, 145 passed, 0 skipped     ^M     Running [ 00:00:02] [=>    ] 146/460: 7 running, 146 passed, 0 skipped     ^M        PASS [   0.056s] clarity-repl analysis::check_checker::tests::trusted_sender
     Running [ 00:00:02] [=>    ] 146/460: 8 running, 146 passed, 0 skipped     ^M     Running [ 00:00:02] [=>    ] 147/460: 7 running, 147 passed, 0 skipped     ^M     Running [ 00:00:02] [=>    ] 147/460: 8 running, 147 passed, 0 skipped     ^M        PASS [   0.056s] clarity-repl analysis::check_checker::tests::trusted_sender_after
     Running [ 00:00:02] [=>    ] 147/460: 8 running, 147 passed, 0 skipped     ^M     Running [ 00:00:02] [=>    ] 148/460: 7 running, 148 passed, 0 skipped     ^M        PASS [   0.056s] clarity-repl analysis::check_checker::tests::trusted_sender_disabled
     Running [ 00:00:02] [=>    ] 148/460: 8 running, 148 passed, 0 skipped     ^M     Running [ 00:00:02] [=>    ] 149/460: 7 running, 149 passed, 0 skipped     ^M        PASS [   0.057s] clarity-repl analysis::check_checker::tests::unchecked_params_safe
     Running [ 00:00:02] [=>    ] 149/460: 8 running, 149 passed, 0 skipped     ^M     Running [ 00:00:02] [=>    ] 149/460: 8 running, 149 passed, 0 skipped     ^M     Running [ 00:00:02] [=>    ] 150/460: 7 running, 150 passed, 0 skipped     ^M        PASS [   0.057s] clarity-repl analysis::check_checker::tests::unchecked_params_safe_after
     Running [ 00:00:02] [=>    ] 150/460: 8 running, 150 passed, 0 skipped     ^M     Running [ 00:00:02] [=>    ] 151/460: 7 running, 151 passed, 0 skipped     ^M     Running [ 00:00:02] [=>    ] 151/460: 8 running, 151 passed, 0 skipped     ^M        PASS [   0.059s] clarity-repl analysis::coverage_tests::branch_if_plus_and
     Running [ 00:00:02] [=>    ] 151/460: 8 running, 151 passed, 0 skipped     ^M     Running [ 00:00:02] [=>    ] 152/460: 7 running, 152 passed, 0 skipped     ^M        PASS [   0.060s] clarity-repl analysis::coverage_tests::branch_if_plus_or
     Running [ 00:00:02] [=>    ] 152/460: 8 running, 152 passed, 0 skipped     ^M     Running [ 00:00:02] [=>    ] 152/460: 8 running, 152 passed, 0 skipped     ^M     Running [ 00:00:02] [=>    ] 153/460: 7 running, 153 passed, 0 skipped     ^M        PASS [   0.061s] clarity-repl analysis::coverage_tests::filter_iterator
     Running [ 00:00:02] [=>    ] 153/460: 8 running, 153 passed, 0 skipped     ^M     Running [ 00:00:02] [==>   ] 154/460: 7 running, 154 passed, 0 skipped     ^M        PASS [   0.060s] clarity-repl analysis::coverage_tests::fold_iterator
     Running [ 00:00:03] [==>   ] 154/460: 8 running, 154 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 154/460: 8 running, 154 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 155/460: 7 running, 155 passed, 0 skipped     ^M        PASS [   0.094s] clarity-repl analysis::coverage_tests::function_hit_should_have_line_hit
     Running [ 00:00:03] [==>   ] 155/460: 8 running, 155 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 155/460: 8 running, 155 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 155/460: 7 running, 156 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 156/460: 7 running, 156 passed, 0 skipped     ^M        PASS [   0.124s] clarity-repl analysis::coverage_tests::hit_all_if_branches
     Running [ 00:00:03] [==>   ] 156/460: 8 running, 156 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 157/460: 7 running, 157 passed, 0 skipped     ^M        PASS [   0.060s] clarity-repl analysis::coverage_tests::line_count_in_iterator
     Running [ 00:00:03] [==>   ] 157/460: 8 running, 157 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 157/460: 8 running, 157 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 158/460: 7 running, 158 passed, 0 skipped     ^M        PASS [   0.128s] clarity-repl analysis::coverage_tests::let_binding
     Running [ 00:00:03] [==>   ] 158/460: 8 running, 158 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 158/460: 8 running, 158 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 159/460: 7 running, 159 passed, 0 skipped     ^M        PASS [   0.061s] clarity-repl analysis::coverage_tests::line_is_executed
     Running [ 00:00:03] [==>   ] 159/460: 8 running, 159 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 159/460: 8 running, 159 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 160/460: 7 running, 160 passed, 0 skipped     ^M        PASS [   0.063s] clarity-repl analysis::coverage_tests::map_iterator
     Running [ 00:00:03] [==>   ] 160/460: 8 running, 160 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 160/460: 8 running, 160 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 161/460: 7 running, 161 passed, 0 skipped     ^M        PASS [   0.125s] clarity-repl analysis::coverage_tests::line_is_executed_twice
     Running [ 00:00:03] [==>   ] 161/460: 8 running, 161 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 162/460: 7 running, 162 passed, 0 skipped     ^M        PASS [   0.073s] clarity-repl analysis::coverage_tests::match_opt_multiline
     Running [ 00:00:03] [==>   ] 162/460: 8 running, 162 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 162/460: 8 running, 162 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 163/460: 7 running, 163 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 163/460: 8 running, 163 passed, 0 skipped     ^M        PASS [   0.068s] clarity-repl analysis::coverage_tests::match_res_oneline
     Running [ 00:00:03] [==>   ] 163/460: 8 running, 163 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 163/460: 8 running, 163 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 164/460: 7 running, 164 passed, 0 skipped     ^M        PASS [   0.119s] clarity-repl analysis::coverage_tests::match_opt_oneline
     Running [ 00:00:03] [==>   ] 164/460: 8 running, 164 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 165/460: 7 running, 165 passed, 0 skipped     ^M        PASS [   0.061s] clarity-repl analysis::coverage_tests::multiple_line_execution
     Running [ 00:00:03] [==>   ] 165/460: 8 running, 165 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 165/460: 8 running, 165 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 166/460: 7 running, 166 passed, 0 skipped     ^M        PASS [   0.070s] clarity-repl analysis::coverage_tests::simple_asserts_branching
     Running [ 00:00:03] [==>   ] 166/460: 8 running, 166 passed, 0 skipped     ^M     Running [ 00:00:03] [==>   ] 167/460: 7 running, 167 passed, 0 skipped     ^M        FAIL [   3.531s] clarinet-cli::bin/clarinet lsp::test_opening_simple_nft_manifest_should_return_fresh_analysis

--- STDOUT:              clarinet-cli::bin/clarinet lsp::test_opening_simple_nft_manifest_should_return_fresh_analysis ---

running 1 test
test lsp::test_opening_simple_nft_manifest_should_return_fresh_analysis ... FAILED

failures:

failures:
    lsp::test_opening_simple_nft_manifest_should_return_fresh_analysis

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 4 filtered out; finished in 3.51s


--- STDERR:              clarinet-cli::bin/clarinet lsp::test_opening_simple_nft_manifest_should_return_fresh_analysis ---
thread 'lsp::test_opening_simple_nft_manifest_should_return_fresh_analysis' panicked at components/clarinet-cli/src/lsp/mod.rs:231:5:
assertion `left == right` failed
  left: 0
 right: 1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

     Running [ 00:00:03] [==>   ] 167/460: 8 running, 167 passed, 0 skipped     ^M   Canceling due to test failure: 7 tests still running
     Running [ 00:00:03] [] 168/460: 7 running, 167 passed, 1 failed, 0 skipped     ^M^M   Canceling [ 00:00:03] [] 168/460: 7 running, 167 passed, 1 failed, 0 skipped     ^M^M        PASS [   0.009s] clarity-repl frontend::terminal::tests::test_complete_input::complete_input_with_curly_braces
   Canceling [ 00:00:03] [] 168/460: 8 running, 167 passed, 1 failed, 0 skipped     ^M^M   Canceling [ 00:00:03] [] 168/460: 8 running, 167 passed, 1 failed, 0 skipped     ^M^M        PASS [   0.064s] clarity-repl analysis::coverage_tests::simple_if_branches_with_exprs
   Canceling [ 00:00:03] [] 169/460: 7 running, 168 passed, 1 failed, 0 skipped     ^M^M        PASS [   0.079s] clarity-repl analysis::coverage_tests::simple_if_branching
   Canceling [ 00:00:03] [] 170/460: 6 running, 169 passed, 1 failed, 0 skipped     ^M^M   Canceling [ 00:00:03] [] 170/460: 6 running, 169 passed, 1 failed, 0 skipped     ^M^M        FAIL [   3.633s] clarinet-cli lsp::test_opening_simple_nft_manifest_should_return_fresh_analysis

--- STDOUT:              clarinet-cli lsp::test_opening_simple_nft_manifest_should_return_fresh_analysis ---

running 1 test
test lsp::test_opening_simple_nft_manifest_should_return_fresh_analysis ... FAILED

failures:

failures:
    lsp::test_opening_simple_nft_manifest_should_return_fresh_analysis

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 4 filtered out; finished in 3.62s


--- STDERR:              clarinet-cli lsp::test_opening_simple_nft_manifest_should_return_fresh_analysis ---
thread 'lsp::test_opening_simple_nft_manifest_should_return_fresh_analysis' panicked at components/clarinet-cli/src/lsp/mod.rs:231:5:
assertion `left == right` failed
  left: 0
 right: 1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

   Canceling [ 00:00:03] [] 171/460: 5 running, 170 passed, 1 failed, 0 skipped     ^M^M   Canceling [ 00:00:03] [] 172/460: 4 running, 170 passed, 2 failed, 0 skipped     ^M^M   Canceling [ 00:00:03] [] 172/460: 4 running, 170 passed, 2 failed, 0 skipped     ^M^M   Canceling [ 00:00:03] [] 172/460: 4 running, 170 passed, 2 failed, 0 skipped     ^M^M   Canceling [ 00:00:04] [] 172/460: 4 running, 170 passed, 2 failed, 0 skipped     ^M^M   Canceling [ 00:00:04] [] 172/460: 4 >
   Canceling [ 00:00:04] [] 172/460: 4 running, 170 passed, 2 failed, 0 skipped     ^M^M   Canceling [ 00:00:04] [] 172/460: 4 running, 170 passed, 2 failed, 0 skipped     ^M^M   Canceling [ 00:00:04] [] 172/460: 3 running, 171 passed, 2 failed, 0 skipped     ^M^M   Canceling [ 00:00:04] [] 172/460: 3 running, 171 passed, 2 failed, 0 skipped     ^M^M   Canceling [ 00:00:04] [] 173/460: 3 running, 171 passed, 2 failed, 0 skipped     ^M^M        PASS [   4.538s] clarinet-cli l>
   Canceling [ 00:00:04] [] 173/460: 3 running, 171 passed, 2 failed, 0 skipped     ^M^M   Canceling [ 00:00:04] [] 173/460: 3 running, 171 passed, 2 failed, 0 skipped     ^M^M   Canceling [ 00:00:04] [] 173/460: 2 running, 172 passed, 2 failed, 0 skipped     ^M^M   Canceling [ 00:00:04] [] 173/460: 2 running, 172 passed, 2 failed, 0 skipped     ^M^M   Canceling [ 00:00:04] [] 174/460: 2 running, 172 passed, 2 failed, 0 skipped     ^M^M        PASS [   4.626s] clarinet-cli l>
   Canceling [ 00:00:04] [] 174/460: 2 running, 172 passed, 2 failed, 0 skipped     ^M^M   Canceling [ 00:00:04] [] 174/460: 2 running, 172 passed, 2 failed, 0 skipped     ^M^M   Canceling [ 00:00:04] [] 174/460: 1 running, 173 passed, 2 failed, 0 skipped     ^M^M   Canceling [ 00:00:04] [] 174/460: 1 running, 173 passed, 2 failed, 0 skipped     ^M^M        PASS [   4.722s] clarinet-cli::bin/clarinet lsp::test_opening_counter_contract_should_return_fresh_analysis
   Canceling [ 00:00:04] [] 175/460: 1 running, 173 passed, 2 failed, 0 skipped     ^M^M   Canceling [ 00:00:04] [] 175/460: 1 running, 173 passed, 2 failed, 0 skipped     ^M^M   Canceling [ 00:00:04] [] 175/460: 0 running, 174 passed, 2 failed, 0 skipped     ^M^M   Canceling [ 00:00:04] [] 175/460: 0 running, 174 passed, 2 failed, 0 skipped     ^M^M------------
     Summary [   4.725s] 176/460 tests run: 174 passed, 2 failed, 0 skipped
        FAIL [   3.633s] clarinet-cli lsp::test_opening_simple_nft_manifest_should_return_fresh_analysis
        FAIL [   3.531s] clarinet-cli::bin/clarinet lsp::test_opening_simple_nft_manifest_should_return_fresh_analysis
   Canceling [ 00:00:04] [] 176/460: 0 running, 174 passed, 2 failed, 0 skipped     ^M^Merror: test run failed

It's still clarinet-cli::bin/clarinet lsp::test_opening_simple_nft_manifest_should_return_fresh_analysis which fails.
What may have caused this?

What mode is the rust package build for testing normally? In my nix setup it uses release mode by default, but should I maybe use debug mode?

@malikwirin malikwirin changed the title 1 of 5 tests is failing after compiling with my nix package definition test_opening_simple_nft_manifest_should_return_fresh_analysis is failing after compiling with my nix package definition Sep 4, 2024
@hugocaillard
Copy link
Collaborator

What may have caused this?

I don't know. As suggested in my previous comment, is it possible for you to add a log?

What mode is the rust package build for testing normally? In my nix setup it uses release mode by default, but should I maybe use debug mode?

Both seem to work on my end

@malikwirin
Copy link
Author

So I included a patch to get the value of manifest_location:

println!("Manifest location: {:?}", manifest_location);

The value is "/build/source/components/clarinet-cli/examples/simple-nft/Clarinet.toml"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In Progress
Development

No branches or pull requests

2 participants