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.
@acozzette acozzette added release notes: yes c++ kokoro:run labels Feb 11, 2020
@acozzette acozzette self-assigned this Feb 11, 2020
std::cerr << descriptor_set_out_name_ << ": " << strerror(out.GetErrno())
<< std::endl;
out.Close();
return false;
}
coded_out.Trim();
Copy link
Member

@acozzette acozzette Feb 11, 2020

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

@mpartel mpartel Feb 12, 2020

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
54 of 56 checks passed
@acozzette
Copy link
Member

@acozzette acozzette commented Feb 12, 2020

Thanks, @mpartel!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ cla: yes release notes: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants