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

Fix a typo in code that adapts/re-parses features to match a descriptor #305

Merged
merged 2 commits into from
May 10, 2024

Conversation

jhump
Copy link
Member

@jhump jhump commented May 10, 2024

I'm still trying to figure out how to formulate a test that can catch this (since this code path was clearly not covered by existing tests 🤦).

@jhump jhump requested a review from emcfarlane May 10, 2024 16:43
@jhump
Copy link
Member Author

jhump commented May 10, 2024

@emcfarlane, in case you want to take another quick look: I figured out a way to exercise this code path and repro the issue. In the tests for the exported protoutil.ResolveCustomFeature, we now try twice, the second time with all unrecognized fields. That then triggers the bad codepath to attempt to unmarshal the unrecognized bytes, in order to recognize the specified custom feature.

@jhump jhump merged commit 752249d into main May 10, 2024
8 checks passed
@jhump jhump deleted the jh/oops-fix-typo-in-editions branch May 10, 2024 20:18
@emcfarlane
Copy link
Contributor

Nice!

kralicky pushed a commit to kralicky/protocompile that referenced this pull request May 19, 2024
kralicky pushed a commit to kralicky/protocompile that referenced this pull request Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants