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

Simplify all extensions APIs of Context #3456

Merged
merged 1 commit into from
Nov 9, 2023
Merged

Simplify all extensions APIs of Context #3456

merged 1 commit into from
Nov 9, 2023

Conversation

jedel1043
Copy link
Member

@jedel1043 jedel1043 commented Nov 6, 2023

It seems like all our extensions usages fall in the same types:

  • Rc for JobQueue and ModuleLoader.
  • &'static for HostHooks.

This makes our API unnecessarily complex, so we should probably just commit to those representations to simplify our API for the common use case. This also removes the lifetime parameter Context has, which is why there are so many changes. The important changes are:

@jedel1043 jedel1043 added the API label Nov 6, 2023
@jedel1043 jedel1043 added this to the v0.18.0 milestone Nov 6, 2023
@jedel1043 jedel1043 requested a review from a team November 6, 2023 20:54
Copy link

codecov bot commented Nov 6, 2023

Codecov Report

Attention: 720 lines in your changes are missing coverage. Please review.

Comparison is base (2a26c29) 44.67% compared to head (3f3613d) 44.65%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3456      +/-   ##
==========================================
- Coverage   44.67%   44.65%   -0.02%     
==========================================
  Files         488      487       -1     
  Lines       50513    50503      -10     
==========================================
- Hits        22567    22554      -13     
- Misses      27946    27949       +3     
Files Coverage Δ
boa_engine/src/builtins/array/array_iterator.rs 81.13% <100.00%> (ø)
boa_engine/src/builtins/async_function/mod.rs 39.13% <ø> (ø)
...ngine/src/builtins/async_generator_function/mod.rs 46.15% <ø> (ø)
boa_engine/src/builtins/dataview/mod.rs 16.91% <ø> (ø)
boa_engine/src/builtins/date/mod.rs 92.46% <100.00%> (ø)
boa_engine/src/builtins/error/aggregate.rs 22.22% <ø> (ø)
boa_engine/src/builtins/error/eval.rs 72.72% <ø> (ø)
boa_engine/src/builtins/error/mod.rs 89.58% <ø> (ø)
boa_engine/src/builtins/error/range.rs 72.72% <ø> (ø)
boa_engine/src/builtins/error/reference.rs 73.52% <ø> (ø)
... and 235 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Nov 6, 2023

Test262 conformance changes

Test result main count PR count difference
Total 95,609 95,609 0
Passed 76,518 76,518 0
Ignored 18,132 18,132 0
Failed 959 959 0
Panics 0 0 0
Conformance 80.03% 80.03% 0.00%

Copy link
Member

@nekevss nekevss 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 :)

@nekevss nekevss requested a review from a team November 8, 2023 04:10
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.

Looks good! Just a nitpick :)

boa_engine/src/context/mod.rs Show resolved Hide resolved
@jedel1043 jedel1043 added this pull request to the merge queue Nov 9, 2023
Merged via the queue into main with commit baa4f98 Nov 9, 2023
14 checks passed
@jedel1043 jedel1043 deleted the better-hooks-api branch November 9, 2023 02:48
ahaoboy pushed a commit to ahaoboy/boa that referenced this pull request Nov 15, 2023
ahaoboy pushed a commit to ahaoboy/boa that referenced this pull request Nov 15, 2023
sam-finch-tezos pushed a commit to trilitech/boa that referenced this pull request Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants