Accept both parking-lot 0.11 and 0.12.*, to avoid windows-rs. (#2660)

In parking_lot 0.12 and parking_lot_core 0.9.0, those crates switched
from the winapi crate to the official Microsoft windows-sys crate.
This is fine, except that windows-sys and its dependencies are even
larger than winapi. Some users may wish to stick with winapi for the
time being; this change allows wgpu to accommodate them.
This commit is contained in:
Jim Blandy 2022-05-15 22:16:53 -07:00 committed by GitHub
parent 202d81a64a
commit c608ee0bbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 76 deletions

78
Cargo.lock generated
View File

@ -691,7 +691,7 @@ dependencies = [
"log", "log",
"objc", "objc",
"osmesa-sys", "osmesa-sys",
"parking_lot 0.11.2", "parking_lot",
"wayland-client", "wayland-client",
"wayland-egl", "wayland-egl",
"winapi", "winapi",
@ -1235,17 +1235,7 @@ checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
dependencies = [ dependencies = [
"instant", "instant",
"lock_api", "lock_api",
"parking_lot_core 0.8.5", "parking_lot_core",
]
[[package]]
name = "parking_lot"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58"
dependencies = [
"lock_api",
"parking_lot_core 0.9.3",
] ]
[[package]] [[package]]
@ -1262,19 +1252,6 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "parking_lot_core"
version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929"
dependencies = [
"cfg-if 1.0.0",
"libc",
"redox_syscall",
"smallvec",
"windows-sys",
]
[[package]] [[package]]
name = "percent-encoding" name = "percent-encoding"
version = "2.1.0" version = "2.1.0"
@ -2093,7 +2070,7 @@ dependencies = [
"naga", "naga",
"noise", "noise",
"obj", "obj",
"parking_lot 0.12.0", "parking_lot",
"png", "png",
"pollster", "pollster",
"rand 0.7.3", "rand 0.7.3",
@ -2121,7 +2098,7 @@ dependencies = [
"fxhash", "fxhash",
"log", "log",
"naga", "naga",
"parking_lot 0.12.0", "parking_lot",
"profiling", "profiling",
"raw-window-handle", "raw-window-handle",
"ron", "ron",
@ -2158,7 +2135,7 @@ dependencies = [
"metal", "metal",
"naga", "naga",
"objc", "objc",
"parking_lot 0.12.0", "parking_lot",
"profiling", "profiling",
"range-alloc", "range-alloc",
"raw-window-handle", "raw-window-handle",
@ -2219,49 +2196,6 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows-sys"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2"
dependencies = [
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_msvc"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"
[[package]]
name = "windows_i686_gnu"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"
[[package]]
name = "windows_i686_msvc"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"
[[package]]
name = "windows_x86_64_gnu"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"
[[package]]
name = "windows_x86_64_msvc"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"
[[package]] [[package]]
name = "winit" name = "winit"
version = "0.26.1" version = "0.26.1"
@ -2283,7 +2217,7 @@ dependencies = [
"ndk-glue", "ndk-glue",
"ndk-sys", "ndk-sys",
"objc", "objc",
"parking_lot 0.11.2", "parking_lot",
"percent-encoding", "percent-encoding",
"raw-window-handle", "raw-window-handle",
"smithay-client-toolkit", "smithay-client-toolkit",

View File

@ -30,7 +30,8 @@ codespan-reporting = "0.11"
copyless = "0.1" copyless = "0.1"
fxhash = "0.2" fxhash = "0.2"
log = "0.4" log = "0.4"
parking_lot = "0.12" # parking_lot 0.12 switches from `winapi` to `windows`; permit either
parking_lot = ">=0.11,<0.13"
profiling = { version = "1", default-features = false } profiling = { version = "1", default-features = false }
raw-window-handle = { version = "0.4", optional = true } raw-window-handle = { version = "0.4", optional = true }
ron = { version = "0.7", optional = true } ron = { version = "0.7", optional = true }

View File

@ -31,7 +31,8 @@ required-features = ["gles"]
[dependencies] [dependencies]
bitflags = "1.0" bitflags = "1.0"
parking_lot = "0.12" # parking_lot 0.12 switches from `winapi` to `windows`; permit either
parking_lot = ">=0.11,<0.13"
profiling = { version = "1", default-features = false } profiling = { version = "1", default-features = false }
raw-window-handle = "0.4" raw-window-handle = "0.4"
thiserror = "1" thiserror = "1"

View File

@ -112,7 +112,8 @@ version = "0.12"
[dependencies] [dependencies]
arrayvec = "0.7" arrayvec = "0.7"
log = "0.4" log = "0.4"
parking_lot = "0.12" # parking_lot 0.12 switches from `winapi` to `windows`; permit either
parking_lot = ">=0.11,<0.13"
raw-window-handle = "0.4" raw-window-handle = "0.4"
serde = { version = "1", features = ["derive"], optional = true } serde = { version = "1", features = ["derive"], optional = true }
smallvec = "1" smallvec = "1"
@ -283,7 +284,8 @@ web-sys = { version = "0.3.53", features = [
]} ]}
js-sys = "0.3.50" js-sys = "0.3.50"
wasm-bindgen-futures = "0.4.23" wasm-bindgen-futures = "0.4.23"
parking_lot = "0.12" # parking_lot 0.12 switches from `winapi` to `windows`; permit either
parking_lot = ">=0.11,<0.13"
[target.'cfg(target_arch = "wasm32")'.dev-dependencies] [target.'cfg(target_arch = "wasm32")'.dev-dependencies]
console_error_panic_hook = "0.1.6" console_error_panic_hook = "0.1.6"