Yea, since I don't actually run evaluation at this point I only need a manifest to parse.
I am using this in my project: http://github.com/logicminds/puppet-retrospec if you are curious. I am thinking I may need to hot swap parser versions during manifest inspection in order to produce the same output for future parser code. Thanks for taking the time to respond. I will have a look at the catalog preview tool which I assume is useful for comparing 4.x catalogs with 3.x catalogs. Corey On Thursday, April 23, 2015 at 6:44:45 AM UTC-7, henrik lindberg wrote: > > On 2015-21-04 20:59, Corey Osman wrote: > > Is there a better way to detect which parser a manifest is using than > > what I have come up with below? > > > > > > https://gist.github.com/logicminds/d3f795f4fa28ed8d0be6 > > > > Your code basically runs puppet parser validate with or without --parser > future afaict > > Result of validation: > > current | future | meaning > ------- | ------ | ------- > Y | Y | ambiguous, evaluation may fail in either > Y | N | most likely not intended for use with future parser > N | Y | most likely intended for future parser > N | N | manifest is universally broken > > Note that puppet validate only finds static parsing problems (lexical, > syntactical, and a few semantic errors), but not evaluation problems. > If your intent is simply to rule out those manifests that could not > possibly be used with the current parser, then your code is good. For > other use cases, there is probably too much uncertainty to be of real > practical value in a general way (maybe it is still useful to your code > base because you can make certain assumptions). > > Also note that Puppet Enterprise 3.8.0 contains a Catalog Preview tool > that can help more precisely validation and point to evaluation > problems. This tool is only available for Puppet Enterprise users. > > regards > - henrik > > > > > > > Corey > > > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Puppet Developers" group. > > To unsubscribe from this group and stop receiving emails from it, send > > an email to [email protected] <javascript:> > > <mailto:[email protected] <javascript:>>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/puppet-dev/B04ECC75-1BB7-451C-9409-B7197C6D9FD2%40logicminds.biz > > > < > https://groups.google.com/d/msgid/puppet-dev/B04ECC75-1BB7-451C-9409-B7197C6D9FD2%40logicminds.biz?utm_medium=email&utm_source=footer>. > > > > For more options, visit https://groups.google.com/d/optout. > > > -- > > Visit my Blog "Puppet on the Edge" > http://puppet-on-the-edge.blogspot.se/ > > -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/94e84245-432b-4638-96b7-e9d7a838d05c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
