GithubHelp home page GithubHelp logo

Comments (14)

datapythonista avatar datapythonista commented on August 11, 2024 2

In case it's helpful, I can reproduce this, also for the release 0.41.1 with rustc 1.77 in a clean project:

~/src $ cargo new try_polars_041
     Created binary (application) `try_polars_041` package
~/src $ cd try_polars_041 
master ~/src/try_polars_041 $ cargo add polars
    Updating crates.io index
      Adding polars v0.41.1 to dependencies.
...
    Updating crates.io index
master ~/src/try_polars_041 $ cargo build
...
error[E0277]: the trait bound `for<'a> <_ as polars_core::datatypes::PolarsDataType>::Physical<'a>: ToTotalOrd` is not satisfied
   --> /home/mgarcia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-ops-0.41.1/src/frame/join/hash_join/single_keys_dispatch.rs:220:25
    |
220 |                         group_join_inner(&lhs, &rhs, validate, join_nulls)
    |                         ^^^^^^^^^^^^^^^^ the trait `for<'a> ToTotalOrd` is not implemented for `<_ as polars_core::datatypes::PolarsDataType>::Physical<'a>`
    |
    = help: the following other types implement trait `ToTotalOrd`:
              bool
              char
              isize
              i8
              i16
              i32
              i64
              i128
            and 14 others
note: this is a known limitation of the trait solver that will be lifted in the future
   --> /home/mgarcia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-ops-0.41.1/src/frame/join/hash_join/single_keys_dispatch.rs:220:25
    |
220 |                         group_join_inner(&lhs, &rhs, validate, join_nulls)
    |                         ^^^^^^^^^^^^^^^^ try adding turbofish arguments to this expression to specify the types manually, even if it's redundant
note: required by a bound in `group_join_inner`
   --> /home/mgarcia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-ops-0.41.1/src/frame/join/hash_join/single_keys_dispatch.rs:322:73
    |
312 | fn group_join_inner<T>(
    |    ---------------- required by a bound in this function
...
322 |         Send + Sync + Copy + TotalHash + TotalEq + DirtyHash + IsNull + ToTotalOrd,
    |                                                                         ^^^^^^^^^^ required by this bound in `group_join_inner`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `polars-ops` (lib) due to 16 previous errors
warning: build failed, waiting for other jobs to finish...

from polars.

ritchie46 avatar ritchie46 commented on August 11, 2024

I cannot reproduce this? What is you rustc version?

from polars.

GuillaumePressiat avatar GuillaumePressiat commented on August 11, 2024
% rustc --version
rustc 1.77.0-nightly (595bc6f00 2024-01-05)

too old?

from polars.

ritchie46 avatar ritchie46 commented on August 11, 2024

Nah, might be some issues. Will need a bit of work. Hope to patch in a few days.

from polars.

GuillaumePressiat avatar GuillaumePressiat commented on August 11, 2024

Ok...
Thanks!

With last rustc version I've just tried

% rustc --version                                                                      
rustc 1.81.0-nightly (3cb521a43 2024-06-22)

I now get:

help: consider importing this struct
    |
1   + use polars_io::cloud::CloudOptions;

Same error as #17138

from polars.

ritchie46 avatar ritchie46 commented on August 11, 2024

Can you now check on main? I can compile that with rustc 1.78

from polars.

datapythonista avatar datapythonista commented on August 11, 2024

I could compile main yesterday already. For some reason it seemed like it was only failing when having Polars as a dependency. Or maybe 0.41 was broken but main was already fixed. I can try to add the main of Polars as a dependency if that's useful.

from polars.

datapythonista avatar datapythonista commented on August 11, 2024

Adding Polars main as a dependency seems to still fail. No idea why building the library works, but using it as a dependency doesn't. But let me know if I can help with anything else.

~/src $ cargo new polars_main
     Created binary (application) `polars_main` package

~/src $ cd polars_main 

~/src/polars_main $ cargo add --git https://github.com/pola-rs/polars.git polars
    Updating git repository `https://github.com/pola-rs/polars.git`
      Adding polars (git) to dependencies.
             Features:
             + csv
    ...
    Updating git repository `https://github.com/pola-rs/polars.git`
    Updating crates.io index

master ~/src/polars_main $ cargo run
  Downloaded strum v0.26.3
  Downloaded uuid v1.9.0
  Downloaded syn v2.0.68
  Downloaded 3 crates (319.7 KB) in 0.18s
   Compiling version_check v0.9.4
   Compiling proc-macro2 v1.0.86
...
error[E0277]: the trait bound `for<'a> <_ as polars_core::datatypes::PolarsDataType>::Physical<'a>: ToTotalOrd` is not satisfied
   --> /home/mgarcia/.cargo/git/checkouts/polars-b0d90607192fd414/cc7fc32/crates/polars-ops/src/frame/join/hash_join/single_keys_dispatch.rs:220:25
    |
220 |                         group_join_inner(&lhs, &rhs, validate, join_nulls)
    |                         ^^^^^^^^^^^^^^^^ the trait `for<'a> ToTotalOrd` is not implemented for `<_ as polars_core::datatypes::PolarsDataType>::Physical<'a>`
    |
    = help: the following other types implement trait `ToTotalOrd`:
              bool
              char
              isize
              i8
              i16
              i32
              i64
              i128
            and 14 others
note: this is a known limitation of the trait solver that will be lifted in the future
   --> /home/mgarcia/.cargo/git/checkouts/polars-b0d90607192fd414/cc7fc32/crates/polars-ops/src/frame/join/hash_join/single_keys_dispatch.rs:220:25
    |
220 |                         group_join_inner(&lhs, &rhs, validate, join_nulls)
    |                         ^^^^^^^^^^^^^^^^ try adding turbofish arguments to this expression to specify the types manually, even if it's redundant
note: required by a bound in `group_join_inner`
   --> /home/mgarcia/.cargo/git/checkouts/polars-b0d90607192fd414/cc7fc32/crates/polars-ops/src/frame/join/hash_join/single_keys_dispatch.rs:322:73
    |
312 | fn group_join_inner<T>(
    |    ---------------- required by a bound in this function
...
322 |         Send + Sync + Copy + TotalHash + TotalEq + DirtyHash + IsNull + ToTotalOrd,
    |                                                                         ^^^^^^^^^^ required by this bound in `group_join_inner`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `polars-ops` (lib) due to 16 previous errors
warning: build failed, waiting for other jobs to finish...

from polars.

GuillaumePressiat avatar GuillaumePressiat commented on August 11, 2024

Hi,

I still have the same error with rustc 1.77.0 both on main branch and release 0.41.1?

# polars = {git = "https://github.com/pola-rs/polars/", features = ["lazy"]}
cargo +1.77.0 build --release
# polars = {version = "0.41.1", features = ["lazy"]}
cargo +1.77.0 build --release

from polars.

ritchie46 avatar ritchie46 commented on August 11, 2024

Seems like a rustc < 1.78 issue. Will add an explicit turbofish and otherwise, update rustc? 🤷

from polars.

GuillaumePressiat avatar GuillaumePressiat commented on August 11, 2024

Thanks,

I've just installed 1.78 after 1.77 this morning.

Indeed, I run:

# polars = {git = "https://github.com/pola-rs/polars/", features = ["lazy"]}
cargo +1.78.0 build --release

and no error.

1.77 nok, 1.78 ok.

Will test after with your turbofish fix on 1.77.

from polars.

datapythonista avatar datapythonista commented on August 11, 2024

Doing the same as above works fine with rustc 1.81. I guess all good with a newer compiler :)

from polars.

GuillaumePressiat avatar GuillaumePressiat commented on August 11, 2024

Many thanks for the time spent.

from polars.

GuillaumePressiat avatar GuillaumePressiat commented on August 11, 2024

It's well fixed with turbo fish on 1.77.

from polars.

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.