diff --git a/Taskfile.yaml b/Taskfile.yaml index 3fef894cd..f39d8cde6 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -3,6 +3,11 @@ version: 3 vars: maybe_nightly: { sh: cargo version | grep -q 'nightly' && echo 'nightly' || echo '' } +# 2025-08-07 +# temporarily omitting `nio` runtime from CI tasks +# because the latest published version of `nio` (0.0.1) fails to build +# (ref: for example, https://github.com/ohkami-rs/ohkami/pull/493#issuecomment-3146636452) + tasks: CI: deps: @@ -18,7 +23,7 @@ tasks: deps: - task: test:tls - task: test:no_rt - - for: [tokio, smol, nio, glommio, lambda, worker] + - for: [tokio, smol, glommio, lambda, worker] # [tokio, smol, nio, glommio, lambda, worker] task: test:rt vars: { rt: '{{.ITEM}}' } test:other: @@ -32,23 +37,23 @@ tasks: deps: - task: check:tls - task: check:no_rt - - for: [tokio, smol, nio, glommio, lambda] + - for: [tokio, smol, glommio, lambda] # [tokio, smol, nio, glommio, lambda] task: check:rt-native_target vars: { rt: '{{.ITEM}}' } - task: check:rt_worker bench:dryrun: status: - - (! cargo version | grep -q 'nightly') + - '[ "{{.maybe_nightly}}" != nightly ]' # skip if not nightly cmds: - cd benches && cargo bench --features DEBUG --no-run - cd benches_rt/vs_actix-web && cargo check - - for: [tokio, smol, nio, glommio] + - for: [tokio, smol, glommio] # [tokio, smol, nio, glommio] cmd: cd benches_rt/{{.ITEM}} && cargo check bench: status: - - (! cargo version | grep -q 'nightly') + - '[ "{{.maybe_nightly}}" != nightly ]' # skip if not nightly dir: ./benches cmds: - task: bench:dryrun diff --git a/benches_rt/glommio/src/bin/param.rs b/benches_rt/glommio/src/bin/param.rs index 8be0371e3..833001371 100644 --- a/benches_rt/glommio/src/bin/param.rs +++ b/benches_rt/glommio/src/bin/param.rs @@ -4,7 +4,7 @@ use glommio::{LocalExecutorPoolBuilder, PoolPlacement, CpuSet}; #[inline(always)] -async fn echo_id(id: String) -> String { +async fn echo_id(Path(id): Path) -> String { id } diff --git a/benches_rt/nio/src/bin/param.rs b/benches_rt/nio/src/bin/param.rs index ddedad5a2..f75ca927c 100644 --- a/benches_rt/nio/src/bin/param.rs +++ b/benches_rt/nio/src/bin/param.rs @@ -4,6 +4,6 @@ use ohkami::prelude::*; async fn main() { Ohkami::new(( "/user/:id" - .GET(|id: String| async {id}), + .GET(|Path(id): Path| async {id}), )).howl("0.0.0.0:3000").await } diff --git a/benches_rt/smol/src/bin/param.rs b/benches_rt/smol/src/bin/param.rs index ea89d986a..f9a2d2b89 100644 --- a/benches_rt/smol/src/bin/param.rs +++ b/benches_rt/smol/src/bin/param.rs @@ -2,7 +2,7 @@ use ohkami::prelude::*; #[inline(always)] -async fn echo_id(id: String) -> String { +async fn echo_id(Path(id): Path) -> String { id } diff --git a/benches_rt/tokio/src/bin/hello.rs b/benches_rt/tokio/src/bin/hello.rs index 632f3185b..2514f1183 100644 --- a/benches_rt/tokio/src/bin/hello.rs +++ b/benches_rt/tokio/src/bin/hello.rs @@ -1,12 +1,12 @@ use ohkami::prelude::*; -use ohkami::format::Json; +use ohkami::format::{Path, Json}; #[derive(Serialize)] struct Message { message: String } -async fn hello(name: &str) -> Json { +async fn hello(Path(name): Path<&str>) -> Json { Json(Message { message: format!("Hello, {name}!") }) diff --git a/benches_rt/tokio/src/bin/param.rs b/benches_rt/tokio/src/bin/param.rs index 706fc1b93..934cc7b03 100644 --- a/benches_rt/tokio/src/bin/param.rs +++ b/benches_rt/tokio/src/bin/param.rs @@ -8,6 +8,6 @@ fn main() { .expect("Failed building the Runtime") .block_on(Ohkami::new(( "/user/:id" - .GET(|id: String| async {id}), + .GET(|Path(id): Path| async {id}), )).howl("0.0.0.0:3000")) } diff --git a/benches_rt/tokio/src/bin/sleep.rs b/benches_rt/tokio/src/bin/sleep.rs index 2f9611a25..eaf3a1055 100644 --- a/benches_rt/tokio/src/bin/sleep.rs +++ b/benches_rt/tokio/src/bin/sleep.rs @@ -1,6 +1,6 @@ use ohkami::prelude::*; -async fn sleeping_hello(secs: u64) -> &'static str { +async fn sleeping_hello(Path(secs): Path) -> &'static str { tokio::time::sleep(std::time::Duration::from_secs(secs)).await; "Hello, sleep!" }