Status: Needs Information
Affects Version/s: PUP 5.0.0
Fix Version/s: None
QA Risk Assessment:Needs Assessment
I am the author of puppet-retrospec (https://github.com/nwops/puppet-retrospec) which is a fairly popular tool for automating module content including rspec-puppet tests.
Puppet 5 removes the Rgen related code and puppet-retrospec relies heavily on these methods to find patterns in code.
In Puppet 4 the eContainer method allowed retrospec to perform a deep inspection of code by looking forward and backward to calculate puppet coding patterns. This was a huge benefit over the old Puppet 3 AST model.
Without the eContainer method the puppet-retrospec gem will not work in the current form. This would cause me to rewrite a major portion of the retrospec gem which I will probably not do as I have too many other things to do, and I just rewrote it to use puppet 4 parser last year.
My current work around is to just vendor the 4.x gem like I am currently doing, but eventually this will need to change if there are significant feature changes / additions in puppet 5.
I understand this is a tricky situation, you need to remove what was seen as unused code (Rgen) in order to move the platform forward which is totally fine, but I would like to see some sort of replacement for what was removed.
I don't think 3rd party tools should have to implement their own lexer / parser tooling for the puppet language when the puppet library comes with an awesome one already. Third party tools should be able to utilize the lexer / parser API built into puppet without fear of breaking changes.
For example the puppet-lint tool uses it's own lexer which is good because puppet 5 will not break it. However, the puppet-lint lexer also suffers from lack of puppet 4 support and any future additions to the puppet language will require more work. So really it is a huge burden for the tool maker to keep their own lexer current. Especially, when puppet ships with one.
What I would like to see:
1, A separate gem for 3rd party tooling, with Rgen, supported integration API, docs and examples
2. Put rgen back into puppet 5
3. Rewrite the broken code in retrospec-puppet and other gems