From ab9f3cd2d362c8fb8f9325ce16d070a0e424f3c4 Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Sun, 4 Oct 2026 14:47:19 -0700 Subject: [PATCH] fix(boot): stamp generated entry actions with the final entry context --- crates/boot/src/entries.rs | 5 +---- crates/boot/src/generators/list.rs | 8 +++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/crates/boot/src/entries.rs b/crates/boot/src/entries.rs index b1ca4c6..ad7e7d3 100644 --- a/crates/boot/src/entries.rs +++ b/crates/boot/src/entries.rs @@ -196,15 +196,12 @@ impl BootableEntry { } /// Create a variant of this entry, with the name suffixed by `suffix` and using `context`. - /// The actions of the entry are stamped with `context`, the same as the list generator. + /// The actions of the entry are stamped with `context` when the entry is booted. /// Variants of the same entry keep the sort key of this entry, so they stay grouped /// together in the order they were created in. pub fn variant(&self, suffix: &str, context: Rc) -> Self { let mut entry = self.clone(); entry.name.push_str(suffix); - entry.declaration.actions = context - .stamp_iter(entry.declaration.actions.iter()) - .collect(); // Without any sort key, the name is used to sort, which differs between variants. // Pin the sort key to the name of this entry to keep the variants together. if entry.sort_key.is_none() && entry.declaration.sort_key.is_none() { diff --git a/crates/boot/src/generators/list.rs b/crates/boot/src/generators/list.rs index 9716c09..062ccb7 100644 --- a/crates/boot/src/generators/list.rs +++ b/crates/boot/src/generators/list.rs @@ -20,11 +20,9 @@ pub fn generate( context.insert(combination); let context = context.freeze(); - // Stamp the entry title and actions from the template. - let mut entry = list.entry.clone(); - - // Stamp all the actions this entry references. - entry.actions = context.stamp_iter(entry.actions.into_iter()).collect(); + // The actions are stamped with the final context of the entry when it is booted, + // so that variants and the values of the entry can override the values of the generator. + let entry = list.entry.clone(); // Push the entry into the list with the new context. entries.push(BootableEntry::new(