aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-08-30 08:40:00 -0700
committerGravatar GitHub <noreply@github.com>2016-08-30 08:40:00 -0700
commit99091704c11578bfca79d80869c480333058148b (patch)
tree2a1e1f15482927fd2664fe905827c0015e4e7f88
parentd76ea8372809be7928b9b165685ae474b581a1cf (diff)
parentd9f907671d9ea702252615d98547f91d885840aa (diff)
Merge pull request #7912 from ctiller/g_stands_for
Specify the "g" in gRPC
-rw-r--r--build.yaml16
-rw-r--r--doc/g_stands_for.md8
-rw-r--r--grpc.def1
-rw-r--r--include/grpc/grpc.h3
-rw-r--r--src/core/lib/channel/http_client_filter.c5
-rw-r--r--src/core/lib/surface/version.c2
-rw-r--r--src/ruby/ext/grpc/rb_grpc_imports.generated.c2
-rw-r--r--src/ruby/ext/grpc/rb_grpc_imports.generated.h3
-rw-r--r--templates/src/core/lib/surface/version.c.template8
9 files changed, 38 insertions, 10 deletions
diff --git a/build.yaml b/build.yaml
index 484a4be9fb..9b182d2ffc 100644
--- a/build.yaml
+++ b/build.yaml
@@ -2,11 +2,17 @@
'#2': It is used among other things to generate all of our project files.
'#3': Please refer to the templates directory for more information.
settings:
- '#1': The public version number of the library.
- '#2': Master always has a "-dev" suffix
- '#3': Use "-preN" suffixes to identify pre-release versions
- '#4': Per-language overrides are possible with (eg) ruby_version tag here
- '#5': See the expand_version.py for all the quirks here
+ '#01': The public version number of the library.
+ '#02': ===
+ '#03': Please update the 'g_stands_for' field periodically with a new g word
+ '#04': not listed in doc/g_stands_for.md - and update that document to list the
+ '#05': new word.
+ '#06': ===
+ '#07': Master always has a "-dev" suffix
+ '#08': Use "-preN" suffixes to identify pre-release versions
+ '#09': Per-language overrides are possible with (eg) ruby_version tag here
+ '#10': See the expand_version.py for all the quirks here
+ g_stands_for: good
version: 1.1.0-dev
filegroups:
- name: census
diff --git a/doc/g_stands_for.md b/doc/g_stands_for.md
new file mode 100644
index 0000000000..52f8eae05a
--- /dev/null
+++ b/doc/g_stands_for.md
@@ -0,0 +1,8 @@
+Each version of gRPC gets a new description of what the 'g' stands for, since
+we've never really been able to figure it out.
+
+Below is a list of already-used definitions (that should not be repeated in the
+future), and the corresponding version numbers that used them:
+
+- 1.0 'g' stands for 'gRPC'
+- 1.1 'g' stands for 'good'
diff --git a/grpc.def b/grpc.def
index e2255df738..d6ddd33a92 100644
--- a/grpc.def
+++ b/grpc.def
@@ -42,6 +42,7 @@ EXPORTS
grpc_init
grpc_shutdown
grpc_version_string
+ grpc_g_stands_for
grpc_completion_queue_create
grpc_completion_queue_next
grpc_completion_queue_pluck
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h
index 4ca018edb3..587d86c98f 100644
--- a/include/grpc/grpc.h
+++ b/include/grpc/grpc.h
@@ -90,6 +90,9 @@ GRPCAPI void grpc_shutdown(void);
/** Return a string representing the current version of grpc */
GRPCAPI const char *grpc_version_string(void);
+/** Return a string specifying what the 'g' in gRPC stands for */
+GRPCAPI const char *grpc_g_stands_for(void);
+
/** Create a completion queue */
GRPCAPI grpc_completion_queue *grpc_completion_queue_create(void *reserved);
diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c
index a7a775cc53..9e67df8a9c 100644
--- a/src/core/lib/channel/http_client_filter.c
+++ b/src/core/lib/channel/http_client_filter.c
@@ -233,8 +233,9 @@ static grpc_mdstr *user_agent_from_args(const grpc_channel_args *args,
}
}
- gpr_asprintf(&tmp, "%sgrpc-c/%s (%s; %s)", is_first ? "" : " ",
- grpc_version_string(), GPR_PLATFORM_STRING, transport_name);
+ gpr_asprintf(&tmp, "%sgrpc-c/%s (%s; %s; %s)", is_first ? "" : " ",
+ grpc_version_string(), GPR_PLATFORM_STRING, transport_name,
+ grpc_g_stands_for());
is_first = 0;
gpr_strvec_add(&v, tmp);
diff --git a/src/core/lib/surface/version.c b/src/core/lib/surface/version.c
index 1942075054..41242684da 100644
--- a/src/core/lib/surface/version.c
+++ b/src/core/lib/surface/version.c
@@ -37,3 +37,5 @@
#include <grpc/grpc.h>
const char *grpc_version_string(void) { return "1.1.0-dev"; }
+
+const char *grpc_g_stands_for(void) { return "good"; }
diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c
index aee57b11aa..9caaf7b783 100644
--- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c
+++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c
@@ -80,6 +80,7 @@ grpc_register_plugin_type grpc_register_plugin_import;
grpc_init_type grpc_init_import;
grpc_shutdown_type grpc_shutdown_import;
grpc_version_string_type grpc_version_string_import;
+grpc_g_stands_for_type grpc_g_stands_for_import;
grpc_completion_queue_create_type grpc_completion_queue_create_import;
grpc_completion_queue_next_type grpc_completion_queue_next_import;
grpc_completion_queue_pluck_type grpc_completion_queue_pluck_import;
@@ -348,6 +349,7 @@ void grpc_rb_load_imports(HMODULE library) {
grpc_init_import = (grpc_init_type) GetProcAddress(library, "grpc_init");
grpc_shutdown_import = (grpc_shutdown_type) GetProcAddress(library, "grpc_shutdown");
grpc_version_string_import = (grpc_version_string_type) GetProcAddress(library, "grpc_version_string");
+ grpc_g_stands_for_import = (grpc_g_stands_for_type) GetProcAddress(library, "grpc_g_stands_for");
grpc_completion_queue_create_import = (grpc_completion_queue_create_type) GetProcAddress(library, "grpc_completion_queue_create");
grpc_completion_queue_next_import = (grpc_completion_queue_next_type) GetProcAddress(library, "grpc_completion_queue_next");
grpc_completion_queue_pluck_import = (grpc_completion_queue_pluck_type) GetProcAddress(library, "grpc_completion_queue_pluck");
diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h
index 3bb76fbb97..a2f5b86497 100644
--- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h
+++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h
@@ -191,6 +191,9 @@ extern grpc_shutdown_type grpc_shutdown_import;
typedef const char *(*grpc_version_string_type)(void);
extern grpc_version_string_type grpc_version_string_import;
#define grpc_version_string grpc_version_string_import
+typedef const char *(*grpc_g_stands_for_type)(void);
+extern grpc_g_stands_for_type grpc_g_stands_for_import;
+#define grpc_g_stands_for grpc_g_stands_for_import
typedef grpc_completion_queue *(*grpc_completion_queue_create_type)(void *reserved);
extern grpc_completion_queue_create_type grpc_completion_queue_create_import;
#define grpc_completion_queue_create grpc_completion_queue_create_import
diff --git a/templates/src/core/lib/surface/version.c.template b/templates/src/core/lib/surface/version.c.template
index 5f0273e49d..12c490e6a9 100644
--- a/templates/src/core/lib/surface/version.c.template
+++ b/templates/src/core/lib/surface/version.c.template
@@ -32,10 +32,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-
+
/* This file is autogenerated from:
templates/src/core/surface/version.c.template */
-
+
#include <grpc/grpc.h>
-
+
const char *grpc_version_string(void) { return "${settings.core_version}"; }
+
+ const char *grpc_g_stands_for(void) { return "${settings.g_stands_for}"; }