Skip to content

Deterministic protoc --descriptor_set_out - #7175

Merged
acozzette merged 2 commits into
protocolbuffers:masterfrom
mpartel:deterministic-descriptor_set_out
Feb 12, 2020
Merged

acozzette merged 2 commits into
protocolbuffers:masterfrom
mpartel:deterministic-descriptor_set_out

Conversation

@mpartel

@mpartel mpartel commented Feb 5, 2020

Copy link
Copy Markdown
Contributor

Repeatable protoc output is useful because it's sometimes checked into version control, and rerunning protoc should not generate unnecessary diffs.

Repeatable protoc output is useful because it's sometimes
checked into version control, and rerunning protoc should
not generate unnecessary diffs.
out.Close();
return false;
}
coded_out.Trim();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually just create the CodedOutputStream inside a block with curly braces: that way the destructor will take care of any cleanup and this Trim() call won't be needed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@acozzette
acozzette merged commit 82a0575 into protocolbuffers:master Feb 12, 2020
@acozzette

Copy link
Copy Markdown
Collaborator

Thanks, @mpartel!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants