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

Rename "Boa" to boa_engine, moved GC and profiler to their crates #1844

Merged
merged 7 commits into from Feb 21, 2022

Conversation

Razican
Copy link
Member

@Razican Razican commented Feb 17, 2022

This PR closes #230.

It changes the following:

  • Changes the main crate name from "Boa" to "boa_engine"
  • Creates the "boa_gc" crate which for now just exports the "gc" crate, but will contain a custom garbage collector in the future. Unfortunately, due to how the "gc_derive" crate is implemented, we still need to import the "gc" crate in "boa_engine"
  • Creates the "boa_profiler" crate with the boa profiler.
  • Improves some imports, cleans some stuff up (for example, we were re-exporting the Position in multiple places, or we were importing the TryInto trait, which is now in the prelude)
  • Ordered workspace member crates alphabetically
  • Added more exclusions to package creations
  • Improved categories, keywords and ordered Cargo.toml fields
  • Added new folders to dependabot (and boa_unicode, which was missing)
  • Fixed some caching inconsistencies
  • Removed top-level re-exports for external crates. Let me know if you want me to add this back :)

I didn't move the Boa console to its own crate, since this requires further work in the engine, since it is currently part of the Context. Ideally, I would like this to be a separate crate and for "boa_engine" to not have it as a dependency ("boa_cli" would depend on it, of course, maybe "boa_wasm" too).

@Razican Razican added enhancement New feature or request dependencies Pull requests that update a dependency file labels Feb 17, 2022
@Razican Razican added this to the v0.14.0 milestone Feb 17, 2022
@Razican Razican changed the title Separated GC and Profiler Rename "Boa" to boa_engine, moved GC and profiler to their crates Feb 17, 2022
@github-actions
Copy link

github-actions bot commented Feb 17, 2022

Test262 conformance changes

VM implementation

Test result main count PR count difference
Total 87,912 87,912 0
Passed 41,354 41,354 0
Ignored 21,153 21,153 0
Failed 25,405 25,405 0
Panics 12 12 0
Conformance 47.04% 47.04% 0.00%

@codecov
Copy link

codecov bot commented Feb 17, 2022

Codecov Report

Merging #1844 (07adca6) into main (517c672) will increase coverage by 0.81%.
The diff coverage is 95.93%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1844      +/-   ##
==========================================
+ Coverage   55.27%   56.09%   +0.81%     
==========================================
  Files         200      200              
  Lines       17860    17901      +41     
==========================================
+ Hits         9873    10042     +169     
+ Misses       7987     7859     -128     
Impacted Files Coverage Δ
boa_cli/src/main.rs 5.26% <ø> (ø)
boa_engine/src/bigint.rs 61.83% <ø> (ø)
boa_engine/src/builtins/dataview/mod.rs 6.81% <ø> (ø)
boa_engine/src/builtins/function/arguments.rs 88.67% <ø> (ø)
boa_engine/src/builtins/intrinsics.rs 83.33% <ø> (ø)
boa_engine/src/builtins/map/ordered_map.rs 72.05% <ø> (ø)
boa_engine/src/builtins/mod.rs 23.72% <ø> (ø)
boa_engine/src/builtins/number/conversions.rs 68.42% <ø> (ø)
boa_engine/src/builtins/set/ordered_set.rs 64.28% <ø> (ø)
...src/builtins/typed_array/integer_indexed_object.rs 0.00% <ø> (ø)
... and 196 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 517c672...07adca6. Read the comment docs.

Cargo.toml Outdated Show resolved Hide resolved
@Razican
Copy link
Member Author

Razican commented Feb 18, 2022

Unfortunately, the benchmarking error won't go away, since the path for the main crate is different in the PR and in the "main" branch.

Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No comments from my side :)

Copy link
Member

@raskad raskad left a 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 the fixes for boa_profiler.

boa_engine/src/syntax/parser/statement/return_stm/tests.rs Outdated Show resolved Hide resolved
boa_engine/Cargo.toml Outdated Show resolved Hide resolved
]

[dependencies]
measureme = { version = "10.0.0", optional = true }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
measureme = { version = "10.0.0", optional = true }
measureme = { version = "10.0.0", optional = true }
once_cell = "1.9.0"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to add a feature, in order to not have an unused dependency when the measure feature was not selected.

boa_profiler/src/lib.rs Outdated Show resolved Hide resolved
boa_profiler/src/lib.rs Outdated Show resolved Hide resolved
boa_profiler/src/lib.rs Outdated Show resolved Hide resolved
boa_profiler/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Member

@HalidOdat HalidOdat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the things pointed out by @raskad. Everything looks good from my side :)

@jasonwilliams
Copy link
Member

I had a query around the use of “engine”. I think this was already discussed so sorry for bringing it back up. But why did we go with engine over core? I’d assume the fact it’s a js engine is implied, and core would be more consistent with both ChakraCore and JavascriptCore the Microsoft and WebKit engines respectively.

For me engine is a bit like having “interpreter” in the name.

@RageKnify
Copy link
Member

@jasonwilliams my argument was that it seems weird for core to depend on other crates. I don't view it as a core of the whole.

@Razican Razican merged commit 4d2772d into main Feb 21, 2022
@bors bors bot deleted the multi_crates branch February 21, 2022 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename cargo package
6 participants