-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugins exception #28
Conversation
The logic needs to be fixed be fixed because the plugins message is always printed even if there are no exceptions. |
Can you paste an example of the output? Because I don’t know for sure if I understand everything this is about correctly. |
The output just prints that some plugins might be the cause of the crash, my question was about wether it is safe to assume the the plugins loader file should be in |
Instead of? All ruby files in a gem should normally be in the |
Instead of |
ping |
I don’t know if there is a reason to not do this. Have you looked into other conventions that also use the RubyGems find files system? |
I haven't looked into other conventions (not sure about which examples to look at). I think that it is a reasonable requirement. The only concern is wether some existing plugins might break because they don't respect it. However I don't think that this would be the case because they should have been bootstrapped from the code of the original examples. |
I think Rails plugins have a convention, which is to add an init file outside of lib. And otherwise the RubyGems CLI plugins should provide a good example of what works best for RubyGems. |
from http://guides.rubygems.org/plugins Indeed it does. However, I don't think that there any concrete advantages over our current approach (other than elegance) and thus I would prefer to keep our convention in place because changing at this point is not worth it. To sum up, the question of this pull request is:
|
ping |
# | ||
def self.load_plugins(plugin_prefix) | ||
return if plugin_paths |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@plugin_paths ||= begin
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tend not to use this syntax because I have observed issues with the automatic alignment of vim.
@irrationalfab any update on this PR? |
I have rebased the branch. I think that standardizing that plugins should include the plugin loader ( I don't think that it should create any issue with existing plugins because all our plugins and the templates already adhere to this convention. Given the lack of feedback I'm letting the to @CocoaPods/core 24h hours to oppose to this patch and after I will merge it. |
👍 |
To reasonably desume the plugins from the backtrace it is necessary to determine the root of the gem of the plugin. For this reason this patch changes the convention that the require file should be under the
./lib
dir (e.g../lib/cocoapods-plugin.rb
). This is coherent with RubyGems conventions and I don't expect related issues thus./c @alloy
Closes #4.