[petsc-dev] configure usability

Matthew Knepley knepley at gmail.com
Wed Sep 1 05:56:30 CDT 2010


On Wed, Sep 1, 2010 at 12:55 PM, Jed Brown <jed at 59a2.org> wrote:

> Two thoughts:
>
> 1. Systematic deprecation system:
>
>  --with-shared doesn't give any errors today, but the option goes
>  unused (because it's now spelled --with-shared-libraries).  I'd like
>  to see either (a) recognize the old spelling but warn of deprecation,
>  or (b) error giving the new spelling.  This seems easy to do by
>  updating help.addArgument.
>

Good idea. Will do it.


> 2. It's common to misspell options, difflib is part of the standard library
>  (from 2.3)
>
>    http://docs.python.org/library/difflib.html#difflib.get_close_matches
>
>  and would enable a warning like
>
>  The option "--with-shard-libaries" was not used, maybe you meant
> "--with-shared-libraries".
>
>  Configure is imperative (as opposed to declarative, or with all
>  options identified and available very early) so I don't think it's
>  feasible to provide comprehensive misspelled options help immediately,
>  but at least the unused options could be listed at the end.  This
>  ought to just be a matter of having argDB log accesses, then at the
>  end, take all entries that were never accessed and compute Levenshtein
>  distance to the options that were accessed used to give suggestions.
>

The first part, putting in access logging, has been on the list for a long
time.
We need to do it, but its a bit of programming.


>  I'm not sure what to do if configure errors out early, it might be
>  hitting an error _because_ of an unused option, but there may be lots
>  of unused options at this stage (that are valid and really will be
>  used later).


This is not really soluble now I think.

   Matt


>
> Jed
>



-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20100901/0a128ee2/attachment.html>


More information about the petsc-dev mailing list