Comments (3)
What level of breaking change detection do you have configured? Here are the options: https://buf.build/docs/breaking/rules
The default is FILE level, which will report breaking in this case because removing a field from generated code will break source code that is referencing this field in the generated code.
If you only care about WIRE compatibility, you can use that mode, but generally we recommend sticking with FILE (which is why it is the default).
from buf.
We are using the PACKAGE
option because the FILE
one was too noisy. I am not sure I understand why it triggers, I mean this change should be fine no? If you are recommending sticking with FILE
, then what is the recommended way to deprecate a field without triggering a failure?
from buf.
You'll want to review the meaning of the different breaking categories: FILE, PACKAGE, WIRE_JSON, WIRE
at https://buf.build/docs/breaking/rules#categories.
Deleting a field is a source-code breaking change, regardless of if it is reserved - the generated code that results from your Protobuf APIs will have code deleted that users may depend on. The goal of the FILE
and PACKAGE
categories is to prevent you from breaking source code. Conversely, the WIRE_JSON
and WIRE
categories are all about wire-compatible breaking changes. If either of these categories was specified, then the FIELD_NO_DELETE
rule is replaced with FIELD_NO_DELETE_UNLESS_NUMBER_RESERVED
(and FIELD_NO_DELETE_UNLESS_NAME_RESERVED
for WIRE_JSON
).
If you'd like to allow source-code breaking changes (such as deleting fields), but enforce that there are no wire-compatible changes, change your category to WIRE
if you only care about binary compatibility, or WIRE_JSON
if you also care about JSON compatibility.
from buf.
Related Issues (20)
- mod update panics when dependencies are from multiple registries HOT 1
- Failure: 403 Forbidden HOT 4
- `buf generate` does not use correct `buf.lock` when using `--config` with `git` source HOT 2
- Generate implicit dependencies HOT 4
- unknown extension grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema HOT 2
- WARN bufimagebuild File imports not found in your local dependencies HOT 4
- Fails to install on BSDs HOT 1
- Field plugin not found in type bufgen.ExternalPluginConfigV1 HOT 1
- Stubs are stored under the initial path where proto files can be found HOT 2
- Clarification on RPC and Request/Response Names HOT 2
- Error installing buf via go install HOT 1
- buf generate does not appear to respect buf.yaml excludes rules HOT 7
- `ignore`/`build.excludes` with glob/regex/pattern HOT 1
- language_version not specified in .pre-commit-hooks.yaml HOT 3
- buf generate get an error HOT 1
- Error with buf build on bazel external dependency HOT 4
- lint: Excluding a rule doesn't seem to work HOT 4
- Unable to use buf without bsr HOT 2
- Issues with protovalidate when linting a proto file with repeated fields and protovalidate constraints HOT 2
- Resource locking serializes concurrent buf executions? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from buf.