Skip to content

proto: fix and cleanup test for deterministic marshal with custom marshalers #656

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

Merged
merged 1 commit into from
Jul 20, 2018

Conversation

dsnet
Copy link
Member

@dsnet dsnet commented Jul 20, 2018

PR #650 added a check to error out when a custom marshaler was called and
deterministic marshaling was also specified.

That change performed the check in a relatively obscure location that did not
catch all code paths. Since determinism can only be enabled on the Buffer type,
we check it up front in Buffer.Marshal.

Also, change the test to avoid code injection into generated sources.

@dsnet dsnet requested a review from neild July 20, 2018 23:07
Copy link
Contributor

@neild neild left a comment

Choose a reason for hiding this comment

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

Need to regenerate some golden test files, looks like.

…shalers

PR #650 added a check to error out when a custom marshaler was called and
deterministic marshaling was also specified.

That change performed the check in a relatively obscure location that did not
catch all code paths. Since determinism can only be enabled on the Buffer type,
we check it up front in Buffer.Marshal.

Also, change the test to avoid code injection into generated sources.
@dsnet dsnet force-pushed the cleanup-deterministic-test branch from 946c600 to 5f14bde Compare July 20, 2018 23:21
@dsnet
Copy link
Member Author

dsnet commented Jul 20, 2018

Done.

@dsnet dsnet merged commit 427e165 into master Jul 20, 2018
@dsnet dsnet deleted the cleanup-deterministic-test branch July 20, 2018 23:31
@golang golang locked and limited conversation to collaborators Jun 26, 2020
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.

2 participants