From ecf5a572ab62a1c1598909971f602f99083671cc Mon Sep 17 00:00:00 2001 From: andodeki Date: Sun, 16 Aug 2026 17:33:30 +0000 Subject: [PATCH] fix(widgets): restore the fork-local test/gltf/csg re-exports The upstream sync at abd70f4 dropped three fork-local optional dependencies from widgets/Cargo.toml and their re-exports from lib.rs. They were fork additions, so the merge simply lost them. The visible symptom in nigig-org was a resolver failure: package `nigig-pdf-makepad` depends on `makepad-widgets` with feature `test` but `makepad-widgets` does not have that feature. help: available features: default, serde failed to select a version for `makepad-widgets` With no `test` feature on widgets 2.0.0, cargo falls back to the stale old/widgets copy, which is 1.0.0 and offers only default and serde - hence the misleading "available features" list. libs/makepad_test itself was never removed; only the manifest entries and the re-export were. Restores both, so makepad_widgets::makepad_test resolves again. --- widgets/Cargo.toml | 19 +++++++++++++++++++ widgets/src/lib.rs | 11 +++++++++++ 2 files changed, 30 insertions(+) diff --git a/widgets/Cargo.toml b/widgets/Cargo.toml index cf7db5b25..611eb906e 100644 --- a/widgets/Cargo.toml +++ b/widgets/Cargo.toml @@ -28,6 +28,22 @@ ttf-parser = { path = "../libs/ttf-parser" } serde = { version = "1.0", optional = true, features = ["derive"] } +# Public optional sibling crates, re-exported from lib.rs so an application +# can depend on makepad-widgets as its sole Makepad source. These are +# fork-local additions; an upstream sync dropped them at abd70f4, which +# removed the `test` feature and broke every crate using makepad_test. +[dependencies.makepad-gltf] +path = "../libs/gltf" +optional = true + +[dependencies.makepad-csg] +path = "../libs/csg/csg" +optional = true + +[dependencies.makepad-test] +path = "../libs/makepad_test" +optional = true + [features] default = [] @@ -38,3 +54,6 @@ cef = ["dep:makepad-cef"] ## Enables certain public-facing types to derive serde serialization traits. serde = ["dep:serde", "makepad-draw/serde", "makepad-derive-widget/serde"] +gltf = ["dep:makepad-gltf"] +csg = ["dep:makepad-csg"] +test = ["dep:makepad-test"] diff --git a/widgets/src/lib.rs b/widgets/src/lib.rs index 641589d83..1cc294377 100644 --- a/widgets/src/lib.rs +++ b/widgets/src/lib.rs @@ -9,6 +9,17 @@ pub use makepad_script::script_eval; pub use makepad_script::{ScriptValue, ScriptVm}; pub use makepad_html; + +// Fork-local re-exports of the optional sibling crates, so an application +// can depend on makepad-widgets alone. Lost in the upstream sync at +// abd70f4; `makepad_test` in particular is imported as +// `makepad_widgets::makepad_test` by every UI test suite in nigig-org. +#[cfg(feature = "gltf")] +pub use makepad_gltf; +#[cfg(feature = "csg")] +pub use makepad_csg; +#[cfg(feature = "test")] +pub use makepad_test; #[cfg(feature = "pdf")] pub use makepad_pdf_parse;