I find cfengine3 much better then previous version (1 and 2), The only main concern for me is the parser and how it reports syntax errors, Previous cfengine versions had the same problem. A lot can improved in this area. The syntax for cfengine is clear and can easily be checked. It will also be easier for starters when syntax errors are reported in a better way (See c-ompiler). I see a lot of people spending hours of debugging and mostly they have spelling errors or forgot a keyword.
Here are a few examples to show how it could improved. the keyword 'bundle` can only have a few values: * common| agent | server | edit_line | .. So for the lexer/parser is must be easy to find out when an invalid keyword is used, eg: bundle comon maui { vars: any:: "dir" string => "/var/spool/maui"; "default_file" string => "/etc/default/maui"; debian:: "restart" string => "/usr/sbin/service maui restart"; } cf-promises see this as valid syntax. It should report: * comon is unknown keyword for bundle, and maybe have some suggestions This also holds for body. You can declare bodies that are unknown to cfengine, eg: body edit_lines jaap { select_field => "2"; } cf-promisses should report 'edit_lines' is an unknown body. Sometimes i forgot a keyword: bundle common maui { vars: any:: "dir" => "/var/spool/maui"; } For a parser it must be easy to detect that a keyword is missing, namely the type of the variable. In cfengine3 there is some syntax checking. If you make an spelling error in the body then cf-promises does the right thing: body edit_line jaap { select_fields => "2"; } 14:07 install2:/var/tmp/bas/cfengine/cf-config root# cf-promises -f ./promises.cf cf3> ./bundles/maui.cf:19,27: Constraint lvalue "select_fields" is not allowed in 'edit_line' constraint body, near token '2"' It would be nice if the kind of checking could be done for other sections. -- ******************************************************************** * Bas van der Vlies e-mail: b...@sara.nl * * SARA - Academic Computing Services Amsterdam, The Netherlands * ********************************************************************
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine