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

Should goog.DEBUG be false for builds distributed via npm? #9

Open
tatethurston opened this issue May 15, 2022 · 2 comments
Open

Should goog.DEBUG be false for builds distributed via npm? #9

tatethurston opened this issue May 15, 2022 · 2 comments
Labels
help wanted Extra attention is needed packaging & distribution triaged Issue has been triaged

Comments

@tatethurston
Copy link

tatethurston commented May 15, 2022

goog.DEBUG is true in the google-protobuf.js runtime distributed in the npm package. This setting gates the various assertion code in the runtime (goog.asserts.ENABLE_ASSERTS = goog.DEBUG;).

  1. Is this expected?
  2. If so, should DEBUG be set to false for production builds? And should two builds be distributed, or a means be exposed to configure this?
  3. If not, should the gulpfile that generates the runtime supply --define goog.DEBUG=false to the closure compiler invocation?
@dibenede dibenede added help wanted Extra attention is needed packaging & distribution triaged Issue has been triaged labels Aug 12, 2022
@dibenede
Copy link
Contributor

Good question. Internally, we are use to people deliberately disabling debug mode when moving to production. It's unclear what the best approach is for public distribution.

@lukesandberg
Copy link
Contributor

i think this is a case where we would need a new API

it would be reasonable to expect some customers to want to run with asserts and debug code disabled, but due to our releasing a bundled version of closure library this isn't possible.

consider angulars enableProdMode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed packaging & distribution triaged Issue has been triaged
Projects
None yet
Development

No branches or pull requests

3 participants