nwops / puppet-retrospec

The only tool you need to generate puppet code, tests, modules, facts, types, providers, data and everything else.
https://www.retrospec-puppet.com/
GNU Affero General Public License v3.0
137 stars 27 forks source link

Remove future_parser setting #55

Closed DavidS closed 8 years ago

DavidS commented 8 years ago

Puppet 4 doesn't have a future parser. It IS the future!

logicminds commented 8 years ago

I have actually gutted all this in an upcoming release which relies solely on puppet 4 parser. Time has been in the way of releasing it. I would expect this to be completed in early April. The auto generated test coverage is way better too.

DavidS commented 8 years ago

Nice, looking forward to that! Do you have that code up somewhere for testing? I've been trying the future branch, which very little success.

logicminds commented 8 years ago

just forced pushed the updated code to the future branch. Beware, demons be present. Feel free to review code and tell me how it could be better.

DavidS commented 8 years ago

Until this can be fully resolved, one thing that worked for me is replacing puppet 3's vendored safe_yaml with the upstream version. AFAICT this is only used for network communication, which retrospec isn't using anyways. This only required a bit of futzing around in lib/puppet/vendor.

logicminds commented 8 years ago

Because this gem brings its own puppet version, I don't have to concern myself with which puppet version you are using. The only reason why you would want to use the future parser setting is to allow the vendored puppet version 3.7.3 to be able to parse your code written in puppet 4 language.

I would also recommend installing puppet-retrospec outside of your Gemfile since it would be considered 'universal'. But I could see how things might get hairy if using a ruby not supported by puppet-3.7.

DavidS commented 8 years ago

It seems to be enough to have ruby-safe-yaml from debian installed to avoid puppet's vendored version. Of course that all is hackery that is not recommended for production, but Works for Me[tm] to unblock me for more Saturday night fun.

logicminds commented 8 years ago

@DavidS hit me up on IRC (cosman)