- From: Noah Kantrowitz <
>
- To: Chef Dev <
>
- Subject: [chef-dev] 12.4 DSL in core providers
- Date: Fri, 26 Jun 2015 16:21:59 -0700
Throwing this on the mailing list as a reminder since I think I've used up my
quota of tickets lately: It would be nice to move towards adding the recipe
DSL back to Chef::Provider. Currently there are unpleasant issues when you
subclass a non-DSL-using provider and then mix in the DSL module. Several
providers have methods with names matching DSL stuffs,
(
https://github.com/chef/chef/blob/master/lib/chef/provider/git.rb#L324,
https://github.com/chef/chef/blob/master/lib/chef/provider/execute.rb#L30) so
if you mix in the DSL such that it comes before the superclass in the MRO,
stuff goes haywire. If the DSL was pulled in earlier in the MRO, then the
"correct" methods would take priority. I can fix this one-off each time it
comes up, but being unable to use the DSL when extending core classes is
something I would love to see in the future (ex.
https://github.com/poise/application_git/blob/master/lib/poise_application_git/resource.rb
and
https://github.com/poise/poise-ruby/blob/master/lib/poise_ruby/resources/ruby_execute.rb).
--Noah
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail
- [chef-dev] 12.4 DSL in core providers, Noah Kantrowitz, 06/26/2015
Archive powered by MHonArc 2.6.16.