fix options file; fix generated include guards

pull/6702/head
Alistair Veitch 9 years ago
parent 3e97668d82
commit 44181c02c4
  1. 1
      build.yaml
  2. 4
      src/core/ext/census/gen/census.pb.h
  3. 2
      src/proto/census/census.options
  4. 2
      third_party/protobuf
  5. 7
      tools/codegen/core/gen_nano_proto.sh

@ -34,6 +34,7 @@ filegroups:
plugin: census_grpc_plugin
uses:
- grpc_base
- nanopb
- name: gpr_base
public_headers:
- include/grpc/support/alloc.h

@ -33,8 +33,8 @@
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.5-dev */
#ifndef PB_CENSUS_PB_H_INCLUDED
#define PB_CENSUS_PB_H_INCLUDED
#ifndef GRPC_CORE_EXT_CENSUS_GEN_CENSUS_PB_H
#define GRPC_CORE_EXT_CENSUS_GEN_CENSUS_PB_H
#include "third_party/nanopb/pb.h"
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.

@ -1,3 +1,3 @@
google.census.Tag.key max_size:255
google.census.Tag.value max_size:255
google.census.View.tag_keys max_count 15
google.census.View.tag_key max_count:15

@ -1 +1 @@
Subproject commit 3470b6895aa659b7559ed678e029a5338e535f14
Subproject commit a1938b2aa9ca86ce7ce50c27ff9737c1008d2a03

@ -136,6 +136,13 @@ readonly PROTO_BASENAME=$(basename $INPUT_PROTO .proto)
sed -i "s:$PROTO_BASENAME.pb.h:${GRPC_OUTPUT_DIR}/$PROTO_BASENAME.pb.h:g" \
"$OUTPUT_DIR/$PROTO_BASENAME.pb.c"
# Fix up the include guards such that they pass the check_include_guards.py
# test. Assumes that the generated files are being placed in gRPC src dir.
readonly INCLUDE_GUARD_BASE=`echo $GRPC_OUTPUT_DIR | tr [a-z/] [A-Z_] | sed s:^.*SRC_::`
readonly UC_PROTO_BASENAME=`echo $PROTO_BASENAME | tr [a-z] [A-Z]`
sed -i "s:PB_${UC_PROTO_BASENAME}_PB_H_INCLUDED:GRPC_${INCLUDE_GUARD_BASE}_${UC_PROTO_BASENAME}_PB_H:g" \
"$OUTPUT_DIR/$PROTO_BASENAME.pb.h"
# prepend copyright
TMPFILE=$(mktemp)
cat $COPYRIGHT_FILE "$OUTPUT_DIR/$PROTO_BASENAME.pb.c" > $TMPFILE

Loading…
Cancel
Save