buf: Changing an enum field to an identical type is considered breaking WIRE change
Before:
message Bar {
enum Foo {
FOO_UNSPECIFIED = 0;
FOO_A = 1;
}
Foo field = 1;
}
After:
enum Foo {
FOO_UNSPECIFIED = 0;
FOO_A = 1;
}
message Bar {
Foo field = 1;
}
This is currently detected as a breaking change with a message like:
Field "1" on message "Bar" changed type from "Bar.Foo" to "Foo".
This is not actually a breaking change in the wire format as the enum values are the same even if the type has changed name.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (9 by maintainers)
This is done in #400 and will go out in the next release.
Hmmm… this would definitely need to be something that is configurable because all things that were mentioned here are breaking changes for the generated code. Switching from
i32toi64would for instance translate toIntandLongin Kotlin ori32andi64in Rust, while being compatible, the code in question breaks if we are not going to regenerate, update all usages, and release. Otherwise9223372036854775807will overflow and end up as-1.Yea I think we’re gonna close this one for now, but if it comes up again we’ll revisit. Thanks for the input though, appreciate it.