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

Support type=module script element #23545

Merged
merged 11 commits into from
Jan 6, 2020
Merged

Conversation

CYBAI
Copy link
Member

@CYBAI CYBAI commented Jun 10, 2019

This is still WIP but hope can be reviewed first to see if I'm on the right track. Thanks! πŸ™‡β€β™‚οΈ

  • Support external module script
  • Support internal module script
  • Compile cyclic modules

  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix Support type=module script elementΒ #23370 (GitHub issue number if applicable)
  • There are tests for these changes

This change is Reviewable

@CYBAI CYBAI requested review from jdm and nox June 10, 2019 14:58
@CYBAI
Copy link
Member Author

CYBAI commented Jun 10, 2019

@bors-servo try=wpt

  • I think there're some tests still failed but I'd like to see if there's any PASS tests with current implementation πŸ€”

bors-servo pushed a commit that referenced this pull request Jun 10, 2019
[WIP] Support type=module script element

This is still WIP but hope can be reviewed first to see if I'm on the right track. Thanks! πŸ™‡β€β™‚οΈ

- [x] Support external module script
- [ ] Support internal module script
- [ ] Compile cyclic modules

---
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #23370 (GitHub issue number if applicable)
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23545)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

βŒ› Trying commit e027b98 with merge b9b7838...

@jdm jdm added the S-awaiting-review There is new code that needs to be reviewed. label Jun 10, 2019
@bors-servo
Copy link
Contributor

πŸ’” Test failed - linux-rel-wpt

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Jun 10, 2019
@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Jun 10, 2019
@CYBAI
Copy link
Member Author

CYBAI commented Jun 10, 2019

@bors-servo try=wpt

  • sad, I forgot to mark some variable as unused πŸ˜‚

@bors-servo
Copy link
Contributor

βŒ› Trying commit 5d7de70 with merge 925aa09...

bors-servo pushed a commit that referenced this pull request Jun 10, 2019
[WIP] Support type=module script element

This is still WIP but hope can be reviewed first to see if I'm on the right track. Thanks! πŸ™‡β€β™‚οΈ

- [x] Support external module script
- [ ] Support internal module script
- [ ] Compile cyclic modules

---
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #23370 (GitHub issue number if applicable)
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23545)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

πŸ’” Test failed - linux-rel-wpt

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Jun 10, 2019
text: DOMString,
url: ServoUrl,
external: bool,
type_: ScriptType,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type_: ScriptType,
r#type: ScriptType,

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively,

Suggested change
type_: ScriptType,
script_type: ScriptType,

whichever makes the most sense.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also name it ScriptKind instead of ScriptType.

@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Jun 11, 2019
@CYBAI
Copy link
Member Author

CYBAI commented Jun 11, 2019

@bors-servo try=wpt

@bors-servo
Copy link
Contributor

βŒ› Trying commit 7371b4f with merge 061df76...

bors-servo pushed a commit that referenced this pull request Jun 11, 2019
[WIP] Support type=module script element

This is still WIP but hope can be reviewed first to see if I'm on the right track. Thanks! πŸ™‡β€β™‚οΈ

- [x] Support external module script
- [ ] Support internal module script
- [ ] Compile cyclic modules

---
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #23370 (GitHub issue number if applicable)
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23545)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

πŸ’” Test failed - linux-rel-css

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Jun 11, 2019
@jdm
Copy link
Member

jdm commented Jun 11, 2019

You will want to modify https://github.com/servo/servo/blob/master/tests/wpt/include.ini#L94.

@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Jun 11, 2019
@CYBAI
Copy link
Member Author

CYBAI commented Jun 11, 2019

You will want to modify https://github.com/servo/servo/blob/master/tests/wpt/include.ini#L94.

Thanks! Didn't notice that πŸ˜‚

@CYBAI
Copy link
Member Author

CYBAI commented Jun 11, 2019

@bors-servo try=wpt

  • Let me know current status!

@bors-servo
Copy link
Contributor

βŒ› Trying commit 4b234fb with merge c67bdbb...

bors-servo pushed a commit that referenced this pull request Jun 11, 2019
[WIP] Support type=module script element

This is still WIP but hope can be reviewed first to see if I'm on the right track. Thanks! πŸ™‡β€β™‚οΈ

- [x] Support external module script
- [ ] Support internal module script
- [ ] Compile cyclic modules

---
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #23370 (GitHub issue number if applicable)
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23545)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

πŸ’” Test failed - linux-rel-css

@Manishearth
Copy link
Member

@bors-servo retry try

@bors-servo
Copy link
Contributor

βŒ› Trying commit 508bfbd with merge 79bddab...

bors-servo pushed a commit that referenced this pull request Jan 6, 2020
Support type=module script element

This is still WIP but hope can be reviewed first to see if I'm on the right track. Thanks! πŸ™‡β€β™‚οΈ

- [x] Support external module script
- [x] Support internal module script
- [x] Compile cyclic modules

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23370 (GitHub issue number if applicable)
- [x] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23545)
<!-- Reviewable:end -->
@Manishearth
Copy link
Member

To keep them in one place, the latest failure is:

0 matches
1 unexpected results that are NOT known-intermittents:
  β–Ά Unexpected subtest result in /2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html:
  β”‚ FAIL [expected PASS] Canvas test: 2d.pattern.paint.repeat.coord2
  β”‚   β†’ assert_equals: Green channel of the pixel at (98, 1) expected 255 but got 0
  β”‚ 
  β”‚ _assertPixel@http://web-platform.test:8000/2dcontext/resources/canvas-tests.js:39:5
  β”‚ @http://web-platform.test:8000/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html:28:1
  β”‚ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1984:25
  β”‚ _addTest/</<@http://web-platform.test:8000/2dcontext/resources/canvas-tests.js:66:15
  β”‚ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1984:25
  β”” _addTest/<@http://web-platform.test:8000/2dcontext/resources/canvas-tests.js:63:11

Previous

1 unexpected results that are NOT known-intermittents:
  β–Ά FAIL [expected PASS] /css/CSS2/borders/border-bottom-color-125.xht
  β”‚   β†’ /css/CSS2/borders/border-bottom-color-125.xht 54a9df64f1476dd12020019d7cf22ac34d727bc0
  β”‚   β†’ /css/CSS2/borders/border-bottom-color-021-ref.xht c1172dc374baf74f22c8e9293ef0eba38535a1a6
  β””   β†’ Screenshot is solid color 0xFFFFFF for /css/CSS2/borders/border-bottom-color-125.xht

Previous

A bunch of timeouts:

  β”‚ 
  β”‚ 
  β”” 
  β–Ά TIMEOUT [expected OK] /referrer-policy/gen/top.meta/origin-when-cross-origin/iframe-tag/cross-https.no-redirect.http.html
  β”‚ 
  β”‚ 
  β”‚ 
  β”” 
  β–Ά TIMEOUT [expected OK] /_webgl/conformance/attribs/gl-vertex-attrib-unconsumed-out-of-bounds.html
  β”‚ 
  β”‚ 
  β”‚ 
  β”” 
  β–Ά TIMEOUT [expected OK] /_webgl/conformance/canvas/buffer-offscreen-test.html
  β”‚ 
  β”‚ 
  β”‚ 
  β”” 
  β–Ά TIMEOUT [expected OK] /referrer-policy/gen/req.attr/no-referrer-when-downgrade/a-tag/same-https.no-redirect.http.html
  β”‚ 
  β”‚ 
  β”‚ 
  β”” 
  β–Ά TIMEOUT [expected OK] /css/css-transitions/properties-value-002.html
  β”‚ 
  β”‚ 
  β”‚ 
  β”” 

Two color failures:

1 unexpected results that are NOT known-intermittents:
  β–Ά FAIL [expected PASS] /css/CSS2/borders/border-right-color-044.xht
  β”‚   β†’ /css/CSS2/borders/border-right-color-044.xht 54a9df64f1476dd12020019d7cf22ac34d727bc0
  β”‚   β†’ /css/CSS2/borders/border-right-color-044-ref.xht c695436d4585f381461a01ecc5a8eb6d49f92294
  β””   β†’ Screenshot is solid color 0xFFFFFF for /css/CSS2/borders/border-right-color-044.xht

1 unexpected results that are NOT known-intermittents:
  β–Ά FAIL [expected PASS] /css/compositing/mix-blend-mode/mix-blend-mode-mask.html
  β”‚   β†’ /css/compositing/mix-blend-mode/mix-blend-mode-mask.html 501a5dfb1fe6e3216f11f8a408f37ffac3e81d32
  β”‚   β†’ /css/compositing/mix-blend-mode/reference/mix-blend-mode-mask-ref.html 54a9df64f1476dd12020019d7cf22ac34d727bc0
  β””   β†’ Screenshot is solid color 0xFFFFFF for /css/compositing/mix-blend-mode/reference/mix-blend-mode-mask-ref.html

@CYBAI
Copy link
Member Author

CYBAI commented Jan 6, 2020

IIRC, a bunch of timeouts might be #24762 πŸ‘€?

@Manishearth
Copy link
Member

Manishearth commented Jan 6, 2020 via email

@bors-servo
Copy link
Contributor

β˜€οΈ Test successful - status-taskcluster
State: approved= try=True

@Manishearth
Copy link
Member

wow, rude, @bors-servo

@Manishearth
Copy link
Member

@bors-servo r=jdm,manishearth try- retry

@bors-servo
Copy link
Contributor

πŸ“Œ Commit 508bfbd has been approved by jdm,manishearth

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Jan 6, 2020
@bors-servo
Copy link
Contributor

βŒ› Testing commit 508bfbd with merge 5c7a4db...

bors-servo pushed a commit that referenced this pull request Jan 6, 2020
Support type=module script element

This is still WIP but hope can be reviewed first to see if I'm on the right track. Thanks! πŸ™‡β€β™‚οΈ

- [x] Support external module script
- [x] Support internal module script
- [x] Compile cyclic modules

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23370 (GitHub issue number if applicable)
- [x] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23545)
<!-- Reviewable:end -->
@Manishearth
Copy link
Member

Color failures are #24726

@bors-servo
Copy link
Contributor

β˜€οΈ Test successful - status-taskcluster
Approved by: jdm,manishearth
Pushing 5c7a4db to master...

@bors-servo bors-servo merged commit 508bfbd into servo:master Jan 6, 2020
hello-webxr automation moved this from In progress to Done Jan 6, 2020
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jan 6, 2020
@bors-servo bors-servo mentioned this pull request Jan 6, 2020
4 tasks
@CYBAI CYBAI deleted the support-module-script branch January 6, 2020 15:38
@jdm jdm mentioned this pull request Jan 6, 2020
@atouchet atouchet moved this from In progress to Done in A-Frame support Feb 23, 2020
@atouchet atouchet moved this from In progress to Done in HoloLens Feb 23, 2020
CYBAI added a commit to CYBAI/servo that referenced this pull request May 27, 2020
I misunderstood the test case when I worked on servo#23545. That test case is
actually not related to dynamic import; instead, the reason why it
crashes is, `currentScript` should be updated to `null`.
bors-servo added a commit that referenced this pull request May 27, 2020
Set `currentScript` to `null` for module scripts

I misunderstood the test case when I worked on #23545. That test case is
actually not related to dynamic import; instead, the reason why it
crashes is, `currentScript` should be updated to `null`.

In spec, the step 6 of [execute-the-script-block](https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block) only says `Assert: document's currentScript attribute is null.` but doesn't says it should be set to null. Not sure if it can be improved.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
skrzyp1 pushed a commit to skrzyp1/servo that referenced this pull request Jun 2, 2020
I misunderstood the test case when I worked on servo#23545. That test case is
actually not related to dynamic import; instead, the reason why it
crashes is, `currentScript` should be updated to `null`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
hello-webxr
  
Done
HoloLens
  
Done
Development

Successfully merging this pull request may close these issues.

Support type=module script element
7 participants