Issue #8233 has been updated by Luke Kanies.

Yes, this is part of a larger transition.

The main transition I have in mind is:

1) Build a decent API for type definition and management
2) Refactor Puppet::Type into Puppet::Resource, Puppet::Resource::Type, and 
Puppet::Resource::TypeCollection


I tried just going straight to step 2, but it became too complicated because of 
how crappy the current API is.  I figured it'd be easier to fix the current 
api, then refactor around that.

I don't know how long #2 will take, but I am confident that at worst we can 
provide compatibility on top of it if needed.

In terms of the issues with the current design, see #16008.  I don't have a 
plan at this point for the actual long-term API for the RAL, other than that it 
be implemented with the above-mentioned classes in the back-end.
----------------------------------------
Refactor #8233: Puppet::Type parameter handling should be cleaner
https://projects.puppetlabs.com/issues/8233#change-69796

Author: Luke Kanies
Status: In Topic Branch Pending Review
Priority: Normal
Assignee: 
Category: RAL
Target version: 
Affected Puppet version: 
Keywords: 
Branch: luke/refactor/3.x/8233-refactor_parameter_management


In the course of trying a few approaches to refactoring how the RAL is built, 
it's become clear that one of the main impediments to it is the crusty 
interface for managing parameters in Puppet::Type - e.g., lots of redundant 
methods for managing parameters, properties, and metaparameters, and a ton of 
confusing naming.

These should be cleaned up, both for short-term sanity and for long-term 
refactoring enablement.

I've got a branch that does exactly that, fortunately. :)

The only potential issues with my branch are:

* It changes the interface of Puppet::Type.parameters - this previously 
returned a list of names, and now it returns the class referred to by a given 
parameter name

* It removes the old methods, rather than keeping them around for backward 
compatibility.

In other words, this branch breaks compatibility with some methods used in 
managing builtin resource types.  I expect a better approach is to retain 
backward compatibility, but I wanted to post the code and get feedback rather 
than deciding on my own.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to