Validators and regexes in config.yaml

Gustavo Niemeyer gustavo.niemeyer at canonical.com
Tue Aug 30 20:27:07 UTC 2011


Greetings,

While you're still with me, let me as a question: are you using the
regex type in one of your formulas?

I'm asking because I'd like to get rid of it, for two reasons:

1) The type of the value is not a regex, it's a string. regex is what
we use to validate the actual value. Once we reintroduce the feature,
"validator" should be a field of the "string" type.

2) It's currently binding the metadata of Ensemble to the Python
language.  Python is the only language with this particular format for
regexes, and it's a wrong choice to be binding it that way.  Once we
reintroduce something like this, it'd be better to have the format
being a more widely spread one, such as POSIX extended or similar.

As a minor, I would also like to expand the "str" type to "string",
but that can be done in a backwards compatible way.

Comments?

-- 
Gustavo Niemeyer
http://niemeyer.net
http://niemeyer.net/plus
http://niemeyer.net/twitter
http://niemeyer.net/blog

-- I never filed a patent.




More information about the Ensemble mailing list