bartavelle / language-puppet

A library to work with Puppet manifests, test them and eventually replace everything ruby.
BSD 3-Clause "New" or "Revised" License
51 stars 8 forks source link

Add support for puppet Heredoc #258

Open PierreR opened 5 years ago

PierreR commented 5 years ago

While trying to update the puppetlabs-postgresql module from 5.2.1 to 5.3.0, I have this parser error:

[nix-shell:~/projects/bric/cicd/puppet/cicd]$ puppetresources --parse ./modules/postgresql/manifests/server/extension.pp
ERROR: cannot parse ./modules/postgresql/manifests/server/extension.pp:60:27:
   |
60 |       unless           => @("END")
   |                           ^^^^^^^^^
unexpected "@("END")<newline>        SELECT 1<newline>        WHERE EXISTS"
expecting expression

https://github.com/puppetlabs/puppetlabs-postgresql/blob/master/manifests/server/extension.pp#L60

bartavelle commented 5 years ago

Yeah, that kind of thing is not supported yet :( I will see if it is obvious or not to port ...

PierreR commented 5 years ago

Here is the spec: https://github.com/puppetlabs/puppet-specifications/blob/master/language/heredoc.md