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

libbacktrace cannot be updated in Rust's libstd because of memchr dependency #432

Closed
nielx opened this issue Aug 17, 2021 · 6 comments · Fixed by rust-lang/rust#88151
Closed

Comments

@nielx
Copy link
Contributor

nielx commented Aug 17, 2021

I suppose that this is more a tracking issue for a downstream problem, but it seems to make sense to raise it here.

In libbacktrace 0.2.60, the dependency on object has been raised to 0.25.0. This release contains an unconditional dependency on memchr. This crate does not support the rustc-std-workspace-core workaround.

If the backtrace version shipped with rustc needs to be set higher than 0.3.59, this problem needs to be solved.

CC: @BurntSushi CC: @philipc @fitzgen

@BurntSushi
Copy link
Member

rustc-std-workspace-core

I'm not sure what this is, but if there's a non-invasive patch for memchr, I would be happy to accept a PR and get a release out quickly.

Of course, without looking carefully, it's likely that memchr could be made optional since all of its public APIs have corresponding simple and naive implementations.

@alexcrichton
Copy link
Member

I'll work on sending a PR to memchr for this soon. @BurntSushi for reference the changes should be entirely isolated to Cargo.toml and look of this shape:

[dependencies]
# Internal feature, only used when building as part of libstd, not part of the
# stable interface of this crate.
core = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-core' }
alloc = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-alloc' }
compiler_builtins = { version = '0.1.2', optional = true }

[features]
# Internal feature, only used when building as part of libstd, not part of the
# stable interface of this crate.
rustc-dep-of-std = ['core', 'alloc', 'compiler_builtins']

The fix at that point would be to add a line here enabling the rustc-dep-of-std feature for memchr when object's own rustc-dep-of-std feature is active.

@philipc
Copy link
Contributor

philipc commented Aug 17, 2021

@nagisa added the memchr dependency for better performance when used in rustc, so updating the memchr crate seems best.

@alexcrichton
Copy link
Member

I've sent BurntSushi/memchr#89 for memchr, and gimli-rs/object#356 for object. When those are merged/published then this crate will likely need an update for the new object version, and then the submodule should be good to go to update in rust-lang/rust again.

BurntSushi pushed a commit to BurntSushi/memchr that referenced this issue Aug 18, 2021
This commit adds the necessary `Cargo.toml` directives which enables
this crate to build with the standard library. This introduces some
optional off-by-deault dependencies which are only activated (and
overwritten) when built as part of the standard library.

Ref rust-lang/backtrace-rs#432

PR #89
alexcrichton added a commit to alexcrichton/object that referenced this issue Aug 18, 2021
alexcrichton added a commit to alexcrichton/rust that referenced this issue Aug 19, 2021
This commit updates the backtrace crate in libstd now that dependencies
have been updated to use `memchr` from the standard library as well.
This is mostly just making sure deps are up-to-date and have all the
latest-and-greatest fixes and such.

Closes rust-lang/backtrace-rs#432
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 19, 2021
…-Simulacrum

Update the backtrace crate in libstd

This commit updates the backtrace crate in libstd now that dependencies
have been updated to use `memchr` from the standard library as well.
This is mostly just making sure deps are up-to-date and have all the
latest-and-greatest fixes and such.

Closes rust-lang/backtrace-rs#432
@alexcrichton
Copy link
Member

Updated now!

@nielx
Copy link
Contributor Author

nielx commented Aug 20, 2021

Thank you!

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 a pull request may close this issue.

4 participants