Skip to content

Commit ef988a0

Browse files
authored
don't set MSRV and only run doctests on nightly (#37)
We have too many dependencies to actually guarantee our MSRV. We only run doctests on nightly so we don't have to generalize doctests for slightly different line numbers across different Rust versions. Our integration tests do generalize in this way, so we still run those on both stable and nightly.
1 parent d3d3a39 commit ef988a0

File tree

6 files changed

+21
-36
lines changed

6 files changed

+21
-36
lines changed

.github/workflows/ci.yml

+16-26
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ env:
4343
# `CRATE_NIGHTLY_XXX` are flags that we add to `XXX` only on the nightly
4444
# toolchain.
4545
CRATE_NIGHTLY_RUSTFLAGS: -Zrandomize-layout
46-
CRATE_NIGHTLY_MIRIFLAGS: "-Zmiri-disable-isolation -Zmiri-symbolic-alignment-check"
46+
CRATE_NIGHTLY_MIRIFLAGS: "-Zmiri-disable-isolation"
4747

4848
jobs:
4949
build_test:
5050
runs-on: ubuntu-latest
5151

5252
strategy:
5353
matrix:
54-
toolchain: [ "msrv", "stable", "nightly" ]
54+
toolchain: [ "stable", "nightly" ]
5555
target: [ "i686-unknown-linux-gnu", "x86_64-unknown-linux-gnu" ]
5656

5757
name: Build & Test (toolchain:${{ matrix.toolchain }}, target:${{ matrix.target }})
@@ -138,23 +138,27 @@ jobs:
138138

139139
- name: Check lib
140140
run: cargo +${{ env.CRATE_TOOLCHAIN }} check --target ${{ matrix.target }} --lib --verbose
141-
if: ${{ matrix.toolchain == 'msrv' }}
142141

143142
- name: Check extras
144143
run: cargo +${{ env.CRATE_TOOLCHAIN }} check --target ${{ matrix.target }} --all-targets --verbose
145-
if: ${{ matrix.toolchain != 'msrv' }}
146144

147-
- name: Test
148-
run: cargo +${{ env.CRATE_TOOLCHAIN }} test --target ${{ matrix.target }} --verbose
145+
- name: Test (doc)
146+
run: cargo +${{ env.CRATE_TOOLCHAIN }} test --target ${{ matrix.target }} --verbose --doc
149147
# Only run tests when targetting x86 (32- or 64-bit) - we're executing on
150148
# x86_64, so we can't run tests for any non-x86 target.
151-
if: ${{ matrix.toolchain != 'msrv' && (contains(matrix.target, 'x86_64') || contains(matrix.target, 'i686')) }}
149+
if: ${{ matrix.toolchain == 'nightly' && (contains(matrix.target, 'x86_64') || contains(matrix.target, 'i686')) }}
150+
151+
- name: Test (integration)
152+
run: cargo +${{ env.CRATE_TOOLCHAIN }} test --target ${{ matrix.target }} --verbose --tests
153+
# Only run tests when targetting x86 (32- or 64-bit) - we're executing on
154+
# x86_64, so we can't run tests for any non-x86 target.
155+
if: ${{ (contains(matrix.target, 'x86_64') || contains(matrix.target, 'i686')) }}
152156

153157
- name: Test (loom)
154158
run: cargo +${{ env.CRATE_TOOLCHAIN }} test --target ${{ matrix.target }} --verbose --release --tests
155159
# Only run tests when targetting x86 (32- or 64-bit) - we're executing on
156160
# x86_64, so we can't run tests for any non-x86 target.
157-
if: ${{ matrix.toolchain != 'msrv' && (contains(matrix.target, 'x86_64') || contains(matrix.target, 'aarch64')) }}
161+
if: ${{ (contains(matrix.target, 'x86_64') || contains(matrix.target, 'aarch64')) }}
158162
env:
159163
RUSTFLAGS: --cfg loom ${{ env.RUSTFLAGS }}
160164

@@ -198,19 +202,6 @@ jobs:
198202
set -e
199203
cargo clippy --all-targets
200204
201-
check_msrv:
202-
runs-on: ubuntu-latest
203-
name: Check MSRVs match
204-
steps:
205-
- uses: actions/checkout@v3
206-
- name: Rust Cache
207-
uses: Swatinem/[email protected]
208-
- uses: extractions/setup-just@v1
209-
# Make sure that the MSRV in async-backtrace's and async-backtrace-attributes's
210-
# `Cargo.toml` files are the same.
211-
- name: Check MSRVs match
212-
run: just check-msrv
213-
214205
check_readme:
215206
runs-on: ubuntu-latest
216207
name: Check README is correctly generated.
@@ -219,7 +210,7 @@ jobs:
219210
- name: Rust Cache
220211
uses: Swatinem/[email protected]
221212
- uses: extractions/setup-just@v1
222-
- name: Check MSRVs match
213+
- name: Check README matches
223214
run: |
224215
set -e
225216
cargo install cargo-readme --version 3.2.0
@@ -228,14 +219,13 @@ jobs:
228219
229220
ci-success:
230221
name: ci
231-
if: ${{ success() }}
222+
if: failure()
232223
needs:
233224
- build_test
234225
- check_fmt
235226
- check_clippy
236-
- check_msrv
237227
- check_readme
238228
runs-on: ubuntu-latest
239229
steps:
240-
- name: CI succeeded
241-
run: exit 0
230+
- name: CI failed
231+
run: exit 1

attributes/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "async-backtrace-attributes"
33
version = "0.2.6"
44
edition = "2018"
55
license = "MIT"
6-
rust-version = "1.59"
76
description = "Procedural macros for the `async-backtrace` crate."
87
repository = "https://github.com/tokio-rs/async-backtrace"
98

backtrace/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ version = "0.2.6"
44
edition = "2018"
55
license = "MIT"
66
readme = "../README.md"
7-
rust-version = "1.59"
87
description = "Efficient, logical 'backtraces' of async tasks."
98
repository = "https://github.com/tokio-rs/async-backtrace"
109
categories = ["asynchronous", "development-tools::debugging"]

backtrace/src/frame.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ impl Frame {
364364
}
365365

366366
/// Produces an iterator over this frame's ancestors.
367-
pub fn backtrace(&self) -> impl Iterator<Item = &Frame> + FusedIterator {
367+
pub fn backtrace(&self) -> impl FusedIterator<Item = &Frame> {
368368
/// An iterator that traverses up the tree of [`Frame`]s from a leaf.
369369
#[derive(Clone)]
370370
pub(crate) struct Backtrace<'a> {
@@ -399,7 +399,7 @@ impl Frame {
399399
/// The caller must ensure that the corresponding Kind::Root{mutex} is
400400
/// locked. The caller must also ensure that the returned iterator is
401401
/// dropped before the mutex is dropped.
402-
pub(crate) unsafe fn subframes(&self) -> impl Iterator<Item = &Frame> + FusedIterator {
402+
pub(crate) unsafe fn subframes(&self) -> impl FusedIterator<Item = &Frame> {
403403
pub(crate) struct Subframes<'a> {
404404
iter: linked_list::Iter<'a, Frame>,
405405
}

backtrace/src/location.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@ use futures::Future;
99
///
1010
/// #[tokio::main]
1111
/// async fn main() {
12-
/// # macro_rules! assert_eq { ($l:expr, $r:expr) => { debug_assert_eq!($l.len(), $r.len()); } }
13-
/// assert_eq!(location!().to_string(), "rust_out::main::{{closure}} at src/location.rs:8:16");
12+
/// assert_eq!(location!().to_string(), "rust_out::main::{{closure}} at backtrace/src/location.rs:8:16");
1413
///
1514
/// async {
16-
/// assert_eq!(location!().to_string(), "rust_out::main::{{closure}}::{{closure}} at src/location.rs:11:20");
15+
/// assert_eq!(location!().to_string(), "rust_out::main::{{closure}}::{{closure}} at backtrace/src/location.rs:11:20");
1716
/// }.await;
1817
///
1918
/// (|| async {
20-
/// assert_eq!(location!().to_string(), "rust_out::main::{{closure}}::{{closure}}::{{closure}} at src/location.rs:15:20");
19+
/// assert_eq!(location!().to_string(), "rust_out::main::{{closure}}::{{closure}}::{{closure}} at backtrace/src/location.rs:15:20");
2120
/// })().await;
2221
/// }
2322
/// ```

bors.toml

-2
This file was deleted.

0 commit comments

Comments
 (0)