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

workspace: set resolver = 2 in the root Cargo.toml manifest #833

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

cvybhu
Copy link
Contributor

@cvybhu cvybhu commented Oct 13, 2023

Running cargo check using rust 1.73 prints the following warning message:

warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`
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
    Finished dev [unoptimized + debuginfo] target(s) in 0.05s

Documentation about resolver versions can be found here: https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions

Let's use the newer resolver in the whole workspace. The newer resolver is the default that Rust uses since edition 2021.

It also gets rid of the annoying warning.

Pre-review checklist

  • I have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • [ ] I added relevant tests for new features and bug fixes.
  • All commits compile, pass static checks and pass test.
  • PR description sums up the changes and reasons why they should be introduced.
  • I have provided docstrings for the public items that I want to introduce.
  • I have adjusted the documentation in ./docs/source/.
  • I added appropriate Fixes: annotations to PR description.

Running `cargo check` using `rust 1.73` prints the following warning message:
```
warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`
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
    Finished dev [unoptimized + debuginfo] target(s) in 0.05s
```

Documentation about resolver versions can be found here:
https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions

Let's use the newer resolver in the whole workspace.
The newer resolver is the default that Rust uses since edition 2021.

It also gets rid of the annoying warning.

Signed-off-by: Jan Ciolek <jan.ciolek@scylladb.com>
@piodul piodul merged commit 9c12237 into scylladb:main Oct 17, 2023
8 checks passed
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