diff --git a/Cargo.lock b/Cargo.lock index 4036b62aa15a..3e4c59ddaf6a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -964,6 +964,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "cfg_aliases" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77e53693616d3075149f4ead59bdeecd204ac6b8192d8969757601b74bddf00f" + [[package]] name = "chrono" version = "0.4.24" @@ -4785,7 +4791,7 @@ dependencies = [ "bitflags 2.4.1", "bytemuck", "cfg-if", - "cfg_aliases", + "cfg_aliases 0.2.0", "clean-path", "crossbeam", "document-features", @@ -7680,7 +7686,7 @@ checksum = "9596d90b45384f5281384ab204224876e8e8bf7d58366d9b795ad99aa9894b94" dependencies = [ "android-activity", "bitflags 1.3.2", - "cfg_aliases", + "cfg_aliases 0.1.1", "core-foundation", "core-graphics", "dispatch", diff --git a/Cargo.toml b/Cargo.toml index b90a9f272223..a8c1af2c142d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -112,7 +112,7 @@ bytemuck = { version = "1.11", features = ["extern_crate_alloc"] } camino = "1.1" cargo_metadata = "0.18" cargo-run-wasm = "0.3.2" -cfg_aliases = "0.1" +cfg_aliases = "0.2" cfg-if = "1.0" clang-format = "0.3" clap = "4.0" diff --git a/crates/re_renderer/build.rs b/crates/re_renderer/build.rs index 012be5fbd2a3..4dd2f1d8e562 100644 --- a/crates/re_renderer/build.rs +++ b/crates/re_renderer/build.rs @@ -119,22 +119,11 @@ fn should_run() -> bool { } fn main() { - // TODO(andreas): Create an upstream PR `cfg_aliases` to fix this. - // Workaround for CARGO_CFG_DEBUG_ASSERTIONS not being set as expected. - // `cfg_aliases` relies on this. - if std::env::var("PROFILE") == Ok("debug".to_owned()) { - std::env::set_var("CARGO_CFG_DEBUG_ASSERTIONS", "1"); - } - - #[allow(clippy::str_to_string)] - // TODO(andreas): Create an upstream PR to `cfg_aliases` fix this. - { - cfg_aliases::cfg_aliases! { - native: { not(target_arch = "wasm32") }, - webgl: { all(not(native), feature = "webgl") }, - webgpu: { all(not(webgl), not(native)) }, - load_shaders_from_disk: { all(native, debug_assertions) } // Shader reloading is only supported on native-debug currently. - } + cfg_aliases::cfg_aliases! { + native: { not(target_arch = "wasm32") }, + webgl: { all(not(native), feature = "webgl") }, + webgpu: { all(not(webgl), not(native)) }, + load_shaders_from_disk: { all(native, debug_assertions) } // Shader reloading is only supported on native-debug currently. } if !should_run() { diff --git a/deny.toml b/deny.toml index f0c763bb33c6..e76ce2164ba4 100644 --- a/deny.toml +++ b/deny.toml @@ -49,8 +49,9 @@ skip = [ { name = "ahash" }, # Popular crate + fast release schedule = lots of crates still using old versions { name = "base64" }, # Too popular { name = "cargo_metadata" }, # Older version used by ply-rs. It's small, and it's build-time only! - { name = "foreign-types" }, # used for cocoa bindings. wgpu uses newer than eframe. + { name = "cfg_aliases" }, # Tiny macro-only crate. Winit and other use older version than us. { name = "foreign-types-shared" }, # used for cocoa bindings. wgpu uses newer than eframe. + { name = "foreign-types" }, # used for cocoa bindings. wgpu uses newer than eframe. { name = "hashbrown" }, # Old version used by polar-rs { name = "libloading" }, # Old version used by ash (vulkan binding), newer version used by khronos-egl { name = "memoffset" }, # Small crate