-
Notifications
You must be signed in to change notification settings - Fork 104
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
Bump the MSRV to 1.64.0 #204
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure does it make sense to keep or remove it. @YangKeao Could you please explain a bit why we use different
Cargo.toml
in CI and codebase? Thanks! It is a little bit confusing to have differentCargo.toml
in the same project.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example:
Cargo
always usesinferno 0.11.15
when buildingpprof-rs
. You have to usecargo update -p inferno --precise 0.11.1
to work around.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another example:
My toolchain:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the MSRV actually. It proved
pprof-rs
can actually work on 1.56 with some dependency specified, so this only modified the dependencies for CI with 1.56 rust.I'm not sure whether the dependencies of
pprof-rs
will be automatically updated when runningcargo update -p pprof
. If not, this behavior enables the user to updatepprof-rs
even when they are on 1.56 rust. (Even if not, it's also possible for them to downgrade the dependencies ofpprof-rs
to solve this problem)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Then probably the better solution is we set the correct version in the
Cargo.toml
instead of letting the user manually downgrade the deps ofpprof-rs
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because there are some deps of
pprof-rs
that require a higher rust toolchain to build it. AndCargo
does not consider therust-version
ofCargo.toml
when it resolves the deps.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And there are no tips for users to work around this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also don't want to specify a too low version (of dependencies) for users, because it will avoid the users from using newer dependencies. It cloud also cause the dependency conflict, so I usually use
x.y
but notx.y.z
in most cases. Do you have any better idea on this? (Upgrading MSRV can be a choice, but it's actually avoidable, by specifying dependencies manually 🤦 .)This is exactly the problem. The
cargo
will not automatically choose the newest valid version. As a developer of library, I also cannot specify different dependencies for different rust version.All of them are here: inferno and criterion. And the solution is to downgrade them (by the user manually, as shown in the
github.yml
). The lower version are allowed in the range specified inCargo.toml
ofpprof-rs
. Thesed
in ci only sets the version precisely (fromx.y
tox.y.z
).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes 🤦 . I should add document for it.