-
Notifications
You must be signed in to change notification settings - Fork 734
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
fix msrv (v0.1.x edition) #1581
Merged
Merged
Conversation
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
So...it turns out that passing `--bins` actually makes `cargo check` do *nothing* on library-only projects without binaries. This was...surprising. It turns out that because of this, our MSRV check CI run is basically a nop, and we accidentally merged code that doesn't compile on 1.42.0. I'm very dumb lol.
This fixes the build on Rust 1.42.0, where primitive types don't have associated consts. My bad!
Due to the CI issue fixed by PR #1580, we accidentally merged `tracing-subscriber` changes that don't compile on our MSRV, Rust 1.42.0. This includes: - use of associated consts on primitive types (`u64::MAX` rather than `std::u64::MAX`) - use of `#[cfg(...)]` on `if` expressions - use of the `str::strip_suffix` method, which wasn't stable on 1.42.0 This commit fixes these issues. These changes are mostly very simple and mechanical. The only significant change is changing the `StaticDirective` parsing code to not use `strip_suffix`, which changes the implementation around a bit...but it's still pretty straightforward. This should fix 1.42.0 compatibility.
davidbarsky
approved these changes
Sep 19, 2021
Looks like the build failure here is that the nightly compiler is trying to download a version of |
interestingly when i curl the cratesio URL it's trying to download, i get a 301: :; curl http://crates.io/api/v1/crates/h2/0.3.4/download
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>CloudFront</center>
</body>
</html> ...but in firefox, it actually tries to download the crate tarball? i love the computer! |
anyway the nightly build failure isn't our fault and we allow merging things when nightly fails so, whatever!! |
hawkw
added a commit
that referenced
this pull request
Sep 19, 2021
# 0.2.24 (September 19, 2021) This release contains a number of bug fixes, including a fix for `tracing-subscriber` failing to compile on the minimum supported Rust version of 1.42.0. It also adds `IntoIterator` implementations for the `Targets` type. ### Fixed - Fixed compilation on Rust 1.42.0 ([#1580], [#1581]) - **registry**: Ensure per-layer filter `enabled` state is cleared when a global filter short-circuits filter evaluation ([#1575]) - **layer**: Fixed `Layer::on_layer` not being called for `Box`ed `Layer`s, which broke per-layer filtering ([#1576]) ### Added - **filter**: Added `Targets::iter`, returning an iterator over the set of target-level pairs enabled by a `Targets` filter ([#1574]) - **filter**: Added `IntoIterator` implementations for `Targets` and `&Targets` ([#1574]) Thanks to new contributor @connec for contributing to this release! [#1580]: #1580 [#1581]: #1581 [#1575]: #1575 [#1576]: #1576 [#1574]: #1574
hawkw
added a commit
that referenced
this pull request
Sep 20, 2021
# 0.2.24 (September 19, 2021) This release contains a number of bug fixes, including a fix for `tracing-subscriber` failing to compile on the minimum supported Rust version of 1.42.0. It also adds `IntoIterator` implementations for the `Targets` type. ### Fixed - Fixed compilation on Rust 1.42.0 ([#1580], [#1581]) - **registry**: Ensure per-layer filter `enabled` state is cleared when a global filter short-circuits filter evaluation ([#1575]) - **layer**: Fixed `Layer::on_layer` not being called for `Box`ed `Layer`s, which broke per-layer filtering ([#1576]) ### Added - **filter**: Added `Targets::iter`, returning an iterator over the set of target-level pairs enabled by a `Targets` filter ([#1574]) - **filter**: Added `IntoIterator` implementations for `Targets` and `&Targets` ([#1574]) Thanks to new contributor @connec for contributing to this release! [#1580]: #1580 [#1581]: #1581 [#1575]: #1575 [#1576]: #1576 [#1574]: #1574
kaffarell
pushed a commit
to kaffarell/tracing
that referenced
this pull request
May 22, 2024
# 0.2.24 (September 19, 2021) This release contains a number of bug fixes, including a fix for `tracing-subscriber` failing to compile on the minimum supported Rust version of 1.42.0. It also adds `IntoIterator` implementations for the `Targets` type. ### Fixed - Fixed compilation on Rust 1.42.0 ([tokio-rs#1580], [tokio-rs#1581]) - **registry**: Ensure per-layer filter `enabled` state is cleared when a global filter short-circuits filter evaluation ([tokio-rs#1575]) - **layer**: Fixed `Layer::on_layer` not being called for `Box`ed `Layer`s, which broke per-layer filtering ([tokio-rs#1576]) ### Added - **filter**: Added `Targets::iter`, returning an iterator over the set of target-level pairs enabled by a `Targets` filter ([tokio-rs#1574]) - **filter**: Added `IntoIterator` implementations for `Targets` and `&Targets` ([tokio-rs#1574]) Thanks to new contributor @connec for contributing to this release! [tokio-rs#1580]: tokio-rs#1580 [tokio-rs#1581]: tokio-rs#1581 [tokio-rs#1575]: tokio-rs#1575 [tokio-rs#1576]: tokio-rs#1576 [tokio-rs#1574]: tokio-rs#1574
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Due to the CI issue fixed by PR #1580, we accidentally merged
tracing-subscriber
changes that don't compile on our MSRV, Rust1.42.0. This includes:
u64::MAX
rather thanstd::u64::MAX
)#[cfg(...)]
onif
expressionsstr::strip_suffix
method, which wasn't stable on 1.42.0This branch backports #1508 to
v0.1.x
, and also fixes additional issuesin code that only exists on
v0.1.x
.These changes are mostly very simple and mechanical. The only
significant change is changing the
StaticDirective
parsing code to notuse
strip_suffix
, which changes the implementation around a bit...butit's still pretty straightforward.
This should fix 1.42.0 compatibility.