Skip to content
Snippets Groups Projects
Commit 7431fa98 authored by Craig Tiller's avatar Craig Tiller
Browse files

Preserve proto order

parent b05561fa
No related branches found
No related tags found
No related merge requests found
...@@ -420,9 +420,9 @@ ...@@ -420,9 +420,9 @@
"build": "private", "build": "private",
"language": "c++", "language": "c++",
"src": [ "src": [
"test/cpp/util/messages.proto",
"test/cpp/util/echo.proto", "test/cpp/util/echo.proto",
"test/cpp/util/echo_duplicate.proto", "test/cpp/util/echo_duplicate.proto",
"test/cpp/util/messages.proto",
"test/cpp/end2end/async_test_server.cc", "test/cpp/end2end/async_test_server.cc",
"test/cpp/util/create_test_channel.cc" "test/cpp/util/create_test_channel.cc"
] ]
...@@ -432,8 +432,8 @@ ...@@ -432,8 +432,8 @@
"build": "private", "build": "private",
"language": "c++", "language": "c++",
"src": [ "src": [
"examples/tips/empty.proto",
"examples/tips/label.proto", "examples/tips/label.proto",
"examples/tips/empty.proto",
"examples/tips/pubsub.proto", "examples/tips/pubsub.proto",
"examples/tips/client.cc" "examples/tips/client.cc"
], ],
......
...@@ -33,9 +33,9 @@ def clean_elem(indict): ...@@ -33,9 +33,9 @@ def clean_elem(indict):
for name in ['public_headers', 'headers', 'src']: for name in ['public_headers', 'headers', 'src']:
if name not in indict: continue if name not in indict: continue
inlist = indict[name] inlist = indict[name]
protos = set(x for x in inlist if os.path.splitext(x)[1] == '.proto') protos = list(x for x in inlist if os.path.splitext(x)[1] == '.proto')
others = set(x for x in inlist if x not in protos) others = set(x for x in inlist if x not in protos)
indict[name] = sorted(protos) + sorted(others) indict[name] = protos + sorted(others)
return rebuild_as_ordered_dict(indict, _ELEM_KEYS) return rebuild_as_ordered_dict(indict, _ELEM_KEYS)
for filename in sys.argv[1:]: for filename in sys.argv[1:]:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment