Re: how to reference fabric 2.2 in application go.mod? #fabric #fabric-chaincode

Brett T Logan <brett.t.logan@...>

You can reference a commit SHA, for example, the latest hash for the release-2.2 branch can be picked by doing a `go get` on the SHA like this:
`go get`
In the go mod you will still see a reference to something like `<commit_date>-<commit_sha>`.
Brett Logan
Software Engineer, IBM Blockchain
Phone: 1-984-242-6890

----- Original message -----
From: "Yueming Xu" <yxucolo@...>
Sent by: fabric@...
To: fabric@...
Subject: [EXTERNAL] [Hyperledger Fabric] how to reference fabric 2.2 in application go.mod? #fabric #fabric-chaincode
Date: Sat, Jan 16, 2021 1:26 PM
when my GO chaincode has reference to fabric code, the go.mod would pick the following version reference: v2.1.1+incompatible

I cannot change the version to v2.2.1, because go module requires a v2/go.mod.  What would you have to do if the application code have reference to code in fabric v2.2 or later?

In my case, I am trying to call the `fabric/common/policydsl.FromString()` to parse an endorsement policy string, so it does not matter to compile it with an older version of fabric, but I am curious how it work work if v2.2 code is required.

Join to automatically receive all group messages.