Is it a bug or a feature that directories that happen to be named ''generators'' deep inside a plugin (rather than at the top level) get searched for generators? It''s not mentioned by the documentation, but I''m wondering if anyone''s plugins might be broken by it, and if so, whether that''s their problem or Rails'' problem. Just trying to assess whether I should bother submitting a patch or not. - Matt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
2008/1/18, Matt Palmer <mpalmer@hezmatt.org>:> > Is it a bug or a feature that directories that happen to be named > ''generators'' deep inside a plugin (rather than at the top level) get > searched for generators?It''s a feature : in lib/rails_generator/lookup.rb it says : # Use component generators (model, controller, etc). [...] # 2. Look in plugins, either for generators/ or rails_generators/ # directories within each plugin> It''s not mentioned by the documentation, but I''m > wondering if anyone''s plugins might be broken by it, > and if so, whether that''s their problem or Rails'' problem.> Just trying to assess whether I should bother submitting a patch or not.In my opinion, you shouldn''t. -- Jean-François. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On Fri, Jan 18, 2008 at 12:05:43PM +0100, Jean-François Trân wrote:> 2008/1/18, Matt Palmer <mpalmer@hezmatt.org>: > > Is it a bug or a feature that directories that happen to be named > > ''generators'' deep inside a plugin (rather than at the top level) get > > searched for generators? > > It''s a feature : > > in lib/rails_generator/lookup.rb it says : > > # Use component generators (model, controller, etc). > [...] > # 2. Look in plugins, either for generators/ or rails_generators/ > # directories within each pluginThat is still as ambiguous as the code, though -- does it mean just in the top-level, or anywhere? While the plural "directories" would suggest anywhere, but using a plural after an "or" is fairly common usage in English. Beyond that, there''s still the issue of whether it''s correct operation to look for those directories anywhere in the tree. After all, we don''t add all ''lib'' directories we happen to find in the tree to the load path (or do we? I''d hope not).> > Just trying to assess whether I should bother submitting a patch or not. > > In my opinion, you shouldn''t.One vote against, then. Anyone else? - Matt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
> That is still as ambiguous as the code, though -- does it mean just in the > top-level, or anywhere? While the plural "directories" would suggest > anywhere, but using a plural after an "or" is fairly common usage in > English. > > Beyond that, there''s still the issue of whether it''s correct operation to > look for those directories anywhere in the tree. After all, we don''t add > all ''lib'' directories we happen to find in the tree to the load path (or do > we? I''d hope not).Yeah, it does seem kinda strange. generators or rails_generators directories at the top level of plugins makes sense, but crawling around inside the folders seems messy. If you investigate a patch, have a look at what plugins break / might break. We can mention the change in the release notes, but it''d be good to have a good idea going into the change rather than be surprised when 2.1 ships.> > > Just trying to assess whether I should bother submitting a patch or not. > > > > In my opinion, you shouldn''t. > > One vote against, then. Anyone else? > > - Matt > > > > >-- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On Mon, Jan 21, 2008 at 12:38:24PM +1300, Michael Koziarski wrote:> > That is still as ambiguous as the code, though -- does it mean just in the > > top-level, or anywhere? While the plural "directories" would suggest > > anywhere, but using a plural after an "or" is fairly common usage in > > English. > > > > Beyond that, there''s still the issue of whether it''s correct operation to > > look for those directories anywhere in the tree. After all, we don''t add > > all ''lib'' directories we happen to find in the tree to the load path (or do > > we? I''d hope not). > > Yeah, it does seem kinda strange. generators or rails_generators > directories at the top level of plugins makes sense, but crawling > around inside the folders seems messy. If you investigate a patch, > have a look at what plugins break / might break. We can mention the > change in the release notes, but it''d be good to have a good idea > going into the change rather than be surprised when 2.1 ships.Is there any sort of easily accessable list of plugins to test anywhere? The Rails plugins landscape seems pretty fugly to me -- I tend to stumble over plugins rather than having any single place to go and get all the code for them, like a supermirror (multiple "plugin index" sites doesn''t help matters). And besides, I think generators are deeply overused and I avoid plugins that abuse them, so I''m not heavily equipped with generator-using plugins. <grin> - Matt -- If Alan Turing was alive today, the homosexuality would be OK but he''d be in trouble for codebreaking. -- Martin Bacon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
> One vote against, then. Anyone else?A patch would be fine, it seems reasonable. Though, I don''t really see what it''s hurting either. -- Rick Olson http://lighthouseapp.com http://weblog.techno-weenie.net http://mephistoblog.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On Sun, Jan 20, 2008 at 04:40:25PM -0800, Rick Olson wrote:> > One vote against, then. Anyone else? > > A patch would be fine, it seems reasonable. Though, I don''t really > see what it''s hurting either.Distributed revision control is the reason it bit me -- metadata trees that happens to mirror the structure of the working copy give PathSource fits. There''s also the principle of least surprise. - Matt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---