-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Go's indexing servers didn't pick up real version number for fabric #2929
Comments
My guess is that .mod file should contain |
I believe this was done intentionally since Fabric is a top level project and not meant to be used as a dependent library by other projects. |
Top level projects also need to be registered on Go's indexing servers because package builders download project dependencies from there. |
Although Fabric is not intended to be used as a go module that other projects import, some projects use Go tooling to download repositories and this does not work for Fabric v2.x since Fabric's go module is not defined as a v2 module. This change marks Fabric's go module as v2 so that Fabric v2.x versions can be downloaded with Go tooling. Fixes hyperledger#2929 Signed-off-by: David Enyeart <enyeart@us.ibm.com>
Although Fabric is not intended to be used as a go module that other projects import, some projects use Go tooling to download repositories and this does not work for Fabric v2.x since Fabric's go module is not defined as a v2 module. This change marks Fabric's go module as v2 so that Fabric v2.x versions can be downloaded with Go tooling. Fixes hyperledger#2929 Signed-off-by: David Enyeart <enyeart@us.ibm.com>
@yurivict I've attempted a PR to update the module to v2 but it looks like there will be too many impacts across the toolchain. Since Fabric module is not intended to be used as a dependency, can you give an example of a workflow that requires the module to be v2? If you need to build Fabric from source, why not get the source from github? |
The FreeBSD's ports framework downloads modules from Go's servers. FreeBSD ports exist only for top-level projects. |
@yurivict I've looked at other top-level Go projects that have released beyond v1, and most don't specify a version for their top-level go module (e.g. cockroachdb, prometheus, grafana). Is there some guidance from the Go community that you can point to for top-level projects? Most of the docs I've found for go module versioning are talking about go libraries that will be consumed as dependencies. |
The PR proved that there were too many downstream disruptions caused by a switch to v2 for fabric module, I've had to close the PR. |
I use this script to retrieve all Go packages:
For example,
go-retrieve-all-packages.sh 2021-09-10T00:00:00Z
fabric is registered with incorrect versions like
v0.0.0-20210916200841-1243e99c1ff2
, and2.3.3
doesn't appear there.The text was updated successfully, but these errors were encountered: