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

Unable to compile pprof with MSRV 1.64.0 #221

Closed
Joining7943 opened this issue Aug 25, 2023 · 5 comments
Closed

Unable to compile pprof with MSRV 1.64.0 #221

Joining7943 opened this issue Aug 25, 2023 · 5 comments

Comments

@Joining7943
Copy link

Hi! As the title says, compiling pprof with MSRV 1.64.0 fails with:

error: package `addr2line v0.21.0` cannot be built because it requires rustc 1.65 or newer, while the currently active rustc version is 1.64.0

I tracked this down to the backtrace dependency which uses 1.65.0 since version 0.3.69 with which they also updated addr2line from 0.20.0 to 0.21.0.

@sticnarf
Copy link
Contributor

pprof-rs does not directly depend on addr2line. It does not require backtrace >= 0.3.69, either.

So, what you need is just downgrading backtrace in your project to 0.3.68.

@Joining7943
Copy link
Author

Thanks for your reply.

To my knowledge, I can't just downgrade backtrace since it is a transitive dependency in my library crate. Can't you just specify a version of backtrace <=0.3.68? In my opinion, if you specify a msrv of 1.64.0, you should also ensure that pprof can be build with that msrv.

@sticnarf
Copy link
Contributor

IMO libraries needn't specify <= some version to satisfy MSRV. Otherwise, those using higher versions of Rust will fail to use latest versions of the dependencies.

The binary crates can downgrade the version in Cargo.lock using cargo update -p backtrace --precise 0.3.68. Or, they can add backtrace as their direct dependency and specify <=0.3.68 themselves.

@sticnarf
Copy link
Contributor

The new guideline from the Rust blog permits committing lockfiles. So, it's possible to check MSRV in CI with an appropriate committed Cargo.lock.

@Joining7943
Copy link
Author

So, it's possible to check MSRV in CI with an appropriate committed Cargo.lock.

Since they changed their guideline, this looks like a good solution.

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

2 participants