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

Enable Resolve v2 for workspace #950

Merged
merged 1 commit into from
Feb 28, 2022

Conversation

TheNeikos
Copy link
Contributor

The v2 resolver allows for more fine-grained inclusion of dependency
features. Previously dev-dependency features got merged with 'normal'
dependency features. This may not always be desirable.

For more information see
https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html

Types of changes

What types of changes does your code introduce to thin-edge.io?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Further comments

This should be a non-breaking change as, as far as I could tell no crates had 'hidden' feature dependencies. However, since it is the default since the 2021 edition it makes sense to enable it now so as to reduce potential future workload.

The v2 resolver allows for more fine-grained inclusion of dependency
features. Previously dev-dependency features got merged with 'normal'
dependency features. This may not always be desirable.

For more information see
https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html

Signed-off-by: Marcel Müller <m.mueller@ifm.com>
@TheNeikos TheNeikos requested a review from a team February 28, 2022 11:05
@makr11st
Copy link
Contributor

As per docs you provided the resolver = 2 is an implied as long as we use edtion = 2021 which we do.

Copy link
Contributor

@didier-wenzek didier-wenzek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay - even if this seems to be already the default since we are using edition = "2021".

@TheNeikos
Copy link
Contributor Author

TheNeikos commented Feb 28, 2022

As per docs you provided the resolver = 2 is an implied as long as we use edtion = 2021 which we do.

That's what I expected as well, but:

From https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html

The resolver is a global setting for a workspace, and the setting is ignored in dependencies. The setting is only honored for the top-level package of the workspace. If you are using a virtual workspace, you will still need to explicitly set the resolver field in the [workspace] definition if you want to opt-in to the new resolver.

There is an open issue about it: rust-lang/cargo#5784

@TheNeikos TheNeikos merged commit 1ddfce5 into thin-edge:main Feb 28, 2022
@TheNeikos TheNeikos deleted the feature/enable_resolver_2 branch February 28, 2022 14:02
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.

3 participants