Skip to content

Commit

Permalink
[skip-changelog] Small improvements in Taskfile about protocol buffer…
Browse files Browse the repository at this point in the history
… generation (#2793)

* Do not run protoc tasks in parallel

Otherwise if the format task changes the underlying files, it will make
fail the other tasks.

  task: [protoc:breaking-change-detection] buf breaking --against '.git#branch=origin/master,subdir=rpc'
  task: [protoc:format] buf format --write --exit-code
  task: [protoc:check] buf lint
  task: [protoc:compile] buf dep update
  Failure: context canceled
  Failure: context canceled
  Failure: context canceled
  exit status 100

* Simplified taskfile

* Do not exit with error if `buf format` formats a file

This is the intended behaviour.
  • Loading branch information
cmaglie authored Dec 23, 2024
1 parent 0a116e7 commit 7782c89
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,11 @@ tasks:

protoc:
desc: Lint, format and compile protobuf definitions
deps:
- protoc:check
- protoc:format
- protoc:compile
- protoc:breaking-change-detection
cmds:
- task: protoc:format
- task: protoc:check
- task: protoc:compile
- task: protoc:breaking-change-detection

protoc:compile:
desc: Compile protobuf definitions
Expand All @@ -243,8 +243,7 @@ tasks:
protoc:docs:
desc: Generate docs for protobuf definitions
cmds:
- |
buf generate --template buf.doc.gen.yaml
- buf generate --template buf.doc.gen.yaml

docs:include-configuration-json-schema:
desc: Copy configuration JSON schema to make it available in documentation
Expand All @@ -266,7 +265,7 @@ tasks:
protoc:format:
desc: Perform formatting of the protobuf definitions
cmds:
- buf format --write --exit-code
- buf format --write

protoc:breaking-change-detection:
desc: Detect protobuf breaking changes
Expand Down

0 comments on commit 7782c89

Please sign in to comment.