Replace Node.js version header generator with C++ implementation #261
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replaces the Node.js-based generate-version-header.js script with a C++ implementation to eliminate the Node.js runtime dependency from the build process. The new C++ tool reads package.json and generates the same version.h header file.
Also fixes Closure Compiler errors under strict mode in extension_field_binary_info.js and map.js by properly assigning goog.requireType calls to const variables instead of using standalone goog.requireType calls.
Changes:
Context: prefactor for getting protobuf-javascript in the bazel central registry. The goal is for a module consumer to be able to build the generator and consume the .js files. In the current state, the generate-version-header.js script assumes the client has
nodeinstalled non-hermetically. To properly support this would require an additional / unnecessary dependency. As such, replaced it with a C++ version, which works fine and removes the build dependency.Will followup with another PR to add BCR boilerplate. Thanks!