Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
flatbuffers
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
flatbuffers
Commits
2265129e
Commit
2265129e
authored
Jan 18, 2018
by
Wouter van Oortmerssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed date/time from generated code, causing commit polution.
Change-Id: I79724416110a3d2241d7eeecf0e12aa6d5b760a0
parent
4bddc6cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
java_generator.cc
grpc/src/compiler/java_generator.cc
+5
-6
MonsterStorageGrpc.java
tests/MyGame/Example/MonsterStorageGrpc.java
+1
-1
No files found.
grpc/src/compiler/java_generator.cc
View file @
2265129e
...
...
@@ -55,8 +55,7 @@ void GenerateImports(grpc_generator::File* file,
vars
[
"filename"
]
=
file
->
filename
();
printer
->
Print
(
vars
,
"//Generated by flatc compiler (version $flatc_version$) on "
__DATE__
" "
__TIME__
"
\n
"
);
"//Generated by flatc compiler (version $flatc_version$)
\n
"
);
printer
->
Print
(
"//If you make any local changes, they will be lost
\n
"
);
printer
->
Print
(
vars
,
"//source: $filename$.fbs
\n\n
"
);
printer
->
Print
(
vars
,
"package $Package$;
\n\n
"
);
...
...
@@ -337,12 +336,12 @@ static void PrintMethodFields(Printer* p, VARS& vars,
const
ServiceDescriptor
*
service
)
{
p
->
Print
(
"// Static method descriptors that strictly reflect the proto.
\n
"
);
vars
[
"service_name"
]
=
service
->
name
();
//set of names of rpc input- and output- types that were already encountered.
//this is needed to avoid duplicating type extractor since it's possible that
//the same type is used as an input or output type of more than a single RPC method
std
::
set
<
std
::
string
>
encounteredTypes
;
for
(
int
i
=
0
;
i
<
service
->
method_count
();
++
i
)
{
auto
method
=
service
->
method
(
i
);
vars
[
"arg_in_id"
]
=
to_string
((
long
)
2
*
i
);
//trying to make msvc 10 happy
...
...
@@ -382,7 +381,7 @@ static void PrintMethodFields(Printer* p, VARS& vars,
"private static volatile $MethodDescriptor$<$input_type$,
\n
"
" $output_type$> $method_new_field_name$;
\n
"
"
\n
"
);
if
(
encounteredTypes
.
insert
(
vars
[
"input_type_name"
]).
second
)
{
vars
[
"extr_type"
]
=
vars
[
"input_type"
];
vars
[
"extr_type_name"
]
=
vars
[
"input_type_name"
];
...
...
@@ -394,7 +393,7 @@ static void PrintMethodFields(Printer* p, VARS& vars,
vars
[
"extr_type_name"
]
=
vars
[
"output_type_name"
];
PrintTypeExtractor
(
p
,
vars
);
}
p
->
Print
(
vars
,
"@$ExperimentalApi$(
\"
https://github.com/grpc/grpc-java/issues/"
...
...
tests/MyGame/Example/MonsterStorageGrpc.java
View file @
2265129e
//Generated by flatc compiler (version 1.8.0)
on Dec 28 2017 10:07:47
//Generated by flatc compiler (version 1.8.0)
//If you make any local changes, they will be lost
//source: monster_test.fbs
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment