Skip to content

Commit

Permalink
Bump MSRV to 1.74
Browse files Browse the repository at this point in the history
We need to bump MSRV, since type inference fails on test suite using runtimes
  • Loading branch information
h33p committed Dec 5, 2023
1 parent a09bce2 commit 09a8786
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/asan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
matrix:
# TODO: enable windows, macos
os: [ubuntu-latest]
toolchain: ["nightly-2023-09-01"]
toolchain: ["nightly-2023-10-01"]
rustflags: ["--cfg mfio_assume_linear_types --cfg tokio_unstable", "--cfg tokio_unstable"]
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
matrix:
# TODO: enable windows, macos
os: [ubuntu-latest]
toolchain: ["nightly-2023-09-01"]
toolchain: ["nightly-2023-10-01"]
rustflags: ["--cfg mfio_assume_linear_types --cfg tokio_unstable", "--cfg tokio_unstable"]
steps:
- uses: actions/checkout@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
toolchain: ["1.72", "stable"]
toolchain: ["1.74", "stable"]
rustflags: ["--cfg mfio_assume_linear_types --cfg tokio_unstable", "--cfg tokio_unstable"]
steps:
- uses: actions/checkout@v2
Expand All @@ -35,7 +35,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
toolchain: ["1.72", "stable", "nightly-2023-09-01"]
toolchain: ["1.74", "stable", "nightly-2023-10-01"]
rustflags: ["--cfg mfio_assume_linear_types --cfg tokio_unstable", "--cfg tokio_unstable"]
steps:
- uses: actions/checkout@v2
Expand All @@ -57,7 +57,7 @@ jobs:
strategy:
fail-fast: false
matrix:
toolchain: ["1.72", "stable"]
toolchain: ["1.74", "stable"]
rustflags: ["--cfg mfio_assume_linear_types --cfg tokio_unstable", "--cfg tokio_unstable"]
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-09-01
toolchain: nightly-2023-10-01
override: true
- run: cargo install grcov
- name: Run tests with coverage
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/miri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
RUSTFLAGS: --cfg tokio_unstable ${{matrix.rustflags}}
strategy:
matrix:
toolchain: ["nightly-2023-09-01"]
toolchain: ["nightly-2023-10-01"]
seed: [1, 2, 3, 4, 5, 6, 7, 8]
rustflags: ["", "--cfg mfio_assume_linear_types"]
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
toolchain: ["1.72", "stable"]
toolchain: ["1.74", "stable"]
rustflags: ["--cfg mfio_assume_linear_types --cfg tokio_unstable", "--cfg tokio_unstable"]
steps:
- uses: actions/checkout@v2
Expand All @@ -38,7 +38,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
toolchain: ["1.72", "stable", "nightly-2023-09-01"]
toolchain: ["1.74", "stable", "nightly-2023-10-01"]
rustflags: ["--cfg mfio_assume_linear_types --cfg tokio_unstable", "--cfg tokio_unstable"]
steps:
- uses: actions/checkout@v2
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# mfio

[![Build and test]][workflows] [![Rustc 1.72]][rust] [![codecov]][codecov-link]
[![Build and test]][workflows] [![Rustc 1.74]][rust] [![codecov]][codecov-link]

[Build and test]: https://github.com/memflow/mfio/actions/workflows/build.yml/badge.svg
[workflows]: https://github.com/memflow/mfio/actions/workflows/build.yml
[MIT licensed]: https://img.shields.io/badge/license-MIT-blue.svg
[Rustc 1.72]: https://img.shields.io/badge/rustc-1.72+-lightgray.svg
[rust]: https://blog.rust-lang.org/2023/08/24/Rust-1.72.0.html
[Rustc 1.74]: https://img.shields.io/badge/rustc-1.74+-lightgray.svg
[rust]: https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html
[codecov]: https://codecov.io/gh/memflow/mfio/branch/main/graph/badge.svg?token=IJ1K4QPAIM
[codecov-link]: https://codecov.io/gh/memflow/mfio

Expand Down
7 changes: 7 additions & 0 deletions mfio-rt/src/test_suite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,13 @@ macro_rules! net_test_suite {
unsafe { core::mem::transmute(val) }
}

async fn test_run<T: 'static, F: Future<Output = ()>>(

Check warning on line 847 in mfio-rt/src/test_suite.rs

View workflow job for this annotation

GitHub Actions / clippy

function `test_run` is never used

warning: function `test_run` is never used --> mfio-rt/src/test_suite.rs:847:22 | 847 | async fn test_run<T: 'static, F: Future<Output = ()>>( | ^^^^^^^^ | ::: mfio-rt/src/native/mod.rs:1296:9 | 1296 | / net_test_suite!(net_tests_all, |closure| { 1297 | | let _ = ::env_logger::builder().is_test(true).try_init(); 1298 | | tokio::runtime::Runtime::new().unwrap().block_on(async { 1299 | | use mfio::backend::{integrations::tokio::Tokio, *}; ... | 1307 | | }); 1308 | | }); | |__________- in this macro invocation | = note: this warning originates in the macro `net_test_suite` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 847 in mfio-rt/src/test_suite.rs

View workflow job for this annotation

GitHub Actions / clippy

function `test_run` is never used

warning: function `test_run` is never used --> mfio-rt/src/test_suite.rs:847:22 | 847 | async fn test_run<T: 'static, F: Future<Output = ()>>( | ^^^^^^^^ | ::: mfio-rt/src/native/mod.rs:1285:9 | 1285 | / net_test_suite!(net_tests_default, |closure| { 1286 | | let _ = ::env_logger::builder().is_test(true).try_init(); 1287 | | 1288 | | tokio::runtime::Runtime::new().unwrap().block_on(async { ... | 1293 | | }); 1294 | | }); | |__________- in this macro invocation | = note: this warning originates in the macro `net_test_suite` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 847 in mfio-rt/src/test_suite.rs

View workflow job for this annotation

GitHub Actions / clippy

function `test_run` is never used

warning: function `test_run` is never used --> mfio-rt/src/test_suite.rs:847:22 | 847 | async fn test_run<T: 'static, F: Future<Output = ()>>( | ^^^^^^^^ | ::: mfio-rt/src/native/mod.rs:1225:9 | 1225 | / net_test_suite!(net_tests_all, |closure| { 1226 | | let _ = ::env_logger::builder().is_test(true).try_init(); 1227 | | smol::block_on(async { 1228 | | use mfio::backend::{integrations::async_io::AsyncIo, *}; ... | 1236 | | }); 1237 | | }); | |__________- in this macro invocation | = note: this warning originates in the macro `net_test_suite` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 847 in mfio-rt/src/test_suite.rs

View workflow job for this annotation

GitHub Actions / clippy

function `test_run` is never used

warning: function `test_run` is never used --> mfio-rt/src/test_suite.rs:847:22 | 847 | async fn test_run<T: 'static, F: Future<Output = ()>>( | ^^^^^^^^ | ::: mfio-rt/src/native/mod.rs:1214:9 | 1214 | / net_test_suite!(net_tests_default, |closure| { 1215 | | let _ = ::env_logger::builder().is_test(true).try_init(); 1216 | | 1217 | | smol::block_on(async { ... | 1222 | | }); 1223 | | }); | |__________- in this macro invocation | = note: this warning originates in the macro `net_test_suite` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 847 in mfio-rt/src/test_suite.rs

View workflow job for this annotation

GitHub Actions / clippy

function `test_run` is never used

warning: function `test_run` is never used --> mfio-rt/src/test_suite.rs:847:22 | 847 | async fn test_run<T: 'static, F: Future<Output = ()>>( | ^^^^^^^^ | ::: mfio-rt/src/native/mod.rs:1157:5 | 1157 | / net_test_suite!(net_tests_all, |closure| { 1158 | | let _ = ::env_logger::builder().is_test(true).try_init(); 1159 | | for (name, rt) in crate::NativeRt::builder().enable_all().build_each() { 1160 | | println!("{name}"); ... | 1165 | | } 1166 | | }); | |______- in this macro invocation | = note: this warning originates in the macro `net_test_suite` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 847 in mfio-rt/src/test_suite.rs

View workflow job for this annotation

GitHub Actions / clippy

function `test_run` is never used

warning: function `test_run` is never used --> mfio-rt/src/test_suite.rs:847:22 | 847 | async fn test_run<T: 'static, F: Future<Output = ()>>( | ^^^^^^^^ | ::: mfio-rt/src/native/mod.rs:1150:5 | 1150 | / net_test_suite!(net_tests_default, |closure| { 1151 | | let _ = ::env_logger::builder().is_test(true).try_init(); 1152 | | let mut rt = crate::NativeRt::default(); 1153 | | let rt = staticify(&mut rt); 1154 | | rt.run(closure); 1155 | | }); | |______- in this macro invocation | = note: this warning originates in the macro `net_test_suite` (in Nightly builds, run with -Z macro-backtrace for more info)
rt: &'static T,
closure: fn(&'static T) -> F,
) {
closure(rt).await
}

#[cfg(not(miri))]
#[test]
fn tcp_connect() {
Expand Down

0 comments on commit 09a8786

Please sign in to comment.