duckdb-rs icon indicating copy to clipboard operation
duckdb-rs copied to clipboard

Is `Cargo.toml` current?

Open max-sixty opened this issue 2 years ago • 17 comments

Running cargo minimal-versions check gives a bunch of errors:

error[E0432]: unresolved import `std::path::AsPath`
  --> /Users/maximilian/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.0/src/lib.rs:50:26
   |
50 | use std::path::{PathBuf, AsPath};
   |                          ^^^^^^
   |                          |
   |                          no `AsPath` in `path`
   |                          help: a similar name exists in the module: `Path`

error[E0433]: failed to resolve: could not find `old_io` in `std`
   --> /Users/maximilian/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.0/src/lib.rs:328:10
    |
328 |     std::old_io::stdio::set_stderr(Box::new(std::old_io::util::NullWriter));
    |          ^^^^^^ could not find `old_io` in `std`

error[E0433]: failed to resolve: could not find `old_io` in `std`
   --> /Users/maximilian/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.0/src/lib.rs:328:50
    |
328 |     std::old_io::stdio::set_stderr(Box::new(std::old_io::util::NullWriter));
    |                                                  ^^^^^^ could not find `old_io` in `std`

error[E0425]: cannot find function `set_exit_status` in module `env`
   --> /Users/maximilian/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.0/src/lib.rs:327:10
    |
327 |     env::set_exit_status(1);
    |          ^^^^^^^^^^^^^^^ not found in `env`

(and thank you for the excellent library! It's really helpful over at PRQL!)

max-sixty avatar Mar 11 '23 23:03 max-sixty

Could you give more details? I can’t understand the title, and also the description seems not related to this repo?

wangfenjin avatar Mar 12 '23 00:03 wangfenjin

If you wanna know is this repo use the latest version dependencies, yes we are, we always keep them up to date https://deps.rs/repo/github/wangfenjin/duckdb-rs

wangfenjin avatar Mar 12 '23 00:03 wangfenjin

Sorry for the lack of description.

My claim is that attempting to use the library with the minimum possible dependencies in Cargo.toml doesn't work. That's what https://crates.io/crates/cargo-minimal-versions attempts to validate — that if Cargo.lock is the same as Cargo.toml, does the library still compile?

When I run cargo +nightly update -Z minimal-versions to set the minimum versions allowed, and then cargo tree -i gcc and look for gcc, which seems to be the cause of the error, I find:

gcc v0.3.0
[build-dependencies]
└── miniz-sys v0.1.7
    └── flate2 v1.0.0
        [build-dependencies]
        └── libduckdb-sys v0.7.1 (/Users/maximilian/workspace/duckdb-rs/libduckdb-sys)
            └── duckdb v0.7.1 (/Users/maximilian/workspace/duckdb-rs)

So maybe it's worth attempting to upgrade flake2 or transitively raising upstream?

max-sixty avatar Mar 12 '23 00:03 max-sixty

Trying to fix the issue, but seems another error reported in arrow pkg.

To be honest, the error message from this tool is totally UN-understandable...Very hard to find the clue to fix the issue

wangfenjin avatar Mar 12 '23 01:03 wangfenjin

Very hard to find the clue to fix the issue

OK, though is it:

So maybe it's worth attempting to upgrade flake2 or transitively raising upstream?

max-sixty avatar Mar 12 '23 02:03 max-sixty

I already fix this issue in #135

There report another one in arrow-rs, could you help identify the issue?

run in https://github.com/apache/arrow-rs

cargo minimal-versions test

wangfenjin avatar Mar 12 '23 02:03 wangfenjin

I run this command in my project and in arrow-rs project, both report the same error

wangfenjin avatar Mar 12 '23 02:03 wangfenjin

In #135 I see the test failing because nightly isn't installed...

max-sixty avatar Mar 12 '23 02:03 max-sixty

What do you see if you run this, but replacing gcc with the location of the new failure?

When I run cargo +nightly update -Z minimal-versions to set the minimum versions allowed, and then cargo tree -i gcc and look for gcc, which seems to be the cause of the error, I find:

max-sixty avatar Mar 12 '23 02:03 max-sixty

Updated the CI, but it will fail because I check the result locally

you can clone the arrow-rs or #135 branch

wangfenjin avatar Mar 12 '23 03:03 wangfenjin

https://github.com/PRQL/prql/actions/runs/4395201277/jobs/7696819175

You can also check your pipeline log

wangfenjin avatar Mar 12 '23 03:03 wangfenjin

https://github.com/wangfenjin/duckdb-rs/actions/runs/4395501064/jobs/7697404026

wangfenjin avatar Mar 12 '23 03:03 wangfenjin

Any clue how to fix this?

wangfenjin avatar Mar 12 '23 03:03 wangfenjin

https://github.com/wangfenjin/duckdb-rs/actions/runs/4395501064/jobs/7697404026

It looks like this is coming from the arrow crate. What requires that dependency?

max-sixty avatar Mar 12 '23 06:03 max-sixty

I put an issue into arrow: https://github.com/apache/arrow-rs/issues/3849

max-sixty avatar Mar 12 '23 23:03 max-sixty

The issue is I'm not sure it's their problem or it's because I misuse it. For the first issue reported of flate2 or gcc, actually it's our cargo.toml don't make the flate2 as optional

That's why I said the error message is too misleading

wangfenjin avatar Mar 13 '23 01:03 wangfenjin

arrow-rs has the same issue when running the steps on their repo — so it is an issue there too!

max-sixty avatar Mar 13 '23 02:03 max-sixty