Skip to content

fix module loader cache#5278

Open
Monti-27 wants to merge 3 commits intoboa-dev:mainfrom
Monti-27:module-loader-attrs
Open

fix module loader cache#5278
Monti-27 wants to merge 3 commits intoboa-dev:mainfrom
Monti-27:module-loader-attrs

Conversation

@Monti-27
Copy link
Copy Markdown
Contributor

Fixes #5270.

This makes SimpleModuleLoader cache modules with their import attributes instead of only by path.
It also adds a regression test for the json case where the same path is imported once with attributes and later without them.

Tests:

  • cargo test -p boa_engine --test imports -- --nocapture
  • cargo test -p boa_engine --test module -- --nocapture
  • cargo clippy -p boa_engine --all-features --all-targets -- -D warnings

@Monti-27 Monti-27 requested a review from a team as a code owner March 28, 2026 12:06
@github-actions github-actions bot added C-Tests Issues and PRs related to the tests. Waiting On Review Waiting on reviews from the maintainers labels Mar 28, 2026
@github-actions github-actions bot added this to the v1.0.0 milestone Mar 28, 2026
@github-actions
Copy link
Copy Markdown

Test262 conformance changes

Test result main count PR count difference
Total 52,963 52,963 0
Passed 50,732 50,732 0
Ignored 1,426 1,426 0
Failed 805 805 0
Panics 0 0 0
Conformance 95.79% 95.79% 0.00%

Tested main commit: f075094f9674f9919b4d2e85ca1bcba410bf34b0
Tested PR commit: bf62774e09d8b3e926b3d09b0d15427c669eaf4f
Compare commits: f075094...bf62774

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 28, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.73%. Comparing base (6ddc2b4) to head (bf62774).
⚠️ Report is 921 commits behind head on main.

Files with missing lines Patch % Lines
core/engine/src/module/loader/mod.rs 66.66% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5278       +/-   ##
===========================================
+ Coverage   47.24%   59.73%   +12.49%     
===========================================
  Files         476      589      +113     
  Lines       46892    63477    +16585     
===========================================
+ Hits        22154    37920    +15766     
- Misses      24738    25557      +819     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-Tests Issues and PRs related to the tests. Waiting On Review Waiting on reviews from the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SimpleModuleLoader cache ignores import attributes

1 participant