From 6729c842b5df11aea926a5a0858ad32810352b23 Mon Sep 17 00:00:00 2001 From: Ame <104745335+ameknite@users.noreply.github.com> Date: Mon, 27 Mar 2023 22:22:25 -0600 Subject: [PATCH 1/4] Re-export glam_assert feature --- Cargo.toml | 3 +++ crates/bevy_internal/Cargo.toml | 3 +++ crates/bevy_math/Cargo.toml | 4 +++- docs/cargo_features.md | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 10bd1c431e1cc..eb4258aee2de4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -216,6 +216,9 @@ tonemapping_luts = ["bevy_internal/tonemapping_luts"] # Enable AccessKit on Unix backends (currently only works with experimental screen readers and forks.) accesskit_unix = ["bevy_internal/accesskit_unix"] +# Enable assertions to check the validity of parameters passed to glam. +glam_assert = ["bevy_internal/glam_assert"] + [dependencies] bevy_dylib = { path = "crates/bevy_dylib", version = "0.11.0-dev", default-features = false, optional = true } bevy_internal = { path = "crates/bevy_internal", version = "0.11.0-dev", default-features = false } diff --git a/crates/bevy_internal/Cargo.toml b/crates/bevy_internal/Cargo.toml index 8ad1c1a14fd08..729c654add976 100644 --- a/crates/bevy_internal/Cargo.toml +++ b/crates/bevy_internal/Cargo.toml @@ -91,6 +91,9 @@ accesskit_unix = ["bevy_winit/accesskit_unix"] bevy_text = ["dep:bevy_text", "bevy_ui?/bevy_text"] +# Enable assertions to check the validity of parameters passed to glam. +glam_assert = ["bevy_math/glam_assert"] + [dependencies] # bevy bevy_a11y = { path = "../bevy_a11y", version = "0.11.0-dev" } diff --git a/crates/bevy_math/Cargo.toml b/crates/bevy_math/Cargo.toml index 240ec4071f33c..5035ddf0d4907 100644 --- a/crates/bevy_math/Cargo.toml +++ b/crates/bevy_math/Cargo.toml @@ -13,6 +13,8 @@ glam = { version = "0.23", features = ["bytemuck"] } serde = { version = "1", features = ["derive"], optional = true } [features] +serialize = ["dep:serde", "glam/serde"] # Enable interoperation of glam types with mint-compatible libraries mint = ["glam/mint"] -serialize = ["dep:serde", "glam/serde"] +# Enable assertions to check the validity of parameters passed to glam. +glam_assert = ["glam/glam-assert"] \ No newline at end of file diff --git a/docs/cargo_features.md b/docs/cargo_features.md index aac27b3185381..5f40045ec70f8 100644 --- a/docs/cargo_features.md +++ b/docs/cargo_features.md @@ -51,6 +51,7 @@ The default feature set enables most of the expected features of a game engine, |dynamic_linking|Force dynamic linking, which improves iterative compile times| |exr|EXR image format support| |flac|FLAC audio format support| +|glam_assert| Enable assertions to check the validity of parameters passed to glam| |jpeg|JPEG image format support| |minimp3|MP3 audio format support (through minimp3)| |mp3|MP3 audio format support| From de9c6ec95a5d20cca1a8a73596fcd2ab10a8daa8 Mon Sep 17 00:00:00 2001 From: Ame <104745335+ameknite@users.noreply.github.com> Date: Mon, 27 Mar 2023 22:24:14 -0600 Subject: [PATCH 2/4] small fix: add newline --- crates/bevy_math/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_math/Cargo.toml b/crates/bevy_math/Cargo.toml index 5035ddf0d4907..2db39f0acb033 100644 --- a/crates/bevy_math/Cargo.toml +++ b/crates/bevy_math/Cargo.toml @@ -17,4 +17,4 @@ serialize = ["dep:serde", "glam/serde"] # Enable interoperation of glam types with mint-compatible libraries mint = ["glam/mint"] # Enable assertions to check the validity of parameters passed to glam. -glam_assert = ["glam/glam-assert"] \ No newline at end of file +glam_assert = ["glam/glam-assert"] From d17f08b133c33afa983d0853c8f469edc3e8dd26 Mon Sep 17 00:00:00 2001 From: Ame <104745335+ameknite@users.noreply.github.com> Date: Tue, 28 Mar 2023 09:32:35 -0600 Subject: [PATCH 3/4] fixes: glam_assert docs, build-templated-pages --- Cargo.toml | 2 +- docs/cargo_features.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index eb4258aee2de4..7fdce492d66d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -216,7 +216,7 @@ tonemapping_luts = ["bevy_internal/tonemapping_luts"] # Enable AccessKit on Unix backends (currently only works with experimental screen readers and forks.) accesskit_unix = ["bevy_internal/accesskit_unix"] -# Enable assertions to check the validity of parameters passed to glam. +# Enable assertions to check the validity of parameters passed to glam glam_assert = ["bevy_internal/glam_assert"] [dependencies] diff --git a/docs/cargo_features.md b/docs/cargo_features.md index 5f40045ec70f8..148a830fcb0e5 100644 --- a/docs/cargo_features.md +++ b/docs/cargo_features.md @@ -51,7 +51,7 @@ The default feature set enables most of the expected features of a game engine, |dynamic_linking|Force dynamic linking, which improves iterative compile times| |exr|EXR image format support| |flac|FLAC audio format support| -|glam_assert| Enable assertions to check the validity of parameters passed to glam| +|glam_assert|Enable assertions to check the validity of parameters passed to glam| |jpeg|JPEG image format support| |minimp3|MP3 audio format support (through minimp3)| |mp3|MP3 audio format support| From 3218820e1ce2506dc05d7c869e6a6fb7419bf514 Mon Sep 17 00:00:00 2001 From: Ame <104745335+ameknite@users.noreply.github.com> Date: Tue, 28 Mar 2023 09:35:39 -0600 Subject: [PATCH 4/4] fix: dot --- crates/bevy_internal/Cargo.toml | 2 +- crates/bevy_math/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_internal/Cargo.toml b/crates/bevy_internal/Cargo.toml index 729c654add976..4f1a15573b0ee 100644 --- a/crates/bevy_internal/Cargo.toml +++ b/crates/bevy_internal/Cargo.toml @@ -91,7 +91,7 @@ accesskit_unix = ["bevy_winit/accesskit_unix"] bevy_text = ["dep:bevy_text", "bevy_ui?/bevy_text"] -# Enable assertions to check the validity of parameters passed to glam. +# Enable assertions to check the validity of parameters passed to glam glam_assert = ["bevy_math/glam_assert"] [dependencies] diff --git a/crates/bevy_math/Cargo.toml b/crates/bevy_math/Cargo.toml index 2db39f0acb033..5c2c49afae5b7 100644 --- a/crates/bevy_math/Cargo.toml +++ b/crates/bevy_math/Cargo.toml @@ -16,5 +16,5 @@ serde = { version = "1", features = ["derive"], optional = true } serialize = ["dep:serde", "glam/serde"] # Enable interoperation of glam types with mint-compatible libraries mint = ["glam/mint"] -# Enable assertions to check the validity of parameters passed to glam. +# Enable assertions to check the validity of parameters passed to glam glam_assert = ["glam/glam-assert"]