craft: facade features table from the member manifests; PlainData derive reaches craft-tracked through contract

This commit is contained in:
aiongg committed 2026-11-19 08:04:36 +00:00
1 parent 02b3ea4a34
commit ee0798cda0
2 files changed
+6 -16

No files matched your search

+2 -4
View File
@@ -218,8 +218,6 @@ craft-xfa = { workspace = true, optional = true }
[features]
ui = [
"dep:craft-ui",
# The framework's memoized views key app models by their `Tracked` revision.
"tracked",
"dep:egui",
"craft-automation?/ui",
"craft-browse?/ui",
@@ -842,14 +840,14 @@ theme-store = ["dep:craft-theme-store"]
tiff = ["dep:craft-tiff"]
tracked = ["dep:craft-tracked"]
time = ["dep:craft-time"]
timeline = ["dep:craft-timeline", "keymap"]
timeline-otio = ["timeline", "craft-timeline/otio"]
timeline-xml = ["timeline", "craft-timeline/xml"]
tracked = ["dep:craft-tracked"]
ui-app = ["ui", "craft-ui/app"]
ui-cloud = ["ui", "craft-ui/cloud"]
ui-color_fonts = ["ui", "craft-ui/color_fonts"]
+4 -12
View File
@@ -123,23 +123,15 @@ pub(crate) fn escaped(field: &syn::Field, escape: &Escape) -> syn::Result<bool>
}
/// The path of craft-tracked as the crate being compiled reaches it: a direct dependency (`::craft_tracked` in
/// craft-tracked itself, which declares that name), else the facade's `tracked` module, else the framework's
/// re-export in `contract`.
/// craft-tracked itself, which declares that name), else the framework's re-export in `contract`. Through the
/// facade that is `craft::ui::contract`, which every `ui` build has without the facade's `tracked` feature.
fn tracked_crate() -> TokenStream {
match crate_name("craft-tracked") {
Ok(FoundCrate::Name(name)) => {
let name = format_ident!("{name}");
return quote!(::#name);
quote!(::#name)
}
Ok(FoundCrate::Itself) => return quote!(::craft_tracked),
Err(_) => {}
}
match crate_name("craft") {
Ok(FoundCrate::Name(name)) => {
let name = format_ident!("{name}");
quote!(::#name::tracked)
}
Ok(FoundCrate::Itself) => quote!(::craft::tracked),
Ok(FoundCrate::Itself) => quote!(::craft_tracked),
Err(_) => {
let k = ui_crate();
quote!(#k::contract)