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

Remove empty, top-level, nodes in the Babel plugin #17647

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

Snuffleupagus
Copy link
Collaborator

Looking at the built files you'll notice some lines containing nothing more than a semicolon. This is the result of (mostly top-level) if-statements, which include PDFJSDev-checks, that evalute to false during Babel parsing.

This has always annoyed me a bit, and looking at Babel plugin it seems that we can fix this simply by removing the relevant nodes.

Looking at the *built* files you'll notice some lines containing nothing more than a semicolon. This is the result of (mostly top-level) `if`-statements, which include `PDFJSDev`-checks, that evalute to `false` during Babel parsing.

This has always annoyed me a bit, and looking at Babel plugin it seems that we can fix this simply by *removing* the relevant nodes.
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/acd47838a20be39/output.txt

external/builder/fixtures_esprima/ifs.js Dismissed Show dismissed Hide dismissed
external/builder/fixtures_esprima/ifs.js Dismissed Show dismissed Hide dismissed
external/builder/fixtures_esprima/ifs-expected.js Dismissed Show dismissed Hide dismissed
external/builder/fixtures_esprima/ifs.js Dismissed Show dismissed Hide dismissed
external/builder/fixtures_esprima/ifs-expected.js Dismissed Show dismissed Hide dismissed
external/builder/fixtures_esprima/ifs.js Dismissed Show dismissed Hide dismissed
@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/acd47838a20be39/output.txt

Total script time: 1.21 mins

Published

@Snuffleupagus
Copy link
Collaborator Author

/botio test

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/424c37e1af13623/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/6ab443584d36817/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/424c37e1af13623/output.txt

Total script time: 24.82 mins

  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 11
  different first/second rendering: 1

Image differences available at: http://54.241.84.105:8877/424c37e1af13623/reftest-analyzer.html#web=eq.log

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/6ab443584d36817/output.txt

Total script time: 39.19 mins

  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 2

Image differences available at: http://54.193.163.58:8877/6ab443584d36817/reftest-analyzer.html#web=eq.log

@nicolo-ribaudo
Copy link
Contributor

Hey don't feel blocked on me in any way, but just fyi I plan to review these Babel-related PRs by Monday.

Copy link
Contributor

@timvandermeij timvandermeij left a comment

Choose a reason for hiding this comment

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

Looks good to me, but let's await @nicolo-ribaudo's review as well before merging this. Thanks!

@Snuffleupagus Snuffleupagus merged commit d742daf into mozilla:master Feb 12, 2024
7 checks passed
@Snuffleupagus Snuffleupagus deleted the babel-rm-empty-nodes branch February 12, 2024 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants