feat: implement multi-command aliases #132
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR moves aliases to channel-level pipelines so a single alias can orchestrate multiple components. This was discussed in #129 . Each step now names both the
componentand thecommandtokens, and user arguments are appended only to the first step.midenresolves and executes every step in order, enabling cross-component flows (for example,miden-faucetfollowed bymiden-client, i.e. mint command).Partial toolchains retain only those aliases which steps target installed components. The manifest (
manifest/channel-manifest.json) has been updated to the new channel-level alias shape.Details
Channel-level aliases (breaking change)
Aliases are no longer stored under individual components. Each channel now has a top-level
aliasesmap (HashMap<Alias, Vec<AliasStep>>). EachAliasStepmust specify acomponent(the component whose executable should run for this step) and acommand(the existingCliCommandtokens:executable,lib_path,var_path, or verbatim strings). For example:Resolution prefers the active channel’s aliases and components and falls back to the installed channel with warnings. Partial installs keep aliases only if all steps target installed components.
Multi-step execution
midennow resolves and runs each alias step sequentially. User CLI arguments are appended only to the first step, and a--helprequest is appended to the first step’s arguments. A helper resolves each step to(program, args)using the step’scomponent.Note on data passing
Data passing between steps (capture and templating) is not part of this PR, but required as a subsequent PR for implementing issue #131 to finally implement the
mintcommand.Closes #129