Skip to content
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

gel can't handle plugins defined in the Gemfile #126

Open
Fryguy opened this issue Jul 7, 2022 · 3 comments
Open

gel can't handle plugins defined in the Gemfile #126

Fryguy opened this issue Jul 7, 2022 · 3 comments

Comments

@Fryguy
Copy link

Fryguy commented Jul 7, 2022

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'
@Fryguy
Copy link
Author

Fryguy commented Jul 7, 2022

I'm not sure what the right "fix" for this would be - I'm assuming just ignore it and/or warn?

@matthewd
Copy link
Member

matthewd commented Jul 8, 2022

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. 😅)

@Fryguy
Copy link
Author

Fryguy commented Jul 8, 2022

Yeah I admit we have quite the interesting Gemfile 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants