James E Keenan wrote:
But I didn't actually implement this. What I actually implemented was
specifying the configuration step name *as an alternative to* specifying
a portion of the step's description. While this satisfied particle's
original request, it led to some ugly code in
Parrot::Configure::_run_this_step:
[...]
Code this ugly is difficult to test thoroughly. In fact, as I've been
working on this code in the reconfigure/ branch, this code excerpt is
the only code in lib/Parrot/Configure.pm which is not 100% covered by
the tests with respect to statements, branches and conditions.
Simplification is a good idea. I suspect most people would rather type
some short unique value for the option than the text of the description
anyway.
In the reconfigure/ branch, I have figured out how to do this with the
--fatal-step option
(https://rt.perl.org/rt3/Ticket/Display.html?id=45525). I will soon be
proposing a patch to trunk for --fatal-step, and it would be great if
--verbose-step and --fatal-step could work in the same manner.
Agreed on wanting consistency here.
I should note that currently you can also specify --verbose-step=53 and
have step # 53, and only #53, execute verbosely. How that would be
affected I haven't yet thought through?
Given a choice between the two, I'd rather see the step number in the
non-verbose output:
53) Loading platform and local hints files...........done.
than see the step name:
inter::progs: Loading platform and local hints files...........done.
So, how about we make both --fatal-step and --verbose-step accept either
a step number or step name. Show only the step number in the non-verbose
output, but show both name and number in the verbose output. The comma
delimited list could also work with numbers:
perl Configure.pl --verbose-step=53,gen::makefiles,42
Selecting options by step name is an important feature, because the step
numbers will change between releases. If someone has a script set up to
run the config and compile with certain default options, they'll need to
go by name instead of number.
Allison