Skip to content

Commit ee3ed66

Browse files
worktrunk-botclaude
andcommitted
docs(alias): TODO to drop the orchestration-only merged map
The execution path is already source-aware after 787a445 — `prepare_alias_sourced_steps` builds from per-source `CommandConfig` lookups. The remaining merged map only serves orchestration (existence check, referenced-vars union for arg parsing, announcement banner). Document the follow-up shape (`BTreeMap<String, Vec<(HookSource, CommandConfig)>>`) so the next PR can land it without re-deriving the rationale. Co-Authored-By: Claude Opus 4.7 <[email protected]>
1 parent 787a445 commit ee3ed66

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎src/commands/alias.rs‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,17 @@ fn format_alias_announcement(name: &str, cmd_config: &CommandConfig) -> Option<S
330330
}
331331

332332
/// Load the merged alias map (user config + project config, in runtime order).
333+
///
334+
/// TODO(#2474): the dispatch path no longer merges *for execution* —
335+
/// `prepare_alias_sourced_steps` builds steps from per-source `CommandConfig`
336+
/// lookups directly. This merged map is now only used for orchestration:
337+
/// existence check (does any source define the name?), referenced-vars union
338+
/// (so `AliasOptions::parse` can route `--KEY=VALUE` against the union of
339+
/// vars across both bodies), and the announcement banner. Replace with a
340+
/// source-aware shape (e.g. `BTreeMap<String, Vec<(HookSource,
341+
/// CommandConfig)>>`) so we trigger both without ever building a merged
342+
/// `CommandConfig`. Same observable behavior; cleaner data flow. Keeping
343+
/// this PR focused on the EXEC-per-step redesign.
333344
fn load_merged_aliases(
334345
repo: &Repository,
335346
user_config: &UserConfig,

0 commit comments

Comments
 (0)