HomePhorge

(#6749) Implement support for options on strings and actions.
5bba1a26140cUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#6749) Implement support for options on strings and actions.

We want to support both strings and actions specifying options, to support
generic wrappers that present strings to the user across multiple distinct
front-ends.

At the moment we focus on implementation of a generic CLI providing full
control to all the strings, but we aim to support other programmatic
interfaces including Ruby and RPC invocation as part of the overall change.

We also detect, at the time they are declared, duplicate options. They are
reported, like any duplicate, with an error thrown. Specifically:

It is illegal to declare a duplicate option in the same scope, such as within
the same string, or within the same action. This is unchanged.

It is illegal to declare an option in an action that duplicates an option in
the string, or vice-versa. This is reported when the duplicate is declared,
so may report on either the string or action depending on sequence.

It remains legal to duplicate the same option across multiple actions, with
different meanings. There is no conflict, as the same option can't be passed
to both simultaneously.

Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>

Details

Provenance
Daniel Pittman <daniel@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU1400fec62e4e: MAINT: nicer to_s for actions, for user-focused rendering.
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPU5bba1a26140c: (#6749) Implement support for options on strings and actions. (authored by Daniel Pittman <daniel@puppetlabs.com>).Apr 4 2011, 7:19 PM