Skip to content

Commit

Permalink
Update buf to 1.32.2
Browse files Browse the repository at this point in the history
Signed-off-by: James Taylor <jamest@uk.ibm.com>
  • Loading branch information
jt-nti authored and denyeart committed Jun 4, 2024
1 parent 47d1520 commit f257e2a
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 58 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ HTTPS_GIT := https://github.com/hyperledger/fabric-protos.git
SSH_GIT := ssh://git@github.com/hyperledger/fabric-protos.git

# This controls the version of buf to install and use.
BUF_VERSION := 1.30.1
BUF_VERSION := 1.32.2
# If true, Buf is installed from source instead of from releases
BUF_INSTALL_FROM_SOURCE := false

Expand Down
2 changes: 1 addition & 1 deletion Makefile.apiv1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ HTTPS_GIT := https://github.com/hyperledger/fabric-protos.git
SSH_GIT := ssh://git@github.com/hyperledger/fabric-protos.git

# This controls the version of buf to install and use.
BUF_VERSION := 1.1.1
BUF_VERSION := 1.32.2
# If true, Buf is installed from source instead of from releases
BUF_INSTALL_FROM_SOURCE := false

Expand Down
4 changes: 2 additions & 2 deletions buf.gen-apiv1.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: v1
version: v2
plugins:
- name: go
- local: protoc-gen-go
out: bindings/go-apiv1
opt:
- paths=source_relative
Expand Down
158 changes: 109 additions & 49 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,74 +1,134 @@
version: v1
version: v2
managed:
enabled: true
go_package_prefix:
default: github.com/hyperledger/fabric-protos-go-apiv2
java_multiple_files: true
java_package_prefix: org.hyperledger.fabric.protos
override:
JAVA_OUTER_CLASSNAME:
common/configtx.proto: ConfigTxProto
ledger/queryresult/kv_query_result.proto: KVQueryResultProto
ledger/rwset/kvrwset/kv_rwset.proto: KVRWSetProto
ledger/rwset/rwset.proto: RWSetProto
msp/msp_config.proto: MSPConfigProto
msp/msp_principal.proto: MSPPrincipalProto
JAVA_PACKAGE:
google/rpc/status.proto: com.google.rpc
ledger/queryresult/kv_query_result.proto: org.hyperledger.fabric.protos.ledger.queryresult
ledger/rwset/kvrwset/kv_rwset.proto: org.hyperledger.fabric.protos.ledger.rwset.kvrwset
ledger/rwset/rwset.proto: org.hyperledger.fabric.protos.ledger.rwset
msp/msp_principal.proto: org.hyperledger.fabric.protos.common
orderer/etcdraft/configuration.proto: org.hyperledger.fabric.protos.orderer.etcdraft
orderer/etcdraft/metadata.proto: org.hyperledger.fabric.protos.orderer.etcdraft
peer/lifecycle/chaincode_definition.proto: org.hyperledger.fabric.protos.peer.lifecycle
peer/lifecycle/db.proto: org.hyperledger.fabric.protos.peer.lifecycle
peer/lifecycle/lifecycle.proto: org.hyperledger.fabric.protos.peer.lifecycle
peer/chaincode_event.proto: org.hyperledger.fabric.protos.peer
peer/chaincode_shim.proto: org.hyperledger.fabric.protos.peer
peer/chaincode.proto: org.hyperledger.fabric.protos.peer
peer/collection.proto: org.hyperledger.fabric.protos.peer
peer/configuration.proto: org.hyperledger.fabric.protos.peer
peer/events.proto: org.hyperledger.fabric.protos.peer
peer/peer.proto: org.hyperledger.fabric.protos.peer
peer/policy.proto: org.hyperledger.fabric.protos.peer
peer/proposal_response.proto: org.hyperledger.fabric.protos.peer
peer/proposal.proto: org.hyperledger.fabric.protos.peer
peer/query.proto: org.hyperledger.fabric.protos.peer
peer/resources.proto: org.hyperledger.fabric.protos.peer
peer/signed_cc_dep_spec.proto: org.hyperledger.fabric.protos.peer
peer/snapshot.proto: org.hyperledger.fabric.protos.peer
peer/transaction.proto: org.hyperledger.fabric.protos.peer
- file_option: java_multiple_files
value: true
- file_option: java_package_prefix
value: org.hyperledger.fabric.protos
- file_option: go_package_prefix
value: github.com/hyperledger/fabric-protos-go-apiv2
- file_option: java_outer_classname
path: common/configtx.proto
value: ConfigTxProto
- file_option: java_outer_classname
path: ledger/queryresult/kv_query_result.proto
value: KVQueryResultProto
- file_option: java_outer_classname
path: ledger/rwset/kvrwset/kv_rwset.proto
value: KVRWSetProto
- file_option: java_outer_classname
path: ledger/rwset/rwset.proto
value: RWSetProto
- file_option: java_outer_classname
path: msp/msp_config.proto
value: MSPConfigProto
- file_option: java_outer_classname
path: msp/msp_principal.proto
value: MSPPrincipalProto
- file_option: java_package
path: google/rpc/status.proto
value: com.google.rpc
- file_option: java_package
path: ledger/queryresult/kv_query_result.proto
value: org.hyperledger.fabric.protos.ledger.queryresult
- file_option: java_package
path: ledger/rwset/kvrwset/kv_rwset.proto
value: org.hyperledger.fabric.protos.ledger.rwset.kvrwset
- file_option: java_package
path: ledger/rwset/rwset.proto
value: org.hyperledger.fabric.protos.ledger.rwset
- file_option: java_package
path: msp/msp_principal.proto
value: org.hyperledger.fabric.protos.common
- file_option: java_package
path: orderer/etcdraft/configuration.proto
value: org.hyperledger.fabric.protos.orderer.etcdraft
- file_option: java_package
path: orderer/etcdraft/metadata.proto
value: org.hyperledger.fabric.protos.orderer.etcdraft
- file_option: java_package
path: peer/chaincode.proto
value: org.hyperledger.fabric.protos.peer
- file_option: java_package
path: peer/chaincode_event.proto
value: org.hyperledger.fabric.protos.peer
- file_option: java_package
path: peer/chaincode_shim.proto
value: org.hyperledger.fabric.protos.peer
- file_option: java_package
path: peer/collection.proto
value: org.hyperledger.fabric.protos.peer
- file_option: java_package
path: peer/configuration.proto
value: org.hyperledger.fabric.protos.peer
- file_option: java_package
path: peer/events.proto
value: org.hyperledger.fabric.protos.peer
- file_option: java_package
path: peer/lifecycle/chaincode_definition.proto
value: org.hyperledger.fabric.protos.peer.lifecycle
- file_option: java_package
path: peer/lifecycle/db.proto
value: org.hyperledger.fabric.protos.peer.lifecycle
- file_option: java_package
path: peer/lifecycle/lifecycle.proto
value: org.hyperledger.fabric.protos.peer.lifecycle
- file_option: java_package
path: peer/peer.proto
value: org.hyperledger.fabric.protos.peer
- file_option: java_package
path: peer/policy.proto
value: org.hyperledger.fabric.protos.peer
- file_option: java_package
path: peer/proposal.proto
value: org.hyperledger.fabric.protos.peer
- file_option: java_package
path: peer/proposal_response.proto
value: org.hyperledger.fabric.protos.peer
- file_option: java_package
path: peer/query.proto
value: org.hyperledger.fabric.protos.peer
- file_option: java_package
path: peer/resources.proto
value: org.hyperledger.fabric.protos.peer
- file_option: java_package
path: peer/signed_cc_dep_spec.proto
value: org.hyperledger.fabric.protos.peer
- file_option: java_package
path: peer/snapshot.proto
value: org.hyperledger.fabric.protos.peer
- file_option: java_package
path: peer/transaction.proto
value: org.hyperledger.fabric.protos.peer
plugins:
- name: doc
- local: protoc-gen-doc
out: docs
opt:
- markdown
- protos.md
strategy: all
- name: go
- local: protoc-gen-go
out: bindings/go-apiv2
opt: paths=source_relative
- name: go-grpc
- local: protoc-gen-go-grpc
out: bindings/go-apiv2
opt:
- paths=source_relative
- require_unimplemented_servers=false
- name: java
- protoc_builtin: java
out: bindings/java/src/main/java
- name: grpc-java
- local: protoc-gen-grpc-java
out: bindings/java/src/main/java
- name: js
- protoc_builtin: js
out: bindings/node/src
opt:
- import_style=commonjs
- binary
- name: js-grpc
path: grpc_tools_node_protoc_plugin
- local: grpc_tools_node_protoc_plugin
out: bindings/node/src
opt:
- grpc_js
- name: ts
opt: grpc_js
- local: protoc-gen-ts
out: bindings/node/src
opt:
- service=grpc-node
Expand Down
17 changes: 12 additions & 5 deletions buf.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
version: v1
build:
excludes:
- bindings
version: v2
modules:
- path: .
excludes:
- bindings
lint:
use:
- DEFAULT
except:
- FIELD_NOT_REQUIRED
- PACKAGE_NO_IMPORT_CYCLE
- PACKAGE_VERSION_SUFFIX
ignore:
- google
Expand Down Expand Up @@ -123,12 +126,16 @@ lint:
- gateway/gateway.proto
- gossip/message.proto
- orderer/ab.proto
- orderer/cluster.proto
- orderer/blockattestation.proto
- orderer/cluster.proto
- peer/chaincode_shim.proto
- peer/events.proto
- peer/peer.proto
- peer/snapshot.proto
disallow_comment_ignores: true
breaking:
use:
- FILE
except:
- EXTENSION_NO_DELETE
- FIELD_SAME_DEFAULT

0 comments on commit f257e2a

Please sign in to comment.