From e905cf8d3545fef8ae2d046b7b34628d521d8ca7 Mon Sep 17 00:00:00 2001 From: gftea Date: Sat, 11 Jun 2022 22:24:27 +0200 Subject: [PATCH 1/5] net: be more specific about winapi features (#4737) --- tokio/Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index bb414e498fe..c7af179bccb 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -53,6 +53,7 @@ net = [ "mio/net", "socket2", "winapi/namedpipeapi", + "winapi/std", ] process = [ "bytes", @@ -118,7 +119,7 @@ nix = { version = "0.24", default-features = false, features = ["fs", "socket"] [target.'cfg(windows)'.dependencies.winapi] version = "0.3.8" default-features = false -features = ["std", "winsock2", "mswsock", "handleapi", "ws2ipdef", "ws2tcpip"] + optional = true [target.'cfg(windows)'.dev-dependencies.ntapi] From 76a611d6947b306da91d7a0e08c03d39975b56df Mon Sep 17 00:00:00 2001 From: gftea Date: Mon, 13 Jun 2022 18:31:53 +0200 Subject: [PATCH 2/5] update feature dependencies according to cargo tree output (#4764) --- tokio/Cargo.toml | 41 +++++++++++------------------------------ 1 file changed, 11 insertions(+), 30 deletions(-) diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index c7af179bccb..23e9457f0e1 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -52,8 +52,12 @@ net = [ "mio/os-ext", "mio/net", "socket2", - "winapi/namedpipeapi", "winapi/std", + "winapi/fileapi", + "winapi/handleapi", + "winapi/namedpipeapi", + "winapi/winbase", + "winapi/winnt", ] process = [ "bytes", @@ -63,7 +67,12 @@ process = [ "mio/os-ext", "mio/net", "signal-hook-registry", + "winapi/std", + "winapi/handleapi", + "winapi/processthreadsapi", "winapi/threadpoollegacyapiset", + "winapi/winbase", + "winapi/winnt", ] # Includes basic task execution capabilities rt = ["once_cell"] @@ -79,6 +88,7 @@ signal = [ "mio/os-ext", "signal-hook-registry", "winapi/consoleapi", + "winapi/wincon", ] sync = [] test-util = ["rt", "sync", "time"] @@ -112,41 +122,12 @@ tracing = { version = "0.1.25", default-features = false, features = ["std"], op libc = { version = "0.2.42", optional = true } signal-hook-registry = { version = "1.1.1", optional = true } -[target.'cfg(unix)'.dev-dependencies] -libc = { version = "0.2.42" } -nix = { version = "0.24", default-features = false, features = ["fs", "socket"] } - [target.'cfg(windows)'.dependencies.winapi] version = "0.3.8" default-features = false optional = true -[target.'cfg(windows)'.dev-dependencies.ntapi] -version = "0.3.6" - -[dev-dependencies] -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(target_arch = "wasm32"))'.dev-dependencies] -proptest = "1" -rand = "0.8.0" -socket2 = "0.4" - -[target.'cfg(target_arch = "wasm32")'.dev-dependencies] -wasm-bindgen-test = "0.3.0" - -[target.'cfg(target_os = "freebsd")'.dev-dependencies] -mio-aio = { version = "0.6.0", features = ["tokio"] } - -[target.'cfg(loom)'.dev-dependencies] -loom = { version = "0.5.2", features = ["futures", "checkpoint"] } - [package.metadata.docs.rs] all-features = true # enable unstable features in the documentation From ba6f8b282a5f86e7502f88cc5def35dd29b3de2b Mon Sep 17 00:00:00 2001 From: gftea Date: Mon, 13 Jun 2022 18:33:24 +0200 Subject: [PATCH 3/5] restore cargo hack changes (#4764) --- tokio/Cargo.toml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index 23e9457f0e1..a5905d4d2e0 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -122,12 +122,41 @@ tracing = { version = "0.1.25", default-features = false, features = ["std"], op libc = { version = "0.2.42", optional = true } signal-hook-registry = { version = "1.1.1", optional = true } +[target.'cfg(unix)'.dev-dependencies] +libc = { version = "0.2.42" } +nix = { version = "0.24", default-features = false, features = ["fs", "socket"] } + [target.'cfg(windows)'.dependencies.winapi] version = "0.3.8" default-features = false optional = true +[target.'cfg(windows)'.dev-dependencies.ntapi] +version = "0.3.6" + +[dev-dependencies] +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(target_arch = "wasm32"))'.dev-dependencies] +proptest = "1" +rand = "0.8.0" +socket2 = "0.4" + +[target.'cfg(target_arch = "wasm32")'.dev-dependencies] +wasm-bindgen-test = "0.3.0" + +[target.'cfg(target_os = "freebsd")'.dev-dependencies] +mio-aio = { version = "0.6.0", features = ["tokio"] } + +[target.'cfg(loom)'.dev-dependencies] +loom = { version = "0.5.2", features = ["futures", "checkpoint"] } + [package.metadata.docs.rs] all-features = true # enable unstable features in the documentation From cd79703a228b947a85649a47bc728ba0d739a7d8 Mon Sep 17 00:00:00 2001 From: gftea <1705787+gftea@users.noreply.github.com> Date: Wed, 15 Jun 2022 13:55:18 +0200 Subject: [PATCH 4/5] review update: always enable winapi/std (#4764) --- tokio/Cargo.toml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index a5905d4d2e0..15c2ecf9f7e 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -52,7 +52,6 @@ net = [ "mio/os-ext", "mio/net", "socket2", - "winapi/std", "winapi/fileapi", "winapi/handleapi", "winapi/namedpipeapi", @@ -67,12 +66,12 @@ process = [ "mio/os-ext", "mio/net", "signal-hook-registry", - "winapi/std", "winapi/handleapi", "winapi/processthreadsapi", "winapi/threadpoollegacyapiset", "winapi/winbase", "winapi/winnt", + "winapi/minwindef", ] # Includes basic task execution capabilities rt = ["once_cell"] @@ -129,7 +128,7 @@ nix = { version = "0.24", default-features = false, features = ["fs", "socket"] [target.'cfg(windows)'.dependencies.winapi] version = "0.3.8" default-features = false - +features = ["std"] optional = true [target.'cfg(windows)'.dev-dependencies.ntapi] From 337cb0c576abb9db5e06eabc892bd211d26ffda2 Mon Sep 17 00:00:00 2001 From: gftea <1705787+gftea@users.noreply.github.com> Date: Thu, 16 Jun 2022 10:50:21 +0200 Subject: [PATCH 5/5] add winapi/minwindef to net and signal --- tokio/Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index 15c2ecf9f7e..c9d2e4e6d82 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -57,6 +57,7 @@ net = [ "winapi/namedpipeapi", "winapi/winbase", "winapi/winnt", + "winapi/minwindef", ] process = [ "bytes", @@ -88,6 +89,7 @@ signal = [ "signal-hook-registry", "winapi/consoleapi", "winapi/wincon", + "winapi/minwindef", ] sync = [] test-util = ["rt", "sync", "time"]