[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] command line arguments for unikernels

Le jeudi, 4 dÃcembre 2014 Ã 16:02, Thomas Gazagnaire a Ãcrit :
> I am not very fond of the default references, not sure why you want someone 
> to change them globally.

Same reaction, changing defaults by side effects is a recipe for crazy 
debugging sessions. Always assume users will abuse what you put in their hands; 
so minimize the exposition of (unecessary) side-effects.

Other things:

1) You need to tell us something about some notion of identity for the 
parameters. How is it defined
is it the name ? What happens if I declare two parameters with the same name 
[1] ?  

2) In the manpage I would list the parameters under a different section (e.g. 

3) I would prefix or suffix the command line option name with a constant, this 
ensures that unikernel developers will never clash with options of the mirage 
tool. So for a parameters named "address" the option names should be  
`--address-param` or `--param-address`  

4) Is the no [def] with [dyn] unspecified option runtime error a feature ? If 
not it's easy to ensure statically you always have a value to use. Are you 
using cmdliner's required optional arguments for that (it seems a legitimate 
use for once, as it would be difficult to make positional arguments in a 
compositional manner) ?  



P.S. Rather than configuration Param I would use configuration Key which is 
shorter and a full word, but naming is subjective.

[1]  That's:


what assemblage says on the topic. Basically we have uid internally so we don't 
discriminate on the name. However that warning in the documentation is over 
pessimistic. In fact if I get two configuration keys with the same name I emit 
a warning and generate an alternate name for the option on the command line 
(e.g. --dupname~1-key). See here:


 but if you have two configuration with the same name,  I think that in 
assemblage this is not a real problem (unless you load more than one project)

MirageOS-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.