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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WiP] Replace therubyracer with mini_racer (updates v8) #1496
[WiP] Replace therubyracer with mini_racer (updates v8) #1496
Conversation
I came to the same conclusion that due to Bundler's new enhanced multi platform support we now have to add every platform we want to support to the lockfile. Since they may often change (on linux it seems to be simple on Mac not so much) we could just go with adding the following as a setup/upgrade step? The lockfile isn't really guaranteed to be "git clean" due to UserGemfile anyways. # [..]
bundle lock --add-platform $(\ruby -e 'puts Gem::Platform.local')
bundle install
# [..] Any objections? |
I took a look around and I found discourse doing this: Without really studying it, I'd be inclined to follow what other popular projects are doing. |
f3aea0e
to
bf9dab9
Compare
Windows/Java?
Adding the platforms works for me on Mac and Ubuntu but M1-Macs have a whole different issue and we are probably missing jruby variations. And I don't know how to fix travis. I still think this is mostly an libv8 issue. As this is a rather unresolved issue with 2.2 should we just pin bundler to 2.1.X for now? Like the Dockerfile does. |
Yeah, I like this idea. |
4e4bf36
to
89213b6
Compare
Are you happy with this @2called-chaos ? It LGTM |
Well I guess. Should I add something to the readme/install instructions? That when an error with v8 occurs while bundling to either use bundler 2.1 or run the above mentioned command (and maybe ask to post the platform here so we can add it to the lockfile)? |
It works great for me, it works for you and it passes the tests. I'll merge it. We can keep an eye on the issues here and see if there's any trouble. |
Please don't merge yet.
Replacing therubyracer (dead since 2017) with mini_racer allows the ancient version of libv8 to get an update from 3.16 to 8.4 which fixes build errors on current systems (#1492 #1494).
rails assets:precompile
passesbundle install
passes with bundler >= 2.2Problem with bundler 2.2
As I understand it this is caused by a bug in libv8 and by a change in bundler which had unintended side effects. With how this PR is right now this will cause bundler 2.2 to fail with an error as described in the v8 bug.
As I understand the linked bundler PR should make it so that a lock generated with <2.2 should fallback to old behaviour but I fail to understand what that effectively means as it still fails.
Anyway, for bundler 2.2 we would now need to specify the specific platforms and I'm not sure what to add here. To be able to bundle on my Mac and my Ubuntu machine I need to add the following two:
As I'm not quite sure how backwards compatible this "specific platform" change is, I haven't yet added it to this PR. I just know that darwin alone has 16-19 potentially.
**Maybe we can collect a few common platforms? To get yours: **
Let me know what you think.
Update
What irks me a bit is that we don't do any of that in another project which is bundled on 2.2. It still only has the generic "ruby" platform and no darwin/linux specific libv8 versions. When I remove java as a platform from errbit's lock file (so only
ruby
remains) I can bundle without problems on both machines and no platform specific gem versions will be added to the lock file. Unfortunately I have no clue about jruby and Java and why this happens.Update 2
There is just something wrong somewhere in libv8 and/bundler. Remember when I said we don't have this problem in another repository? Well...
Almost uncut output: https://gist.github.com/2called-chaos/6025fb23a6cc85bb663e7fe62d7d589c
Bundle is fine and functioning, I add a totally unrelated gem and it fails? 馃槙 Also downloads 1GB every time you try it 馃檮