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

Workaround cargo bug with enable features of optional dependencies #304

Closed
wants to merge 1 commit into from

Conversation

sdroege
Copy link

@sdroege sdroege commented Jan 31, 2024

While this works fine with Rust 1.73+, it does not work with Rust 1.70 and fails like this:

error: Package `env_logger v0.11.1` does not have feature `anstream`. It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.

While this works fine with Rust 1.73, it does not work with Rust 1.70
and fails like this:

error: Package `env_logger v0.11.1` does not have feature `anstream`. It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.
@sdroege
Copy link
Author

sdroege commented Jan 31, 2024

It would be nice to have a bugfix release with this so compilation works with 1.70 again :)

@epage epage changed the title Fix mix-up between dependencies, dep: features and features Workaround cargo bug with enable features of optional dependencies Jan 31, 2024
@epage
Copy link
Contributor

epage commented Jan 31, 2024

The MSRV is set to 1.71 which has the cargo fix for this. Are you also wanting to request a drop in the MSRV? If so, let's discuss that in an issue.

@sdroege
Copy link
Author

sdroege commented Jan 31, 2024

Ah, sorry for missing that.

MSRV 1.71 is fine for me, I'll just stay with 0.10 for the time being until I update this crate of mine to something newer. Only reason why it's still at MSRV 1.70 is because I didn't have the patience yet to deal with the usual people complaining about requiring a "too new" toolchain :)

@sdroege sdroege closed this Jan 31, 2024
@epage
Copy link
Contributor

epage commented Jan 31, 2024

I know that pain all too well.

The main reason I was willing to update the MSRV so much in 0.11 is because it had breaking changes associated with it (but I don't bump MSRV for breaking changes).

My hope is the MSRV RFC will reduce that pressure. As you are affected, if you haven't looked and commented on it yet, I would recommend it!

@sdroege
Copy link
Author

sdroege commented Jan 31, 2024

I looked at one of the initial versions and it seemed like a huge improvement over the current situation. The latest version still looks good to me. Having the resolver consider MSRV would allow me to simply support the latest in most crates and have everything else be the problem of the users with annoying version requirements (-> they would just have to stay at an older version of various crates too then instead of dependency resolution failing).

Thanks for working on this :)

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

Successfully merging this pull request may close these issues.

2 participants