Skip to content

The dependencies of the backtrace crate in libstd are outdated. #104960

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

Closed
glandium opened this issue Nov 26, 2022 · 3 comments
Closed

The dependencies of the backtrace crate in libstd are outdated. #104960

glandium opened this issue Nov 26, 2022 · 3 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@glandium
Copy link
Contributor

library/std/Cargo.toml contains:

addr2line = { version = "0.16.0", optional = true, default-features = false }
miniz_oxide = { version = "0.4.0", optional = true, default-features = false }

library/backtrace/Cargo.toml has:

addr2line = { version = "0.17.0", default-features = false }
miniz_oxide = { version = "0.5.0", default-features = false }

(and current master of the backtrace-rs repo has even different versions)

It seems to me backtrace should have its own rustc-dep-of-std feature, which would avoid libstd enabling the feature on stale dependencies.

It's worth noting that the dependencies in crates/as-if-std/Cargo.toml in backtrace-rs match what's currently in libstd, although I'm not sure what that's testing considering there is no dependency on the backtrace crate in there...

@bjorn3
Copy link
Member

bjorn3 commented Dec 12, 2022

It seems to me backtrace should have its own rustc-dep-of-std feature, which would avoid libstd enabling the feature on stale dependencies.

rustc-dep-of-std wouldn't work for backtrace. It isn't used as regular dependency, but directly included in libstd using #[path = "../../backtrace/src/lib.rs"] mod backtrace_rs;. This is necessary because backtrace depends on libstd for reading files, while libstd depends on backtrace for the std::backtrace module and for panic messages. To break this cyclic dependency both have been merged into the same crate. crates/as-if-std emulates the same inclusion mechanism outside of libstd to test that it doesn't break.

@jyn514 jyn514 added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-libs Relevant to the library team, which will review and decide on the PR/issue. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. labels Apr 15, 2023
@766974616c79
Copy link
Contributor

766974616c79 commented Jun 3, 2023

Hi, is this exit no longer valid? The two dependencies have the same version on both Cargo.toml

https://github.com/rust-lang/backtrace-rs/blob/4245978ca8169c40c088ff733825e4527f7b914c/Cargo.toml#L40

addr2line = { version = "0.19.0", optional = true, default-features = false }

@workingjubilee
Copy link
Member

Effectively resolved, yes. Will be fully resolved by #113176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants