protocolbuffers / protocolbuffers/protobuf-javascript

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

Open
#9 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted packaging & distribution triaged
Dominant language
JavaScript
Stars
471
Forks
91
Avg merge
3h 57m
Merged PRs (30d)
2

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read closure/goog/base.js at lines 224-230 and inspect the gulpfile's Closure Compiler invocation. Compare the generated google-protobuf.js runtime in the npm package with the intended production behavior, then determine whether the build should change, expose configuration, or distribute multiple builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.