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

Compile error when using code coverage tools #20726

Open
2 tasks done
chingiztob opened this issue Jan 15, 2025 · 0 comments
Open
2 tasks done

Compile error when using code coverage tools #20726

chingiztob opened this issue Jan 15, 2025 · 0 comments
Labels
bug Something isn't working needs triage Awaiting prioritization by a maintainer rust Related to Rust Polars

Comments

@chingiztob
Copy link

Checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of Polars.

Reproducible example

cargo llvm-cov --all-features --exclude register_derive_impl --workspace --no-fail-fast --lcov --output-path lcov.info

# or

RUSTFLAGS="-Z macro-backtrace" cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out xml

Log output

Github Actions
 
error[E0080]: evaluation of `<array::struct_::StructArray as array::static_array::StaticArray>::value_unchecked::{constant#0}` failed
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array.rs:70:9
   |
70 |         no_call_const!()
   |         ^^^^^^^^^^^^^^^^ the evaluated program panicked at 'should not be called', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array.rs:70:9
   |
   = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `no_call_const` (in Nightly builds, run with -Z macro-backtrace for more info)

note: erroneous constant encountered
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array.rs:70:9
   |
70 |         no_call_const!()
   |         ^^^^^^^^^^^^^^^^
   |
   = note: this note originates in the macro `no_call_const` (in Nightly builds, run with -Z macro-backtrace for more info)

note: the above error was encountered while instantiating `fn <array::struct_::StructArray as array::static_array::StaticArray>::value_unchecked`
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array.rs:51:18
   |
51 |             Some(self.value_unchecked(idx))
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0080]: evaluation of `<array::struct_::StructArray as array::static_array::StaticArray>::iter::{constant#0}` failed
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array.rs:79:9
   |
79 |         no_call_const!()
   |         ^^^^^^^^^^^^^^^^ the evaluated program panicked at 'should not be called', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array.rs:79:9
   |
   = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `no_call_const` (in Nightly builds, run with -Z macro-backtrace for more info)

note: erroneous constant encountered
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array.rs:79:9
   |
79 |         no_call_const!()
   |         ^^^^^^^^^^^^^^^^
   |
   = note: this note originates in the macro `no_call_const` (in Nightly builds, run with -Z macro-backtrace for more info)

note: the above error was encountered while instantiating `fn <array::struct_::StructArray as array::static_array::StaticArray>::iter`

error[E0080]: evaluation of `<array::struct_::StructArray as array::static_array::StaticArray>::values_iter::{constant#0}` failed
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array.rs:82:9
   |
82 |         no_call_const!()
   |         ^^^^^^^^^^^^^^^^ the evaluated program panicked at 'should not be called', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array.rs:82:9
   |
   = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `no_call_const` (in Nightly builds, run with -Z macro-backtrace for more info)

note: erroneous constant encountered
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array.rs:82:9
   |
82 |         no_call_const!()
   |         ^^^^^^^^^^^^^^^^
   |
   = note: this note originates in the macro `no_call_const` (in Nightly builds, run with -Z macro-backtrace for more info)

note: the above error was encountered while instantiating `fn <array::struct_::StructArray as array::static_array::StaticArray>::values_iter`

error[E0080]: evaluation of `<array::struct_::StructArray as array::static_array_collect::ArrayFromIterDtype<()>>::arr_from_iter_with_dtype::<std::vec::Vec<()>>::{constant#0}` failed
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array_collect.rs:1049:9
     |
1049 |         no_call_const!()
     |         ^^^^^^^^^^^^^^^^ the evaluated program panicked at 'should not be called', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array_collect.rs:1049:9
     |
     = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `no_call_const` (in Nightly builds, run with -Z macro-backtrace for more info)

note: erroneous constant encountered
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array_collect.rs:1049:9
     |
1049 |         no_call_const!()
     |         ^^^^^^^^^^^^^^^^
     |
     = note: this note originates in the macro `no_call_const` (in Nightly builds, run with -Z macro-backtrace for more info)

note: the above error was encountered while instantiating `fn <array::struct_::StructArray as array::static_array_collect::ArrayFromIterDtype<()>>::arr_from_iter_with_dtype::<std::vec::Vec<()>>`
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array.rs:87:9
   |
87 |         Self::arr_from_iter_with_dtype(dtype, v)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0080]: evaluation of `<array::struct_::StructArray as array::static_array_collect::ArrayFromIterDtype<()>>::arr_from_iter_with_dtype::<std::iter::Take<std::iter::Repeat<()>>>::{constant#0}` failed
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array_collect.rs:1049:9
     |
1049 |         no_call_const!()
     |         ^^^^^^^^^^^^^^^^ the evaluated program panicked at 'should not be called', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array_collect.rs:1049:9
     |
     = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `no_call_const` (in Nightly builds, run with -Z macro-backtrace for more info)

note: the above error was encountered while instantiating `fn <array::struct_::StructArray as array::static_array_collect::ArrayFromIterDtype<()>>::arr_from_iter_with_dtype::<std::iter::Take<std::iter::Repeat<()>>>`
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array.rs:97:9
   |
97 |         Self::arr_from_iter_with_dtype(dtype, std::iter::repeat(value).take(length))
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0080`.
error: could not compile `polars-arrow` (lib) due to 5 previous errors
warning: build failed, waiting for other jobs to finish...
error: process didn't exit successfully: `/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo test --tests --manifest-path /home/runner/work/cascade/cascade/Cargo.toml --target-dir /home/runner/work/cascade/cascade/target/llvm-cov-target --all-features --exclude register_derive_impl --workspace --no-fail-fast` (exit status: 101)
Error: Process completed with exit code 1.


On local Linux machine:

error: Broken pipe (os error 32)
warning: build failed, waiting for other jobs to finish...
error: could not compile `polars-arrow` (lib) due to 5 previous errors
2025-01-15T12:05:19.639566Z ERROR cargo_tarpaulin: Failed to compile tests!
error[E0080]: evaluation of `<array::struct_::StructArray as array::static_array::StaticArray>::value_unchecked::{constant#0}` failed
  --> /home/chingiz/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array.rs:70:9
   |
70 |         no_call_const!()
   |         ^^^^^^^^^^^^^^^^ the evaluated program panicked at 'should not be called', /home/chingiz/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array.rs:70:9
   |
   = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `no_call_const` (in Nightly builds, run with -Z macro-backtrace for more info)


Error: "Failed to compile tests!\nerror[E0080]: evaluation of `<array::struct_::StructArray as array::static_array::StaticArray>::value_unchecked::{constant#0}` failed\n  --> /home/chingiz/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array.rs:70:9\n   |\n70 |         no_call_const!()\n   |         ^^^^^^^^^^^^^^^^ the evaluated program panicked at 'should not be called', /home/chingiz/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-arrow-0.45.1/src/array/static_array.rs:70:9\n   |\n   = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `no_call_const` (in Nightly builds, run with -Z macro-backtrace for more info)\n\n"

Issue description

Compilation of Rust project, with Polars 0.45.1 dependency fails when compiling under Tarpaulin on cargo-llvm-cov.

Seems very similar to #18203 but reproducible on latest stable 1.84 and latest nightly (rustc 1.86.0-nightly (8361aef0d 2025-01-14))

Expected behavior

No error

Installed versions

"cross_join", "csv"

@chingiztob chingiztob added bug Something isn't working needs triage Awaiting prioritization by a maintainer rust Related to Rust Polars labels Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Awaiting prioritization by a maintainer rust Related to Rust Polars
Projects
None yet
Development

No branches or pull requests

1 participant