Skip to content

modules: preserve import requests with attributes - #4

Merged
yorkiemakoto merged 1 commit into
masterfrom
codex/fix-import-attribute-requests
Nov 12, 2026
Merged

yorkiemakoto merged 1 commit into
masterfrom
codex/fix-import-attribute-requests

Conversation

@yorkiemakoto

@yorkiemakoto yorkiemakoto commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

A host with an attributes-aware module normalizer cannot distinguish imports of the same specifier with different attributes because the parser merges the requests before calling the host. Preserve separate requests when an attributes-aware normalizer is configured, allowing the host to produce distinct module identities. Legacy normalizers retain their existing behavior.

The tests cover typed and plain imports in both orders and confirm that unsupported types still fail for legacy and null normalizers. The macOS runner update keeps CI on a supported image.

Bytecode serialization is out of scope and tracked separately in #5. No generated files are changed.

Validation:

  • QuickJS API tests, including ASan/UBSan (leak detection unavailable on macOS)
  • QuickJS built-in tests: 0/59 errors, 5 excluded
  • Full Test262: 80,017 tests, 97 expected failures, no unexpected failures or fixed-baseline errors
  • make codegen produces no generated-file diff
  • Ink ink-scripting and real image/plain asset import regression tests

Merge using a merge commit before the dependent rquickjs PR so the pinned commit remains reachable. If squashed or rebased, update the downstream pointer and rerun validation.

Refs: https://github.com/jsar-project/ink/issues/667

Keep distinct requests for attribute-aware normalizers so hosts can resolve the same specifier with different import types. Preserve the existing behavior for legacy normalizers.
@yorkiemakoto
yorkiemakoto force-pushed the codex/fix-import-attribute-requests branch from 1857f63 to f01e4f0 Compare November 12, 2026 10:13
@yorkiemakoto
yorkiemakoto merged commit afc1c3b into master Nov 12, 2026
126 checks passed
@yorkiemakoto
yorkiemakoto deleted the codex/fix-import-attribute-requests branch November 12, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant