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

Update the Babel plugin to remove empty class constructors #18060

Merged
merged 2 commits into from
May 14, 2024

Conversation

nicolo-ribaudo
Copy link
Contributor

Rename builder esprima fixtures to babel

f724ae9 changed the build
script to use Babel, so this commit updates the file names accordingly

Update the Babel plugin to remove empty class constructors

This only happens when it's safe to do so. The exceptions are:

  • when the class extends another subclass: removing the constructor would remove the error about the missing super() call
  • when there are default parameters, that could have side effects
  • when there are destructured prameters, that could have side effects

Fixes #18057

f724ae9 changed the build
script to use Babel, so this commit updates the file names accordingly
This only happens when it's safe to do so. The exceptions are:
- when the class extends another subclass: removing the constructor would remove the error about the missing super() call
- when there are default parameters, that could have side effects
- when there are destructured prameters, that could have side effects
external/builder/fixtures_babel/constructors.js Dismissed Show dismissed Hide dismissed
external/builder/fixtures_babel/constructors.js Dismissed Show dismissed Hide dismissed
external/builder/fixtures_babel/constructors.js Dismissed Show dismissed Hide dismissed
external/builder/fixtures_babel/constructors.js Dismissed Show dismissed Hide dismissed
external/builder/fixtures_babel/constructors.js Dismissed Show dismissed Hide dismissed
external/builder/fixtures_babel/constructors-expected.js Dismissed Show dismissed Hide dismissed
external/builder/fixtures_babel/constructors-expected.js Dismissed Show dismissed Hide dismissed
external/builder/fixtures_babel/constructors-expected.js Dismissed Show dismissed Hide dismissed
external/builder/fixtures_babel/constructors-expected.js Dismissed Show dismissed Hide dismissed
external/builder/fixtures_babel/constructors-expected.js Dismissed Show dismissed Hide dismissed
@Snuffleupagus
Copy link
Collaborator

/botio test

@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/35e361ea1c727c3/output.txt

@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/c73cb7fa3ebb1b6/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

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

Total script time: 27.63 mins

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

Image differences available at: http://54.241.84.105:8877/c73cb7fa3ebb1b6/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/35e361ea1c727c3/output.txt

Total script time: 42.58 mins

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

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

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

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

r=me, thank you!

@Snuffleupagus Snuffleupagus merged commit 36a496b into mozilla:master May 14, 2024
9 checks passed
@nicolo-ribaudo nicolo-ribaudo deleted the babel-plugin-class branch May 14, 2024 12: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.

Update the Babel plugin to remove empty class constructors
4 participants