-
-
Notifications
You must be signed in to change notification settings - Fork 406
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
[Merged by Bors] - Added a Boa runtime #2743
Conversation
Test262 conformance changes
|
Codecov Report
@@ Coverage Diff @@
## main #2743 +/- ##
==========================================
- Coverage 50.99% 50.95% -0.05%
==========================================
Files 419 419
Lines 41858 41874 +16
==========================================
- Hits 21345 21335 -10
- Misses 20513 20539 +26
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@@ -0,0 +1,73 @@ | |||
//! Example runtime for Boa | |||
//! | |||
//! This crate contains an example runtime for the `boa_engine` crate, so that it can be used as a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is a larger discussion, but should we be referring to this as an example runtime or as boa's basic runtime implementation and encourage implementors to use it as a template/build on it for their own needs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It only has one builtin for now, so I'm not sure at this point 😅 but I'm open to it, of course
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neither am I lol I mainly mention it because the crate is named boa_runtime
but it only has console in it. Since there have been issues submitted around a setTimeout
implementation, someone may see the crate and immediately think: "oh, it's a runtime" and then get confused. If you're fine with it, then I'm good to merge this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, I would say, let's merge it, and add timeout and all this stuff to it slowly, see how it evolves :)
Missed opportunity to call it Boa Time!? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Just a small nitpick :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think having a public boa_testing
crate is a good idea, since the API of that will change constantly while we work on the engine.
I'd very much prefer to move the tests of console
into boa_testing
and skip publishing the crate, maybe allowing us to migrate our integration tests to that crate in the future.
I have skipped publishing of the crate. About moving console tests there, we could do it, but then I would like to have them under |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good then!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, typo on the attribute
Now that I think about it, cargo also considers dev dependencies to publish crates, so we cannot exclude I know this because I ran
even if |
Hmmm, I'm also not fully confident of having "boa_testing" and "boa_tester" as crates, can confuse people. I'll try to make the crate not depend on boa_engine, and if I can't, then I would say we should duplicate the code in boa_runtime, and improve the architecture in the future if needed. |
Maybe we could just name it 'tests'? If the crate won't be published anyways, it shouldn't matter if it doesn't have the 'boa_' prefix. It also gives a pretty strong indicator that this crate is not published, only used internally. |
For now, I've gone through the route of duplicating the code in the Feel free to review it again, as I have rebased the code :) |
I re-based and ran "cargo update", which updated ICU to 1.2.0. Unfortunately, they have broken backwards compatibility, first with this: unicode-org/icu4x#3332, but then, I replaced the imports, and I now get a bunch of compile errors. So, it seems that 1.2.0 is not backwards compatible with 1.1.0. I have pinned 1.1.0 for now. This should probably be reviewed & merged :) Missing @jedel1043's confirmation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can merge as it is, we'll try to deduplicate the tests logic in the future. Nice work!
bors r+ |
Merge conflict. |
I have rebased this, and reverted bitflags, since bitflags 2.2.0 was yanked. I think we can merge it now (if all tests pass) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Lets merge this! :)
bors r+ |
This Pull Request fixes/closes #718. It changes the following: - Adds a new `boa_runtime` crate, that will only include `console` for now - Changes the `boa_cli` crate to use the new `boa_runtime` crate for the console, instead of the `console` feature of `boa_engine` - Removes the `console` feature in `boa_engine` - Adds a new `boa_testing` helper crate with some useful functions for testing `boa`. This part duplicates the code from `boa_engine`, but I could not make `boa_engine` work with this crate as a dependency due to circular dependencies. Maybe doing it a bit generic could work, but didn't have enough time to check it. To be checked: wether the WASM example works as expected with the console.
Pull request successfully merged into main. Build succeeded: |
This Pull Request fixes/closes #718.
It changes the following:
boa_runtime
crate, that will only includeconsole
for nowboa_cli
crate to use the newboa_runtime
crate for the console, instead of theconsole
feature ofboa_engine
console
feature inboa_engine
boa_testing
helper crate with some useful functions for testingboa
. This part duplicates the code fromboa_engine
, but I could not makeboa_engine
work with this crate as a dependency due to circular dependencies. Maybe doing it a bit generic could work, but didn't have enough time to check it.To be checked: wether the WASM example works as expected with the console.