Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deterministic protoc --descriptor_set_out #7175

Merged
merged 2 commits into from
Feb 12, 2020
Merged

Deterministic protoc --descriptor_set_out #7175

merged 2 commits into from
Feb 12, 2020

Conversation

mpartel
Copy link
Contributor

@mpartel mpartel commented Feb 5, 2020

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.
std::cerr << descriptor_set_out_name_ << ": " << strerror(out.GetErrno())
<< std::endl;
out.Close();
return false;
}
coded_out.Trim();
Copy link
Member

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
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
Member

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