Support circular dependencies through export* per ES2017

RESOLVED FIXED in Firefox 54

Status

()

Core
JavaScript Engine
RESOLVED FIXED
8 months ago
8 months ago

People

(Reporter: anba, Assigned: anba)

Tracking

(Blocks: 1 bug)

Trunk
mozilla54
Points:
---

Firefox Tracking Flags

(firefox54 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

8 months ago
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`
(Assignee)

Comment 1

8 months ago
Created attachment 8840396 [details] [diff] [review]
bug1341411.patch

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 2

8 months ago
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+
(Assignee)

Comment 3

8 months ago
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=a4a5cc99118d27aa5da0d7dcf3e3de2c56df8409
Keywords: checkin-needed

Comment 4

8 months ago
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

Comment 5

8 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/8c85b69a7a18
Status: ASSIGNED → RESOLVED
Last Resolved: 8 months ago
status-firefox54: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.