Conversation
emcfarlane
approved these changes
Sep 16, 2026
emcfarlane
left a comment
Contributor
There was a problem hiding this comment.
Makes sense to me, but introducing any field is still going to be a breaking change upto this versions release.
Comment on lines
+11
to
+12
| - Parse v2 `buf.lock` files non-strictly, ignoring unknown fields. A `buf.lock` written by a | ||
| newer `buf` that records additional fields no longer fails to parse on an older `buf`. |
Contributor
There was a problem hiding this comment.
Maybe doens't need a changelog as not user facing.
Member
|
So I think this was intentional behaviour, tbh, to push folks towards updating to later CLI versions when the lock file updates. I'm not sure we want to change that behaviour right now... |
Contributor
Author
|
Thanks for the notes - I think either way either we stick to encouraging CLI update, or we should do the opposite and consider the leniency change breaking and potentially a v3. I think this PR doesn't help with either so will avoid it for now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When looking at #4683 (comment) I noticed buf.lock is parsed strictly, so an older buf would fail to run any command with a newer lock file format. Maybe buf.lock should be managed with a .proto :-)
But anyways as there was no test verifying failure with unknown fields, I feel it's probably unintentional, and being able to additively update the lockfile seems useful. I left v1 unchanged since it seems best to keep that behavior frozen. What do you think?