Re: 回复: missing tags for go chaincode developement dependencies

Matthew Sykes

We have chosen not to add version tags to the modules because they tend to evolve compatibly and are mostly disconnected from the fabric releases. For example, if you pull any version of fabric-chaincode-go, it should work with any version of fabric. A similar statement can be made for the protocol buffers (barring additions made to support recent versions).

If we started adding tags that reflected the fabric versions, this would break the semantic versioning and require consumers to change their import paths to reflect `v2` of Fabric. If we started doing proper semantic versioning, we would end up bumping minor versions regularly and it would skew heavily from the released versions. Instead, we've chosen to stay with v0 semantics.

To make a long story short, the module versioning is disjoint from the fabric versioning and in place of tags we've used branches that map to the fabric version. When you `go get` your module, you can use `@branch` to pull the latest from the branch. The `go.mod` will then be updated with the commit timestamp and hash of the repository hosting the module. We are not the only ones to do this. (See{crypto,sync,sys,}).

It does seem we've messed up with fabric-chaincode-go, however, since we don't have any branches there. That should probably be fixed for release-2.2+.

On Tue, May 4, 2021 at 9:20 PM david liu <david-khala@...> wrote:

Hi Fabric maintainers,

Is there any updates on this? I am happy to hear any consideration on why not pushing named git tag to fabric-chaincode-go and fabric-protos-go.

If it is intended and designed as a WON’T DO, an clarification is welcomed to help us feedback to community members.


发件人: 刘 宇翔
发送时间: 2021420 21:05
收件人: fabric@...; twg-china@...
主题: missing tags for go chaincode developement dependencies


Hi Fabric maintainers, 

As some community member and me found for a while, 

Both following repositories have no git tags yet pushed to Github

This will introduce a result that fabric go chaincode developer have to suffer from go.mod dependency versioning issue. such as 

Each time we get lost in what 20200511190512 indicates. We have to guess whether it is 2.2.x or 2.3.x
Can you consider give tags to them, in a similar way in fabric itself. then we could pin to use v2.2.x as dependency version.

Best Regards,

David Liu

Matthew Sykes

Join { to automatically receive all group messages.