Skip to content
This repository was archived by the owner on Jul 13, 2025. It is now read-only.

Sort the Protofiles to have deterministic order in surface#2453

Merged
andreamlin merged 8 commits intogoogleapis:masterfrom
andreamlin:sort_protofiles
Nov 29, 2018
Merged

Sort the Protofiles to have deterministic order in surface#2453
andreamlin merged 8 commits intogoogleapis:masterfrom
andreamlin:sort_protofiles

Conversation

@andreamlin
Copy link
Copy Markdown
Contributor

@andreamlin andreamlin commented Nov 26, 2018

One approach to fix #2319.

Order the enum messages (classes) by name, and then order the enums inside those messages by name.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Nov 26, 2018

Codecov Report

Merging #2453 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2453      +/-   ##
============================================
+ Coverage     86.54%   86.56%   +0.01%     
  Complexity     5291     5291              
============================================
  Files           458      458              
  Lines         21079    21065      -14     
  Branches       2300     2297       -3     
============================================
- Hits          18243    18234       -9     
+ Misses         2012     2007       -5     
  Partials        824      824
Impacted Files Coverage Δ Complexity Δ
.../google/api/codegen/viewmodel/GrpcEnumDocView.java 100% <ø> (ø) 3 <0> (ø) ⬇️
...ogle/api/codegen/viewmodel/GrpcMessageDocView.java 100% <ø> (ø) 3 <0> (ø) ⬇️
.../transformer/py/PythonGapicSurfaceTransformer.java 99.57% <100%> (+1.27%) 43 <2> (ø) ⬇️
...codegen/transformer/GrpcElementDocTransformer.java 100% <100%> (ø) 12 <3> (ø) ⬇️
...transformer/py/PythonImportSectionTransformer.java 98.44% <100%> (ø) 69 <0> (ø) ⬇️
.../google/api/codegen/config/GapicProductConfig.java 72.83% <100%> (+0.07%) 53 <0> (ø) ⬇️
...a/com/google/api/codegen/config/ProtoApiModel.java 93.02% <100%> (+0.91%) 19 <2> (+2) ⬆️
...ansformer/csharp/CSharpModelTypeNameConverter.java 94.03% <0%> (+0.54%) 34% <0%> (-2%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64c0aee...810c1ce. Read the comment docs.

@andreamlin
Copy link
Copy Markdown
Contributor Author

Waiting for #2443 to get merged so we can test all artman targets.

@andreamlin
Copy link
Copy Markdown
Contributor Author

still need to regen some python clients to test this out

@andreamlin andreamlin changed the title Sort the Protofiles to have deterministic order in surface Sort the Protofiles to have deterministic order in surface (WIP) Nov 28, 2018
@andreamlin andreamlin changed the title Sort the Protofiles to have deterministic order in surface (WIP) Sort the Protofiles to have deterministic order in surface Nov 29, 2018
@andreamlin
Copy link
Copy Markdown
Contributor Author

See googleapis/google-cloud-python#6707 for what happens when this PR is used to generate logging.

@andreamlin
Copy link
Copy Markdown
Contributor Author

PTAL

@crwilcox crwilcox self-requested a review November 29, 2018 22:47
@crwilcox
Copy link
Copy Markdown

output lgtm

@andreamlin andreamlin merged commit 4061233 into googleapis:master Nov 29, 2018
@andreamlin andreamlin deleted the sort_protofiles branch November 29, 2018 23:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Order of entries in generated 'enums' is not stable

3 participants