-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
building: incompatible types error in compute/cast/utf8_to.rs #14134
Comments
That's strange, what is your compiler version? |
We have a rust-toolchain.toml file that forces the compiler to this version currently. We try to stay 2 versions behind rust's latest so distros can keep up to date easier. [toolchain]
profile = "default"
channel = "1.73.0" |
I have a minimal repro below. Looks like the problem only occurs when a local variable is introduced.
use std::sync::Arc;
fn takes_arc_slice(_: Arc<[u8]>) {}
fn works() {
takes_arc_slice(if true {
Arc::from([255])
} else {
Arc::from([])
});
}
fn doesnt_work() {
let buffers = if true {
Arc::from([255])
} else {
Arc::from([])
};
takes_arc_slice(buffers);
}
fn main() {
works();
doesnt_work();
} It fails to compile on 1.73.0 with the same error. It compiles successfully on 1.74.0 and stable (1.75.0). I'll file an issue on the Rust repo so they can at least put a regression test in there.
|
Thanks for the research @BGR360! Since a new rust release will be out in about a week (Feb-8th I think), and the compile works in 1.74, we can just wait to bump nushell to the next version of polars until then. I'm happy to have this issue closed if the powers that be wish it so. Much love to the team and contributors here ❤️! |
+1 I also came across this issue with |
I encountered this error when running rust-matplotlib on Macbook M2 under Rosetta2 with rustc v 1.71. However, there was no error when running the same library under arm64 in rustc v 1.78. |
Closing this since nushell has upgraded to 1.77.2 now. |
Checks
Reproducible example
Just building the crate, these lines produce the error.
Log output
Issue description
I'm trying to update nushell to the latest polars 0.37.0 crates and cannot build because of this error.
Expected behavior
clean build without warnings or errors.
Installed versions
polars-io = { version = "0.37", features = ["avro"], optional = true }
polars-arrow = { version = "0.37", optional = true }
polars-ops = { version = "0.37", optional = true }
polars-plan = { version = "0.37", optional = true }
polars-utils = { version = "0.37", optional = true }
[dependencies.polars]
features = [
"arg_where",
"checked_arithmetic",
"concat_str",
"cross_join",
"csv",
"cum_agg",
"default",
"dtype-categorical",
"dtype-datetime",
"dtype-struct",
"dtype-i8",
"dtype-i16",
"dtype-u8",
"dtype-u16",
"dynamic_group_by",
"ipc",
"is_in",
"json",
"lazy",
"object",
"parquet",
"random",
"rolling_window",
"rows",
"serde",
"serde-lazy",
"strings",
"to_dummies",
]
optional = true
version = "0.37"
The text was updated successfully, but these errors were encountered: