[petsc-dev] configure usability

Jed Brown jed at 59A2.org
Wed Sep 1 06:07:50 CDT 2010


On Wed, 1 Sep 2010 12:56:30 +0200, Matthew Knepley <knepley at gmail.com> wrote:
> 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.

Thanks.

> > 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.

Once you have access logging, the fuzzy matching is very easy, so more
incentive perhaps.

> >  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.

Yup.

Jed



More information about the petsc-dev mailing list