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

override_gem doesn't override a transient dependency #11

Open
Fryguy opened this issue Oct 22, 2019 · 7 comments
Open

override_gem doesn't override a transient dependency #11

Fryguy opened this issue Oct 22, 2019 · 7 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Fryguy
Copy link
Member

Fryguy commented Oct 22, 2019

In ManageIQ, if I do

override_gem "azure-armrest", :path => "~/dev/azure-armrest"

I get the following error

Installing bundler-inject 1.1.0

[!] There was an error parsing `Gemfile.local.rb`: Trying to override unknown gem "azure-armrest". Bundler cannot continue.

 #  from /Users/jfrey/dev/manageiq/bundler.d/Gemfile.local.rb:7
 #  -------------------------------------------
 #  #
 >  override_gem "azure-armrest", :path => "/Users/jfrey/dev/manageiq-cross_repo-tests/repos/ManageIQ/azure-armrest@a28277d722984416a782f940da907e7a5cb7f036"
 #  -------------------------------------------

Even though it's a transient dependency, I'd expect it to work.

@Fryguy Fryguy changed the title override_gem doesn't override a dependency of a dependency override_gem doesn't override a transient dependency Oct 22, 2019
@Fryguy Fryguy added the bug Something isn't working label Oct 22, 2019
@Fryguy Fryguy self-assigned this Nov 5, 2019
@Fryguy Fryguy removed their assignment Nov 9, 2020
@Fryguy Fryguy added the help wanted Extra attention is needed label Nov 9, 2020
@kbrock
Copy link
Member

kbrock commented May 4, 2021

I think this intentionally blows up when it does not know the gem. The gem is not available (yet) so it complains.

Do you want to be able to override gems that are not part of the gemfile at all and have them act like a gem command? I do something like that in my own Gemfiles

@agrare
Copy link
Member

agrare commented May 4, 2021

Didn't we add ensure_gem for this?

@Fryguy
Copy link
Member Author

Fryguy commented May 5, 2021

No, this is a different issue from ensure_gem.

@Fryguy
Copy link
Member Author

Fryguy commented May 5, 2021

Though that being said, maybe ensure_gem would work for this case? If so, we should document that.

@agrare
Copy link
Member

agrare commented May 5, 2021

If the issue is that the gem you're trying to override isn't in the main Gemfile but rather brought in by another gem, then I use ensure_gem for this all the time...basically anytime I need to override a provider sdk gem.

@agrare
Copy link
Member

agrare commented May 5, 2021

Maybe that's an "undocumented" use case of ensure_gem but it 100% works 😄

@Fryguy
Copy link
Member Author

Fryguy commented May 5, 2021

Ok, interesting - yeah then we should at least document it in the README, and then we can close this, or change it to a feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants