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

Update to libv8-node 22.5.1.0 #306

Closed
wants to merge 2 commits into from
Closed

Update to libv8-node 22.5.1.0 #306

wants to merge 2 commits into from

Conversation

lloeki
Copy link
Collaborator

@lloeki lloeki commented Jul 23, 2024

No description provided.

@tisba
Copy link
Collaborator

tisba commented Jul 24, 2024

macOS 11 is no longer available in GHA. I have no idea why they hang, instead of failing right away. Fixed in #307.

Also, something seems to be off, as you can see https://github.com/rubyjs/mini_racer/pull/307/checks the build on main is fine 🤔

@lloeki
Copy link
Collaborator Author

lloeki commented Jul 24, 2024

As we saw with Sam, the failing test appears to be from V8 optimising an empty function out. I'll fix that by making it do something (same way I did for another similar test).

Also I fat fingered LIBV8_VERSION in version.rb :(

And since I want to fix this one too rubyjs/libv8-node#36 I'll certainly do a .1 release (which will be automatically picked up given the on-purpose libv8-node version requirement in mini_racer) once they're done.

@tisba
Copy link
Collaborator

tisba commented Jul 28, 2024

I'm not sure why the test_timeout uses a Promise to begin with, but the timeout is triggered (correctly IMO), by just while(true) {}. At least in my testing, this makes the test pass (tested on aarch64 and Darwin 23.5.0 arm64):

diff --git i/test/mini_racer_test.rb w/test/mini_racer_test.rb
index 6b139fd..f1fd1b9 100644
--- i/test/mini_racer_test.rb
+++ w/test/mini_racer_test.rb
@@ -1044,12 +1044,8 @@ def test_timeout
     context = MiniRacer::Context.new(timeout: 500, max_memory: 20_000_000)
     assert_raises(MiniRacer::ScriptTerminatedError) do
       context.eval <<~JS
-        var doit = async() => {
-        while (true)
-          await new Promise(resolve => resolve())
-        }
-        doit();
-        JS
+        while(true) {}
+      JS
     end
   end

@SamSaffron
Copy link
Collaborator

Cool made #308

dropping Ruby 3.0 as well while at it.

@SamSaffron SamSaffron closed this Jul 28, 2024
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

Successfully merging this pull request may close these issues.

3 participants