Skip to content

Add version flag and version info in generated code - #1231

Merged
sampajano merged 9 commits into
grpc:masterfrom
meling:master
Apr 29, 2022
Merged

Add version flag and version info in generated code#1231
sampajano merged 9 commits into
grpc:masterfrom
meling:master

Conversation

@meling

@meling meling commented Apr 28, 2022

Copy link
Copy Markdown
Contributor

Fixes #1216.

Example output (edited):

"use strict";
/**
 * @fileoverview gRPC-Web generated client stub for ag
 * @enhanceable
 * @public
 */
exports.__esModule = true;
exports.AutograderServiceClient = void 0;
// Code generated by protoc-gen-grpc-web. DO NOT EDIT.
// versions:
//  protoc-gen-grpc-web v1.3.1
//  protoc              v3.19.4
// source: ag/ag.proto
/* eslint-disable */
// @ts-nocheck

Caveat: Needs manual updating of newly added version.h file. The process of deciding the version number is not clear to me, and whether or not it could be automated somehow.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Apr 28, 2022

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

@sampajano sampajano left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@meling Thanks so much for the change!! Much appreciated! :)

(It's totally ok that we have to manually update the version file for now.. probably the best thing that can be done for now :))

Comment thread javascript/net/grpc/web/generator/version.h Outdated
Comment thread javascript/net/grpc/web/generator/grpc_generator.cc Outdated
Comment thread javascript/net/grpc/web/generator/grpc_generator.cc
Comment thread javascript/net/grpc/web/generator/grpc_generator.cc
Comment thread javascript/net/grpc/web/generator/BUILD.bazel Outdated

@sampajano sampajano left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks so much again! LGTM just a few tiny nits and good to merge! :D

Comment thread javascript/net/grpc/web/generator/grpc_generator.cc
Comment thread javascript/net/grpc/web/generator/grpc_generator.cc Outdated
Comment thread javascript/net/grpc/web/generator/grpc_generator.cc Outdated
Comment thread javascript/net/grpc/web/generator/grpc_generator.cc Outdated
@meling

meling commented Apr 29, 2022

Copy link
Copy Markdown
Contributor Author

Note: I added "versioned" comments also for PrintMethodDescriptorFile and PrintGrpcWebClosureES6File for consistency.

PS: Feel free to squash the commits into one for the merge.

@sampajano sampajano left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks so much for your contribution and your patience on the comments! Much appreciated! :)

Comment thread javascript/net/grpc/web/generator/grpc_generator.cc
@sampajano
sampajano merged commit 1779661 into grpc:master Apr 29, 2022
@sampajano

Copy link
Copy Markdown
Collaborator

BTW i've build a few binaries (for all 3 platforms) here:
https://github.com/grpc/grpc-web/actions

In case anyone is interested in downloading them :)

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.

Add version flag and version info in generated code

3 participants