-
Notifications
You must be signed in to change notification settings - Fork 47.5k
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
Use Java version of Google Closure Compiler #12800
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I skimmed over the CircleCI and AppVeyor parts b'c I don't know about them. But overall this looks okay. 😄 Exciting speed and memory gains.
@@ -473,7 +473,7 @@ function handleRollupError(error) { | |||
highlightCode: true, | |||
}); | |||
console.error(frame); | |||
} else { | |||
} else if (error.codeFrame) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add an else
here with something (e.g. "Unknown error")?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already print the error message itself earlier so these are additive.
CircleCI part works (I tested), as for AppVeyor we'll have to see because it only runs on master. |
Should we file a bug with Closure? |
Nah, they're aware JS version is vastly inferior and were actually surprised it was usable to us. 😄 |
This was actually done by @trueadm, I just did a minor cleanup on top while he's away from keyboard.
The JS version of GCC is already too slow, and its memory usage is getting worse as we throw more inlinable code at it. Without this change, we can't land #12792 (7% prod build size reduction) because it eats over 16GB of RAM and never completes. For comparison, the Java version memory use peaks under 300 MB and completes in a few seconds. Luckily it's nicely packaged under a launcher distributed on npm so it's not a pain to integrate.
This change, however, means you can't
yarn build
without Java installed. I can imagine this being annoying for open source contributors. I don't see better options though.