hyperledger / fabric

Hyperledger Fabric is an enterprise-grade permissioned distributed ledger framework for developing solutions and applications. Its modular and versatile design satisfies a broad range of industry use cases. It offers a unique approach to consensus that enables performance at scale while preserving privacy.
https://wiki.hyperledger.org/display/fabric
Apache License 2.0
15.78k stars 8.86k forks source link

vendor directory #5037

Closed pfi79 closed 1 month ago

pfi79 commented 1 month ago

Current Status

Currently there is a vendor folder

I have a question: why is it needed?

It is written in the documentation for vendoring:

Vendoring may be used to allow interoperation with older versions of Go, or to ensure that all files used for a build are stored in a single file tree.

After trying to update github.com/prometheus/client_golang, the peer and orderer programs in docker stopped building. However, if the vendor folder is removed, everything builds fine.

Goal

It seems to me that this is already redundant in the fabric project. And it can be deleted.

Solution

Try deleting the vendor folder and check that no functionality has fallen off.

C0rWin commented 1 month ago

After trying to update github.com/prometheus/client_golang, the peer and orderer programs in docker stopped building. However, if the vendor folder is removed, everything builds fine.

Can you put here an error?

pfi79 commented 1 month ago

After trying to update github.com/prometheus/client_golang, the peer and orderer programs in docker stopped building. However, if the vendor folder is removed, everything builds fine.

Can you put here an error?

https://github.com/hyperledger/fabric/pull/5032

https://github.com/hyperledger/fabric/issues/4052

vendor/github.com/prometheus/client_golang/prometheus/registry.go:62:15: undefined: NewGoCollector

a command that causes an error

make docker