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

Tidy up event loop handling code #697

Merged

Conversation

saulecabrera
Copy link
Member

This commit refactors the event loop handling code, mainly by extracting the common pieces into a reusable function.

Additionally, this commit ensures that the result of Promise.finish is corectly handled, which fixes execution of code with top level awaits.

Finally, this commit also ensures that we test the experimental_event_loop in CI for the CLI and core crates (follow-up to #238)

Checklist

  • I've updated the relevant CHANGELOG files if necessary. Changes to javy-cli and javy-core do not require updating CHANGELOG files.
  • I've updated the relevant crate versions if necessary. Versioning policy for library crates
  • I've updated documentation including crate documentation if necessary.

This commit refactors the event loop handling code, mainly by extracting
the common pieces into a reusable function.

Additionally, this commit ensures that the result of `Promise.finish` is
corectly handled, which fixes execution of code with top level awaits.

Finally, this commit also ensures that we test the
`experimental_event_loop` in CI for the CLI and core crates (follow-up
to bytecodealliance#238)
When the `experimental_event_loop` feature is enabled, a bit more work
is done when executing JS code, therefore there's more fuel usage
reported in some tests.
@saulecabrera
Copy link
Member Author

There's something strange about this failure, it's not failing locally. Let me look into it. I'll report back once it's solved.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
crates/cli/tests/integration_test.rs Outdated Show resolved Hide resolved
.github/workflows/cli-features.yml Outdated Show resolved Hide resolved
.github/workflows/cli-features.yml Outdated Show resolved Hide resolved
@saulecabrera saulecabrera enabled auto-merge (squash) July 8, 2024 19:00
@saulecabrera saulecabrera merged commit f8dea1b into bytecodealliance:main Jul 8, 2024
15 checks passed
@saulecabrera saulecabrera deleted the tidy-up-event-loop-handling branch July 8, 2024 19:15
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.

2 participants