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

Enable ADVANCED_OPTIMIZATIONS in Closure Compiler #422

Merged
merged 1 commit into from
Jan 9, 2019

Conversation

jjbubudi
Copy link
Contributor

@jjbubudi jjbubudi commented Dec 27, 2018

Fixes #270

Npm package size went from 217.4KB to 23.3KB (uncompressed) / 9.3KB (gzipped)

@jjbubudi jjbubudi changed the title Enable ADVANCED_OPTIMIZATIONS in Closure Compiler [WIP] Enable ADVANCED_OPTIMIZATIONS in Closure Compiler Dec 27, 2018
@jjbubudi jjbubudi changed the title [WIP] Enable ADVANCED_OPTIMIZATIONS in Closure Compiler Enable ADVANCED_OPTIMIZATIONS in Closure Compiler Dec 28, 2018
@stanley-cheung
Copy link
Collaborator

@jjbubudi Can you please rebase this PR so that we can run the test suite? Thanks

@jjbubudi
Copy link
Contributor Author

jjbubudi commented Jan 8, 2019

@stanley-cheung Rebased. Please proceed.

@stanley-cheung
Copy link
Collaborator

@jjbubudi There are some test failure. Please take a look. Thanks!

ERROR: /tmpfs/src/github/grpc-web/javascript/net/grpc/web/BUILD.bazel:124:1: Compiling 286 JavaScript files to javascript/net/grpc/web/grpcwebclientbase_test_bin.js failed (Exit 1)
javascript/net/grpc/web/abstractclientbase.js:55: ERROR - @export only applies to symbols/properties defined in the global scope.
  this.responseType = responseType;
  ^
  ProTip: "JSC_NON_GLOBAL_ERROR" can be added to the `suppress` attribute of:
  //javascript/net/grpc/web:abstractclientbase

javascript/net/grpc/web/abstractclientbase.js:57: ERROR - @export only applies to symbols/properties defined in the global scope.
  this.requestSerializeFn = requestSerializeFn;
  ^
  ProTip: "JSC_NON_GLOBAL_ERROR" can be added to the `suppress` attribute of:
  //javascript/net/grpc/web:abstractclientbase

javascript/net/grpc/web/abstractclientbase.js:59: ERROR - @export only applies to symbols/properties defined in the global scope.
  this.responseDeserializeFn = responseDeserializeFn;
  ^
  ProTip: "JSC_NON_GLOBAL_ERROR" can be added to the `suppress` attribute of:
  //javascript/net/grpc/web:abstractclientbase

3 error(s), 0 warning(s), 97.3% typed

INFO: Elapsed time: 91.585s, Critical Path: 56.53s, Remote (0.00% of the time): [queue: 0.00%, setup: 0.00%, process: 0.00%]
INFO: 695 processes: 394 linux-sandbox, 301 worker.
FAILED: Build did NOT complete successfully

@jjbubudi
Copy link
Contributor Author

jjbubudi commented Jan 9, 2019

@stanley-cheung Updated and rebased. Now both bazel test and npm test are passing locally.

@pumano
Copy link
Contributor

pumano commented Jan 9, 2019

wow, if it will works, amazing work man @jjbubudi !

Copy link
Collaborator

@stanley-cheung stanley-cheung left a comment

Choose a reason for hiding this comment

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

Thanks for your great contributions!

@stanley-cheung stanley-cheung merged commit bb3624e into grpc:master Jan 9, 2019
@jjbubudi jjbubudi deleted the bundle-optimization branch January 10, 2019 10:11
@mrzacarias
Copy link

@stanley-cheung Hi Stanley, when we'll have a release (1.0.4?) with this on?

stanley-cheung added a commit to stanley-cheung/grpc-web that referenced this pull request Feb 21, 2019
stanley-cheung added a commit to stanley-cheung/grpc-web that referenced this pull request Feb 21, 2019
loyalpartner pushed a commit to loyalpartner/grpc-web that referenced this pull request Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reduce compiled JS file size
5 participants