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

Add convenience methods to ModuleLoader #3007

Merged
merged 2 commits into from
Jun 9, 2023
Merged

Add convenience methods to ModuleLoader #3007

merged 2 commits into from
Jun 9, 2023

Conversation

jedel1043
Copy link
Member

@jedel1043 jedel1043 commented Jun 7, 2023

While implementing an example of async module fetching, I realized it would be useful to have a way to insert a module through a &dyn ModuleLoader. This PR provides that API.

Drafting because I'm still experimenting with the final design of the API.

@jedel1043 jedel1043 added enhancement New feature or request API labels Jun 7, 2023
@jedel1043 jedel1043 added this to the v0.17.0 milestone Jun 7, 2023
@jedel1043 jedel1043 requested review from a team and removed request for a team June 7, 2023 00:02
@github-actions
Copy link

github-actions bot commented Jun 7, 2023

Test262 conformance changes

Test result main count PR count difference
Total 94,108 94,108 0
Passed 74,644 74,644 0
Ignored 17,740 17,740 0
Failed 1,724 1,724 0
Panics 0 0 0
Conformance 79.32% 79.32% 0.00%

@codecov
Copy link

codecov bot commented Jun 7, 2023

Codecov Report

Merging #3007 (e34edbc) into main (6879c59) will increase coverage by 0.36%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #3007      +/-   ##
==========================================
+ Coverage   50.22%   50.58%   +0.36%     
==========================================
  Files         446      446              
  Lines       46048    45923     -125     
==========================================
+ Hits        23127    23230     +103     
+ Misses      22921    22693     -228     
Impacted Files Coverage Δ
boa_engine/src/module/mod.rs 2.75% <0.00%> (-0.04%) ⬇️
boa_examples/src/bin/modules.rs 0.00% <ø> (ø)

... and 46 files with indirect coverage changes

@jedel1043
Copy link
Member Author

Yeah, I think this should be enough for now. We can revisit the API if we have reports about its limitations in the future.

@jedel1043 jedel1043 requested a review from a team June 7, 2023 21:27
@jedel1043 jedel1043 marked this pull request as ready for review June 7, 2023 21:27
boa_engine/src/module/mod.rs Outdated Show resolved Hide resolved
@jedel1043 jedel1043 requested review from raskad and a team June 9, 2023 00:04
@jedel1043 jedel1043 requested a review from a team June 9, 2023 00:17
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 to me! :)

@HalidOdat HalidOdat added this pull request to the merge queue Jun 9, 2023
Merged via the queue into main with commit 73a718c Jun 9, 2023
@raskad raskad deleted the mod-loader-utils branch June 9, 2023 00:49
Razican pushed a commit that referenced this pull request Jun 26, 2023
* Add convenience methods to `ModuleLoader`

* Document special behaviour of `SimpleModuleLoader`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants