-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Platform specific gems not being found by bundler #5743
Comments
Interesting. I just tried this with Bundler 2.3.18 and everything worked as expected, and I'm using the exact same platform and ruby version you are using. Can you upgrade RubyGems too, since that's the only difference I can see between our environments? |
@deivid-rodriguez thanks for trying, that's really odd. I just tried with the updated gems and the same issue:
I'm only able to test this on a Mac M1 right now. Something interesting I just found out, if I manually edit the Gemfile.lock and remove the *** a Tue Jul 19 21:42:44 2022
--- b Tue Jul 19 21:39:07 2022
***************
*** 20,23 ****
--- 20,24 ----
PLATFORMS
arm64-darwin
- ruby
x86_64-darwin-20
x86_64-linux |
Hei, so I had a look at this yesterday and... I'm pretty sure this is indeed #5495 and what's worse, it's somehow expected. The rationale is that the However, this strict meaning of the "ruby" platform should only apply to freshly generated lockifles, and in #5495 I only intended to raise this error to avoid generating new "incorrect" lockfiles, but did not intend to break using old lockfiles with this shape. So, your case should be restored to work again and at most warn. That said, it seems tricky to fix so my advice to workaround for now is to do what you already did, remove the "ruby" platform from the lockfile. |
Thanks for looking into this so quick! That is indeed unfortunate, we have quite a few places where we have this issue. I understand that this was an unintended consequence of the other fix. I'm not sure if it's a good idea, but is it worth reverting #5495 and reintroducing it on a non-patch version or if a way is found to introduce this as a warning? The reason I bring this up is that I see more people reaching this issue internally and seems like people can end up spending a lot of time debugging this as the cause might not be straight forward. I'm not familiar with #5495 so maybe it's not worth the trade-off reverting it, just putting the thought out there. Anyway, thanks for looking into this! I'll remove the |
No problem! #5495 was not a very important fix, but it introduced some simplifications that I think unblock fixing other issues, like #4488. So I'd like to not revert it. I'll try to figure out a way to keep existing lockfiles working and either print a warning in this case, or directly remove the "ruby" platform from them. |
@deivid-rodriguez Dependabot seems to have upgraded the bundler version they use internally and all our repositories which use sorbet now fail with this error 😞 |
@ashkulz yea, that was pretty much how we found out about this too. Removing |
Sorry about that. As I said before I'll try to figure this out. At least you have a workaround, that's something. |
@aericson yeah, I found that workaround too. Not sure if it's safe to use it, though ... will have to QA it properly on Monday before merging. |
I'm actually running into this issue, even though we do not have We are not getting the platform-specific version of grpc for linux specifically, and that's been causing some performance hits during CI and other places we bundle install from scratch. I tried re-adding the platform (ie If I start from scratch, ie |
Can you confirm it's also a regression from #5495? If it is, what was the previous behavior, exactly? |
I have just a single platform |
I'll work on this soon. To workaround your case I think you can regenerate your lockfile, so it uses your current platform instead of "ruby". |
Removing |
Oh, this might be a different issue then. Can you show your |
|
Yeah, it's a different issue, but I guess also caused by #5495. Which gem do you expect to get installed, and which gem did you get installed before? It should be |
Actually, can you show the result of |
Yep, I do have |
#5807 should fix this! |
Describe the problem as clearly as you can
Bundler not able to find platform-specific gem after upgrading to 2.3.17 with existing an Gemfile.lock. Getting the same results both on Mac and on linux.
Maybe related to #5715
Maybe introduced by #5495
I'm very new to ruby, please let me know if there is anything else I can do to help debugging this.
Did you try upgrading rubygems & bundler?
Yes, tried 2.3.18 too.
Post steps to reproduce the problem
bundle install
with version 2.3.17+bundle outdated
with version 2.3.17+What were you expecting to happen?
Bundler should tell me there is an update to the gem.
If not included with the output of your command, run
bundle env
and paste the output belowEnvironment
Bundler Build Metadata
Bundler settings
The text was updated successfully, but these errors were encountered: