On Jan 8, 2011, at 1:00 PM, James Turnbull wrote: > Thomas Hallgren wrote: >> >> The question I'd like to ask is if it's feasible to use a hack to extract >> the needed meta-data without using Ruby, or if >> that will break anyway because more Ruby specific code is planned. I love >> Ruby, it's a beautiful language, but in this >> particular case it would be nice if I could circumvent it. >> >> Ideas and suggestions are very welcome. > > The Modulefile is just a DSL that is converted into some data for the > Forge and the metadata.json file. I suspect its format will stay > roughly the same and would expand in scope rather than deflate. I don't > expect to see Ruby-specific code in the DSL and so it should remain easy > to parse. The same with the metadata.json file. > > Types and providers should probably move in the same direction and have > metadata too for some of this. In meantime though the Forge only > consumes the type name and the @doc tag so hacking that is fine. In > future though we intend to pull more data out of the types and providers > in line with how the in-line docs currently do it that you can see at: > > http://docs.puppetlabs.com/references/stable/type.html
I'll go a bit stronger than James - it's important that this metadata file be implementation-independent and pure data, and we'll consider any move away from this to be a bug. Yes, we'll provide some additional hooks to extract things out of the Ruby code when possible, but that's always optional (or at least, should be), and even that data extraction should probably be done through an intermediary that other tools could also use (e.g., see https://projects.puppetlabs.com/issues/5819). -- I have a switch in my apartment... It doesn't do anything. Every once in a while, I turn it on and off. One day I got a call... It was from a woman in France... She said, "Cut it out!" -- Stephen Wright --------------------------------------------------------------------- Luke Kanies -|- http://puppetlabs.com -|- +1(615)594-8199 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" 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-dev?hl=en.
