Jira (PUP-7430) Removal of Rgen methods breaks third party tools

1 view
Skip to first unread message

Corey Osman (JIRA)

unread,
Apr 5, 2017, 11:24:02 PM4/5/17
to puppe...@googlegroups.com
Corey Osman created an issue
 
Puppet / Bug PUP-7430
Removal of Rgen methods breaks third party tools
Issue Type: Bug Bug
Affects Versions: PUP 5.0.0
Assignee: Unassigned
Created: 2017/04/05 8:23 PM
Priority: Normal Normal
Reporter: Corey Osman

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 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

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Corey Osman (JIRA)

unread,
Apr 6, 2017, 1:12:02 PM4/6/17
to puppe...@googlegroups.com
Corey Osman updated an issue
Change By: Corey Osman
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 ;)
 


Moses Mendoza (JIRA)

unread,
May 17, 2017, 3:04:02 PM5/17/17
to puppe...@googlegroups.com
Moses Mendoza assigned an issue to Henrik Lindberg
Change By: Moses Mendoza
Assignee: Henrik Lindberg

Moses Mendoza (JIRA)

unread,
May 17, 2017, 3:05:02 PM5/17/17
to puppe...@googlegroups.com

Moses Mendoza (JIRA)

unread,
May 18, 2017, 1:55:15 PM5/18/17
to puppe...@googlegroups.com

Henrik Lindberg (JIRA)

unread,
Nov 30, 2017, 6:00:05 AM11/30/17
to puppe...@googlegroups.com
Henrik Lindberg assigned an issue to Unassigned
Change By: Henrik Lindberg
Assignee: Henrik Lindberg
This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db)
Atlassian logo

Josh Cooper (Jira)

unread,
Jun 11, 2021, 5:52:01 PM6/11/21
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-7430
 
Re: Removal of Rgen methods breaks third party tools

This hasn't seen any updates in several years, so I'm going to close this out. If this is still needed please reopen.

This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages