Closed Bug 1341411 Opened 7 years ago Closed 7 years ago

Support circular dependencies through export* per ES2017

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: anba, Assigned: anba)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Tracking issue to implement the changes from <https://github.com/tc39/ecma262/pull/783>.

main.js:
---
import {x, y} from './m1.js';
print(x, y);
---

m1.js:
---
export* from './m2.js';
---

m2.js:
---
export {y as x} from './m1.js';
export var y = 1;
---

Run with `mozjs -m main.js`.

Expected: Prints "1" two times.
Actual: Throws `SyntaxError: import 'x' not found`
Attached patch bug1341411.patchSplinter Review
This implements the changes from https://github.com/tc39/ecma262/pull/783 and also updates the ModuleResolveExport function to include the changes from https://github.com/tc39/ecma262/issues/601 (https://github.com/tc39/ecma262/issues/606) and https://github.com/tc39/ecma262/pull/485.
Assignee: nobody → andrebargull
Status: NEW → ASSIGNED
Attachment #8840396 - Flags: review?(jcoppeard)
Comment on attachment 8840396 [details] [diff] [review]
bug1341411.patch

Review of attachment 8840396 [details] [diff] [review]:
-----------------------------------------------------------------

Great, thanks for fixing.
Attachment #8840396 - Flags: review?(jcoppeard) → review+
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8c85b69a7a18
Support circular module dependencies through export* per ES2017. r=jonco
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/8c85b69a7a18
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.