gel can't handle plugins defined in the Gemfile
Fryguy opened this issue · comments
I'm not sure if plugins are planned to be supported for gel or not, and I wouldn't expect bundler plugins to work at all, but the presence of a plugin
directive in the Gemfile just breaks gel.
Using v0.8.0-pre
:
ERROR: Failed to evaluate "/Users/jfrey/dev/manageiq/Gemfile": undefined method `plugin' for #<Gel::GemfileParser::ParseContext:0x00007f9000070458>
/Users/jfrey/dev/manageiq/Gemfile:6:in `parse'
I'm not sure what the right "fix" for this would be - I'm assuming just ignore it and/or warn?
Hmmm. Modulo possible improvements to the error message, I think hard-failure is the correct thing to do here: we don't know what the plugin does / how vital it is, so I don't think it's safe in general to warn-and-continue. 🤔
It might require a more complicated conditional if we do add a custom error message, but for now, I think it makes most sense to recommend an if defined?(plugin)
block in the Gemfile.
(This doesn't get you much further... Gel doesn't current expose dependencies
-- you can hack it with unless @result.gems.detect { |name, *| name == plugin_name }
for now, but you're definitely not supposed to be interacting with that ivar, so I think I'll need to add the compatible API. And after overcoming that, it gets confused about the source for mime-types
, so there's something for me to fix there too. 😅)
Yeah I admit we have quite the interesting Gemfile 😂