-
Notifications
You must be signed in to change notification settings - Fork 121
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
tapioca sync fails because of nokogiri native gem having different dependencies than compiled gem #208
Comments
Unfortunately this is not fixed by adding a tapioca config file since Tapioca doesn't take the ---
exclude: ['mini_portile2'] |
If I change tapioca/lib/tapioca/gemfile.rb Line 35 in 1efec9e
Then the problem is fixed. Assuming there's no good way to determine whether a gem is platform-specific and should be excluded via Bundler, then we could pass the |
This uses a workaround I discovered for this issue: Shopify/tapioca#208 Kind of a hack, but it works.
@connorshea Thanks for reporting this and the detailed analysis. This looks related to #28. I'll take another look at this. Maybe we can do a pre-pass on the |
Looking at the code, I just realized what you mean by this. It does seem like passing in an empty array for |
I am having a hard time reproducing this case on my local machine. Is it possible for you to link to a Gist or something that has dependency on Tapioca and Nokogiri where I could reproduce this? The code change is trivial but I would like to add a test to make sure we don't regress if we fix this. |
@paracycle sure, I'm putting one together right now. I think the key is that you need to use |
@paracycle I've created a really basic repo by just doing these commands:
So all you need to do is clone this repo and run If you're on Linux, I'm not 100% sure if this'll fail because it falls back to "ruby" and compiles nokogiri from scratch or if it'd just add linux as a platform in the gemfile automatically. |
Awesome, thanks for the repro. I am able to reproduce with those steps and passing an array for I'll PR something today or tomorrow (depending on the amount of code changes I need to make to test this cleanly). |
Thanks! |
Essentially, this error occurs when I run
bundle exec tapioca sync
on my Rails app vglist:I tried upgrading RubyGems, upgrading Bundler, upgrading Sorbet, downgrading Tapioca from
0.4.13
to0.4.10
, runningbundle pristine
to reinstall absolutely every gem in my Gemfile, and none of it changed anything. It occurs on both Bundler 2.2.3 and 2.2.5.The only thing that fixed it was downgrading nokogiri from 1.11.1 to 1.10.10, which removes the native gem differentiation.
I suspect it has to do with this, nokogiri 'proper' requiring mini_portile2 but its native versions not?:
It looks like it's an intentional choice by Nokogiri, because mini_portile2 is required to compile nokogiri, but if you have a pre-compiled version there's no reason to install it: sparklemotion/nokogiri#2078
So that'd explain why we don't have the gem locally on macOS. I suspect we need to figure out a way to filter out gems that wouldn't exist locally?
The text was updated successfully, but these errors were encountered: