0x-mesh icon indicating copy to clipboard operation
0x-mesh copied to clipboard

Add better support for importing 0x-mesh with Go Modules

Open albrow opened this issue 5 years ago • 1 comments

Context

In https://github.com/0xProject/0x-mesh/pull/618 we switched to using Go Modules for dependency management within Mesh. However, we are still not 100% compatible with Go Modules, especially for Go developers who want to import Mesh. Go Modules requires you to have a separate import path for major version past version 1. See https://blog.golang.org/using-go-modules:

Each different major version (v1, v2, and so on) of a Go module uses a different module path: starting at v2, the path must end in the major version. In the example, v3 of rsc.io/quote is no longer rsc.io/quote: instead, it is identified by the module path rsc.io/quote/v3.

Expected Behavior

Importing Mesh as a Go library with go get github.com/0xProject/[email protected] should work with Go Modules. Version 8.1.0 should be installed and Go Modules should recognize the use of semantic versioning.

Current Behavior

Importing Mesh as a Go library with go get github.com/0xProject/[email protected] results in the following entry in go.mod:

	github.com/0xProject/0x-mesh v0.0.0-20200110231847-73e3fef4aa52

While we were able to install the library, it is referenced only by commit hash. Go Modules was not able to use semantic versioning and when a new version is released (even a patch or minor release) we will need to manually upgrade.

albrow avatar Jan 14 '20 21:01 albrow

this is painful and still not resolved after 1 year

secmask avatar May 28 '21 16:05 secmask