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

Udeps currently does not support 2024 edition. #290

Closed
humb1t opened this issue Dec 4, 2024 · 4 comments
Closed

Udeps currently does not support 2024 edition. #290

humb1t opened this issue Dec 4, 2024 · 4 comments

Comments

@humb1t
Copy link

humb1t commented Dec 4, 2024

 cargo udeps --workspace
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
error: failed to download `tari_rgrpc v0.1.0`

Caused by:
  unable to get packages from source

Caused by:
  failed to parse manifest at `.../Cargo.toml`

Caused by:
  feature `edition2024` is required

  The package requires the Cargo feature called `edition2024`, but that feature is not stabilized in this version of Cargo (1.83.0).
  Consider trying a more recent nightly release.
  See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#edition-2024 for more information about the status of this feature.

Maybe it will be easier to just wait for stabilization of new edition, but if it's an easy fix to start support it now, would be great. I receive this error when I try to use udeps in a project which has a dependency to a crate with 2024 edition.

@est31
Copy link
Owner

est31 commented Dec 4, 2024

One way to resolve would be to use cargo from git master instead of the released cargo.

So instead:

cargo = "0.84.0"
cargo-util = "0.2.11"

do:

cargo = { git = "https://github.com/rust-lang/cargo"}
cargo-util = { git = "https://github.com/rust-lang/cargo"}

Not sure if it works or if changes of cargo-udeps are needed, but usually it's pretty easy to upgrade the cargo version.

In any case, on the cargo-udeps master branch I want to support edition 2024 once edition 2024 is released on stable (or a couple of days after that).

@est31 est31 closed this as completed Dec 4, 2024
@humb1t
Copy link
Author

humb1t commented Dec 4, 2024

Great, thanks @est31 💜

@virtualritz
Copy link

@est31

do:

cargo = { git = "https://github.com/rust-lang/cargo"}
cargo-util = { git = "https://github.com/rust-lang/cargo"}

Where are those set? I.e. to what TOML file are those added and under what section?

@est31
Copy link
Owner

est31 commented Dec 19, 2024

@virtualritz you'll need to clone cargo-udeps to your local disk, do the modifications to Cargo.toml, and then do cargo install --path ..

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

3 participants