d-0020-remove-windows-dependencies
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Mon, 6 May 2024 08:25:32 +0000 (10:25 +0200)
committerFabian Grünbichler <debian@fabian.gruenbichler.email>
Wed, 4 Dec 2024 17:07:54 +0000 (18:07 +0100)
use something like

 find src compiler library -iname Cargo.toml -exec grep -H -n -e 'windows-sys' -e 'winapi' -e 'ntapi' -e 'wincon' -e 'winreg' -e 'windows' {} \;

to find and eliminate dependencies on windows-only crates when rebasing.

windows-bindgen and windows-metadata should not be removed, they are needed for
the build and don't pull in windows-sys and friends.

Forwarded: not-needed

===================================================================

Gbp-Pq: Topic prune
Gbp-Pq: Name d-0020-remove-windows-dependencies.patch

26 files changed:
compiler/rustc_codegen_ssa/Cargo.toml
compiler/rustc_data_structures/Cargo.toml
compiler/rustc_driver_impl/Cargo.toml
compiler/rustc_errors/Cargo.toml
compiler/rustc_session/Cargo.toml
library/backtrace/Cargo.toml
library/backtrace/crates/as-if-std/Cargo.toml
src/bootstrap/Cargo.toml
src/tools/cargo/Cargo.toml
src/tools/cargo/crates/cargo-test-support/Cargo.toml
src/tools/cargo/crates/cargo-util/Cargo.toml
src/tools/cargo/crates/home/Cargo.toml
src/tools/cargo/credential/cargo-credential/Cargo.toml
src/tools/cargo/src/cargo/util/auth/mod.rs
src/tools/compiletest/Cargo.toml
src/tools/rust-analyzer/crates/profile/Cargo.toml
src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml
src/tools/rust-analyzer/crates/stdx/Cargo.toml
src/tools/rustc-perf/collector/Cargo.toml
src/tools/rustc-perf/collector/compile-benchmarks/cargo-0.60.0/Cargo.toml
src/tools/rustc-perf/collector/compile-benchmarks/style-servo/components/gfx/Cargo.toml
src/tools/rustc-perf/collector/compile-benchmarks/style-servo/components/style/Cargo.toml
src/tools/rustc-perf/collector/compile-benchmarks/tokio-webpush-simple/native-tls-0.1.5/Cargo.toml
src/tools/rustc-perf/collector/compile-benchmarks/webrender-2022/example-compositor/compositor/Cargo.toml
src/tools/rustc-perf/collector/compile-benchmarks/webrender-2022/webrender/Cargo.toml
src/tools/rustc-perf/collector/compile-benchmarks/webrender-2022/wrench/Cargo.toml

index dffb7a7271e095229a6a6926333bd2327215c777..e425a4c4d60f61d1fac3a5c6a5018c2b6f9c53bf 100644 (file)
@@ -55,7 +55,3 @@ libc = "0.2.50"
 version = "0.36.2"
 default-features = false
 features = ["read_core", "elf", "macho", "pe", "xcoff", "unaligned", "archive", "write", "wasm"]
-
-[target.'cfg(windows)'.dependencies.windows]
-version = "0.57.0"
-features = ["Win32_Globalization"]
index d73cf11ee64d6e6d95bffc57157e75f18aca19c5..8cf85d2b8bcf6467b23a7d8d77b1f2d09d6b0cf8 100644 (file)
@@ -31,16 +31,6 @@ tracing = "0.1"
 [dependencies.parking_lot]
 version = "0.12"
 
-[target.'cfg(windows)'.dependencies.windows]
-version = "0.57.0"
-features = [
-    "Win32_Foundation",
-    "Win32_Storage_FileSystem",
-    "Win32_System_IO",
-    "Win32_System_ProcessStatus",
-    "Win32_System_Threading",
-]
-
 [target.'cfg(unix)'.dependencies]
 # tidy-alphabetical-start
 libc = "0.2"
index ef577c032189925c28dbdc3830a2ee9deba43134..447b9f2a3d786306ec4f9f713d173f4e4d6fe1b0 100644 (file)
@@ -58,12 +58,6 @@ tracing = { version = "0.1.35" }
 libc = "0.2"
 # tidy-alphabetical-end
 
-[target.'cfg(windows)'.dependencies.windows]
-version = "0.57.0"
-features = [
-    "Win32_System_Diagnostics_Debug",
-]
-
 [target.'cfg(not(target_family = "wasm"))'.dependencies]
 # tidy-alphabetical-start
 ctrlc = "3.4.4"
index 00eaf4d5a862dbfe86f6bfeab46d6db95566bc29..159c390e717b4f93c5a7dd7037d2a4debda8ca6b 100644 (file)
@@ -28,14 +28,6 @@ termize = "0.1.1"
 tracing = "0.1"
 # tidy-alphabetical-end
 
-[target.'cfg(windows)'.dependencies.windows]
-version = "0.57.0"
-features = [
-    "Win32_Foundation",
-    "Win32_Security",
-    "Win32_System_Threading",
-]
-
 [features]
 # tidy-alphabetical-start
 rustc_use_parallel_compiler = ['rustc_error_messages/rustc_use_parallel_compiler']
index 75cc8f18a5455b5842874052910bbd1c90a51fa7..099c79d0aad1c05a0be35e3ce12b5f3ad30b8276 100644 (file)
@@ -28,10 +28,3 @@ tracing = "0.1"
 # tidy-alphabetical-start
 libc = "0.2"
 # tidy-alphabetical-end
-
-[target.'cfg(windows)'.dependencies.windows]
-version = "0.57.0"
-features = [
-    "Win32_Foundation",
-    "Win32_System_LibraryLoader",
-]
index 8fa5f3fa9615e0f4c391f80b861b9a490a938d41..f80a54a461faf235242a187a80a4e683f5f6efc8 100644 (file)
@@ -38,9 +38,6 @@ cpp_demangle = { default-features = false, version = "0.4.0", optional = true, f
   "alloc",
 ] }
 
-[target.'cfg(windows)'.dependencies]
-windows-targets = "0.52.6"
-
 [target.'cfg(not(all(windows, target_env = "msvc", not(target_vendor = "uwp"))))'.dependencies]
 miniz_oxide = { version = "0.8", default-features = false }
 addr2line = { version = "0.24.0", default-features = false }
index a9c29cecf443739316f3f855e71e8d67a1871dce..11bfd53d9042ef816b1fc1ee9aae682ce2431342 100644 (file)
@@ -26,9 +26,6 @@ default-features = false
 optional = true
 features = ['read_core', 'elf', 'macho', 'pe', 'xcoff', 'unaligned', 'archive']
 
-[target.'cfg(windows)'.dependencies]
-windows-targets = "0.52.6"
-
 [features]
 default = ['backtrace']
 backtrace = ['addr2line', 'miniz_oxide', 'object']
index ba505089a000a4d89193ed5325ebb490e8a0a3b3..1618dde7b9bde2adb82f2967ad772d6beee32443 100644 (file)
@@ -65,21 +65,6 @@ xz2 = "0.1"
 # Dependencies needed by the build-metrics feature
 sysinfo = { version = "0.31.2", default-features = false, optional = true, features = ["system"] }
 
-[target.'cfg(windows)'.dependencies.junction]
-version = "1.0.0"
-
-[target.'cfg(windows)'.dependencies.windows]
-version = "0.52"
-features = [
-    "Win32_Foundation",
-    "Win32_Security",
-    "Win32_System_Diagnostics_Debug",
-    "Win32_System_JobObjects",
-    "Win32_System_ProcessStatus",
-    "Win32_System_Threading",
-    "Win32_System_Time",
-]
-
 [dev-dependencies]
 pretty_assertions = "1.4"
 
index 32dc2c5727d64f0dc8259dd27170f4a5138d3a82..445029d19e518f5880ca1959fbe3b5f1608a2af6 100644 (file)
@@ -2,7 +2,9 @@
 resolver = "2"
 members = [
   "crates/*",
-  "credential/*",
+  "credential/cargo-credential",
+  "credential/cargo-credential-1password",
+  "credential/cargo-credential-libsecret",
   "benches/benchsuite",
   "benches/capture",
 ]
@@ -28,8 +30,6 @@ bytesize = "1.3"
 cargo = { path = "" }
 cargo-credential = { version = "0.4.2", path = "credential/cargo-credential" }
 cargo-credential-libsecret = { version = "0.4.7", path = "credential/cargo-credential-libsecret" }
-cargo-credential-macos-keychain = { version = "0.4.7", path = "credential/cargo-credential-macos-keychain" }
-cargo-credential-wincred = { version = "0.4.7", path = "credential/cargo-credential-wincred" }
 cargo-platform = { path = "crates/cargo-platform", version = "0.1.5" }
 cargo-test-macro = { version = "0.3.0", path = "crates/cargo-test-macro" }
 cargo-test-support = { version = "0.5.0", path = "crates/cargo-test-support" }
@@ -110,7 +110,6 @@ unicode-xid = "0.2.4"
 url = "2.5.2"
 varisat = "0.2.2"
 walkdir = "2.5.0"
-windows-sys = "0.59"
 
 [workspace.lints.rust]
 rust_2018_idioms = "warn" # TODO: could this be removed?
@@ -152,6 +151,7 @@ base64.workspace = true
 blake3.workspace = true
 bytesize.workspace = true
 cargo-credential.workspace = true
+cargo-credential-libsecret.workspace = true
 cargo-platform.workspace = true
 cargo-util-schemas.workspace = true
 cargo-util.workspace = true
@@ -220,27 +220,9 @@ libc.workspace = true
 [target.'cfg(target_os = "linux")'.dependencies]
 cargo-credential-libsecret.workspace = true
 
-[target.'cfg(target_os = "macos")'.dependencies]
-cargo-credential-macos-keychain.workspace = true
-
 [target.'cfg(not(windows))'.dependencies]
 openssl = { workspace = true, optional = true }
 
-[target.'cfg(windows)'.dependencies]
-cargo-credential-wincred.workspace = true
-
-[target.'cfg(windows)'.dependencies.windows-sys]
-workspace = true
-features = [
-  "Win32_Foundation",
-  "Win32_Security",
-  "Win32_Storage_FileSystem",
-  "Win32_System_IO",
-  "Win32_System_Console",
-  "Win32_System_JobObjects",
-  "Win32_System_Threading",
-]
-
 [dev-dependencies]
 annotate-snippets = { workspace = true, features = ["testing-colors"] }
 cargo-test-support.workspace = true
index c8420eb134c2a4396ac0445774114818750986c5..06dd705b1301faa1758bb7f5672a819fa0d32d69 100644 (file)
@@ -31,8 +31,5 @@ toml.workspace = true
 url.workspace = true
 walkdir.workspace = true
 
-[target.'cfg(windows)'.dependencies]
-windows-sys = { workspace = true, features = ["Win32_Storage_FileSystem"] }
-
 [lints]
 workspace = true
index 554689c1a0512f06a148213a5d357e5a059569d5..bca1f67c62ea70b516c6a03a53db59bf46e59205 100644 (file)
@@ -21,15 +21,8 @@ tempfile.workspace = true
 tracing.workspace = true
 walkdir.workspace = true
 
-[target.'cfg(target_os = "macos")'.dependencies]
-core-foundation.workspace = true
-
 [target.'cfg(unix)'.dependencies]
 libc.workspace = true
 
-[target.'cfg(windows)'.dependencies]
-miow.workspace = true
-windows-sys = { workspace = true, features = ["Win32_Storage_FileSystem", "Win32_Foundation", "Win32_System_Console"] }
-
 [lints]
 workspace = true
index 91742e534b68147c5acf86288a63bf3ea240fe04..0054cadc37cb46f05807348340d46a78e75edd02 100644 (file)
@@ -17,8 +17,5 @@ homepage.workspace = true
 repository.workspace = true
 description = "Shared definitions of home directories."
 
-[target.'cfg(windows)'.dependencies]
-windows-sys = { workspace = true, features = ["Win32_Foundation", "Win32_UI_Shell", "Win32_System_Com"] }
-
 [lints]
 workspace = true
index b3da12d3938ef22878affe32067f65d4fa4b0650..f4df0c5b0763a4116908bfbd0127052356ad5328 100644 (file)
@@ -18,9 +18,6 @@ time.workspace = true
 [target.'cfg(unix)'.dependencies]
 libc.workspace = true
 
-[target.'cfg(windows)'.dependencies]
-windows-sys = { workspace = true, features = ["Win32_System_Console", "Win32_Foundation"] }
-
 [dev-dependencies]
 snapbox = { workspace = true, features = ["examples"] }
 
index cf4cccb9753179a44495eefac52a2781db4aac05..c69dd9318c5685c1614551aecfc0fbedd1839ddc 100644 (file)
@@ -529,11 +529,6 @@ fn credential_action(
             }
             "cargo:paseto" => bail!("cargo:paseto requires -Zasymmetric-token"),
             "cargo:token-from-stdout" => Box::new(BasicProcessCredential {}),
-            #[cfg(windows)]
-            "cargo:wincred" => Box::new(cargo_credential_wincred::WindowsCredential {}),
-            #[cfg(target_os = "macos")]
-            "cargo:macos-keychain" => Box::new(cargo_credential_macos_keychain::MacKeychain {}),
-            #[cfg(target_os = "linux")]
             "cargo:libsecret" => Box::new(cargo_credential_libsecret::LibSecretCredential {}),
             name if BUILT_IN_PROVIDERS.contains(&name) => {
                 Box::new(cargo_credential::UnsupportedCredential {})
index b6a89dd49e615957f6c7310f6eb46f137aa82c9a..50acf5bdb97415d305dfe04ad5f269f6721325e7 100644 (file)
@@ -28,13 +28,3 @@ home = "0.5.5"
 
 [target.'cfg(unix)'.dependencies]
 libc = "0.2"
-
-[target.'cfg(windows)'.dependencies]
-miow = "0.6"
-
-[target.'cfg(windows)'.dependencies.windows]
-version = "0.57.0"
-features = [
-    "Win32_Foundation",
-    "Win32_System_Diagnostics_Debug",
-]
index f823aa1744842fbb026b80e96e64d38d9acca1fa..c82566fc7e71ab11280c3241cf2a376e9669aeb0 100644 (file)
@@ -19,9 +19,6 @@ libc.workspace = true
 [target.'cfg(target_os = "linux")'.dependencies]
 perf-event = "=0.4.7"
 
-[target.'cfg(windows)'.dependencies]
-windows-sys = { version = "0.52", features = ["Win32_System_Threading", "Win32_System_ProcessStatus"] }
-
 [features]
 cpu_profiler = []
 
index eb95f42d755c9910a5156215dd3b5a2637f7d2f6..e85e86a69bac01e401b2f18b8a4f72e8276f5fd7 100644 (file)
@@ -71,9 +71,6 @@ vfs-notify.workspace = true
 vfs.workspace = true
 paths.workspace = true
 
-[target.'cfg(windows)'.dependencies]
-windows-sys = { version = "0.52", features = ["Win32_System_Threading"] }
-
 [target.'cfg(not(target_env = "msvc"))'.dependencies]
 jemallocator = { version = "0.5.0", package = "tikv-jemallocator", optional = true }
 
index bf0d6df9ad8101d0887c975dc82908bd849a948b..bfd04c9f4c9eaa905fb55656de500bb243b13f32 100644 (file)
@@ -21,10 +21,6 @@ crossbeam-channel.workspace = true
 itertools.workspace = true
 # Think twice before adding anything here
 
-[target.'cfg(windows)'.dependencies]
-miow = "0.6.0"
-windows-sys = { version = "0.52", features = ["Win32_Foundation"] }
-
 [features]
 # Uncomment to enable for the whole crate graph
 # default = [ "backtrace" ]
index 9146a651c7f1eba55d963a8b079fb8d962c09846..ffba6fa787cc80a4243412696a0b8ae1b3432824 100644 (file)
@@ -45,10 +45,6 @@ analyzeme = "12.0.0"
 
 benchlib = { path = "benchlib" }
 
-[target.'cfg(windows)'.dependencies]
-miow = "0.3"
-windows-sys = { version = "0.45.0", features = ["Win32_Foundation"] }
-
 [features]
 # Enable more precise Cachegrind profiles for runtime benchmarks.
 # Requires a recent Valgrind to be installed.
index 12ee1eec03238c122157601ec6ac13eb992b4760..a89f82f55dd6e3b4033cab4b1e7dce65c2c6e5d4 100644 (file)
@@ -209,28 +209,4 @@ deny-warnings = []
 pretty-env-logger = ["pretty_env_logger"]
 vendored-openssl = ["openssl/vendored"]
 
-[target."cfg(windows)".dependencies.fwdansi]
-version = "1.1.0"
-
-[target."cfg(windows)".dependencies.winapi]
-version = "0.3"
-features = [
-    "basetsd",
-    "handleapi",
-    "jobapi",
-    "jobapi2",
-    "memoryapi",
-    "minwindef",
-    "ntdef",
-    "ntstatus",
-    "processenv",
-    "processthreadsapi",
-    "psapi",
-    "synchapi",
-    "winerror",
-    "winbase",
-    "wincon",
-    "winnt",
-]
-
 [workspace]
index 3d7aea1b59f70a322cccfadd2a2217c7b93c0c7f..57feefef5afee058fd1247383481297111e7b714 100644 (file)
@@ -59,7 +59,3 @@ xml5ever = {version = "0.10"}
 
 [target.'cfg(any(target_feature = "sse2", target_feature = "neon"))'.dependencies]
 simd = "0.2.0"
-
-[target.'cfg(target_os = "windows")'.dependencies]
-dwrote = "0.4"
-truetype = "0.26"
index 23130d0912898785f87e0bb840769b340cd178ad..5f338897ecf349f305e0e0de3194120f3992df4c 100644 (file)
@@ -77,9 +77,6 @@ time = "0.1"
 unicode-bidi = "0.3"
 unicode-segmentation = "1.0"
 
-[target.'cfg(windows)'.dependencies]
-kernel32-sys = "0.2"
-
 [build-dependencies]
 lazy_static = "0.2"
 log = "0.3"
index 38bd630e5d79de6167b00655c7de53dbf384ba3e..6abd17c796caf2ae8ac7c0c2f6e48cb6d841c048 100644 (file)
@@ -33,7 +33,5 @@ version = "0.1.15"
 
 [target."cfg(any(target_os = \"macos\", target_os = \"ios\"))".dependencies.tempdir]
 version = "0.3"
-[target."cfg(target_os = \"windows\")".dependencies.schannel]
-version = "0.1.7"
 
-[workspace]
\ No newline at end of file
+[workspace]
index 4202332c41dbb214c361fa4d7fa55346e66b4062..2d3578771288c52d7f3262573039bb96a27181b8 100644 (file)
@@ -9,8 +9,5 @@ license = "MPL-2.0"
 webrender = { path = "../../webrender" }
 gleam = "0.13.1"
 
-[target.'cfg(windows)'.dependencies]
-compositor-windows = { path = "../compositor-windows" }
-
 [target.'cfg(target_os = "linux")'.dependencies]
 compositor-wayland = { path = "../compositor-wayland" }
index ee727d4251cd53d643666f2c38ef383df25c5fff..ddc3c1494ae1d7264682a1c23b2e68ec29b04739 100644 (file)
@@ -61,9 +61,6 @@ rand = "0.4"
 freetype = { version = "0.7", default-features = false }
 libc = "0.2"
 
-[target.'cfg(target_os = "windows")'.dependencies]
-dwrote = "0.11"
-
 [target.'cfg(target_os = "macos")'.dependencies]
 core-foundation = "0.9.2"
 core-graphics = "0.22.3"
index 04101b92ce456150d7c5b57f692171d070cb9a10..9b6e1e54bb8f24978f19999d843f980a12ad0c7d 100644 (file)
@@ -42,10 +42,6 @@ default = [ "env_logger" ]
 headless = [ "osmesa-sys", "osmesa-src" ]
 software = [ "swgl" ]
 
-[target.'cfg(target_os = "windows")'.dependencies]
-dwrote = "0.11"
-mozangle = { version = "0.3.2", features = ["egl"] }
-
 [target.'cfg(all(unix, not(target_os = "android")))'.dependencies]
 font-loader = "0.11"