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

Is Cargo.toml current? #134

Open
max-sixty opened this issue Mar 11, 2023 · 17 comments
Open

Is Cargo.toml current? #134

max-sixty opened this issue Mar 11, 2023 · 17 comments

Comments

@max-sixty
Copy link

max-sixty commented Mar 11, 2023

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 added a commit to max-sixty/prql that referenced this issue Mar 12, 2023
This will fail because of duckdb/duckdb-rs#134, so we'll wait for that to resolve before merging
@wangfenjin
Copy link
Collaborator

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

@wangfenjin
Copy link
Collaborator

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

@max-sixty
Copy link
Author

max-sixty commented Mar 12, 2023

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?

@wangfenjin
Copy link
Collaborator

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

@max-sixty
Copy link
Author

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?

@wangfenjin
Copy link
Collaborator

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
Copy link
Collaborator

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

@max-sixty
Copy link
Author

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

@max-sixty
Copy link
Author

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:

@wangfenjin
Copy link
Collaborator

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

you can clone the arrow-rs or #135 branch

@wangfenjin
Copy link
Collaborator

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

You can also check your pipeline log

@wangfenjin
Copy link
Collaborator

@wangfenjin
Copy link
Collaborator

Any clue how to fix this?

@max-sixty
Copy link
Author

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
Copy link
Author

I put an issue into arrow: apache/arrow-rs#3849

@wangfenjin
Copy link
Collaborator

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

@max-sixty
Copy link
Author

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

max-sixty added a commit to max-sixty/prql that referenced this issue Oct 21, 2023
This will fail because of duckdb/duckdb-rs#134, so we'll wait for that to resolve before merging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants