From ff45311db8e67342100334738ae3e1a740b954e7 Mon Sep 17 00:00:00 2001 From: Alice Ryhl Date: Sun, 26 Feb 2023 17:42:23 +0100 Subject: [PATCH 1/6] ci: upgrade ntapi dev-dependency and enable std This fixes a compile failure in our test suite where there is a mismatch between two versions of the c_void type. --- tokio/Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index 0e96ccb7cd7..28cc7890036 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -136,7 +136,8 @@ features = [ ] [target.'cfg(windows)'.dev-dependencies.ntapi] -version = "0.3.6" +version = "0.4.0" +features = ["std"] [dev-dependencies] tokio-test = { version = "0.4.0", path = "../tokio-test" } From f64c83016b9619f0b7fa2bc037b1b2dd308abb57 Mon Sep 17 00:00:00 2001 From: Alice Ryhl Date: Sun, 26 Feb 2023 17:46:28 +0100 Subject: [PATCH 2/6] Apparently the std feature is on winapi rather than ntapi --- tokio/Cargo.toml | 1 - tokio/tests/net_named_pipe.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index 28cc7890036..f0756f3ca73 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -137,7 +137,6 @@ features = [ [target.'cfg(windows)'.dev-dependencies.ntapi] version = "0.4.0" -features = ["std"] [dev-dependencies] tokio-test = { version = "0.4.0", path = "../tokio-test" } diff --git a/tokio/tests/net_named_pipe.rs b/tokio/tests/net_named_pipe.rs index 3ddc4c8a9bf..02c8a0919f5 100644 --- a/tokio/tests/net_named_pipe.rs +++ b/tokio/tests/net_named_pipe.rs @@ -417,7 +417,7 @@ fn num_instances(pipe_name: impl AsRef) -> io::Result { let status = unsafe { ntioapi::NtQueryDirectoryFile( - root.as_raw_handle(), + root.as_raw_handle().cast(), std::ptr::null_mut(), None, std::ptr::null_mut(), From fa020e7059b5d26e5d55991cc7d465041d267062 Mon Sep 17 00:00:00 2001 From: Alice Ryhl Date: Sun, 26 Feb 2023 17:59:24 +0100 Subject: [PATCH 3/6] We're not upgrading for now. It breaks the wasm build. :) --- tokio/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index f0756f3ca73..0e96ccb7cd7 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -136,7 +136,7 @@ features = [ ] [target.'cfg(windows)'.dev-dependencies.ntapi] -version = "0.4.0" +version = "0.3.6" [dev-dependencies] tokio-test = { version = "0.4.0", path = "../tokio-test" } From 5beae401fcf584dcaf334512d54eb8bf275d48a7 Mon Sep 17 00:00:00 2001 From: Alice Ryhl Date: Sun, 26 Feb 2023 18:03:17 +0100 Subject: [PATCH 4/6] Where does errno come from? --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c00616005a..fa6c2e08777 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -582,6 +582,8 @@ jobs: - name: Install cargo-wasi run: cargo install cargo-wasi + - name: Cargo tree + run: cargo tree -p tokio --target wasm32-wasi --features full - name: WASI test tokio full run: cargo test -p tokio --target wasm32-wasi --features full From 604693438a8172770bd07ab59cd81d1fc34bd50e Mon Sep 17 00:00:00 2001 From: Alice Ryhl Date: Sun, 26 Feb 2023 18:11:44 +0100 Subject: [PATCH 5/6] maybe this works --- tokio/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index 0e96ccb7cd7..3087c3318e5 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -143,11 +143,11 @@ tokio-test = { version = "0.4.0", path = "../tokio-test" } tokio-stream = { version = "0.1", path = "../tokio-stream" } futures = { version = "0.3.0", features = ["async-await"] } mockall = "0.11.1" -tempfile = "3.1.0" async-stream = "0.3" [target.'cfg(not(any(target_arch = "wasm32", target_arch = "wasm64")))'.dev-dependencies] socket2 = "0.4" +tempfile = "3.1.0" [target.'cfg(not(all(any(target_arch = "wasm32", target_arch = "wasm64"), target_os = "unknown")))'.dev-dependencies] rand = "0.8.0" From e11dd468285bbcfd0c331dca7419a7efdf55785e Mon Sep 17 00:00:00 2001 From: Alice Ryhl Date: Sun, 26 Feb 2023 18:15:53 +0100 Subject: [PATCH 6/6] remove debugging --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa6c2e08777..0c00616005a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -582,8 +582,6 @@ jobs: - name: Install cargo-wasi run: cargo install cargo-wasi - - name: Cargo tree - run: cargo tree -p tokio --target wasm32-wasi --features full - name: WASI test tokio full run: cargo test -p tokio --target wasm32-wasi --features full