-
Notifications
You must be signed in to change notification settings - Fork 192
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
Not able to use msgp with go modules #241
Comments
The code doesn't officially support go modules (at the moment). In either case, the tool and the library that comes with it are bundled together; you must vendor them using the same strategy. The fact that go modules don't recognize this coupling is, IMO, a deficiency in the design of the module system. In any case, maintaining a compatibility matrix of tool and library versions sounds like a huge pain, so I don't see this tool/library supporting that in the future unless someone is willing to sponsor the work. My guess is that the application in question can be fixed if you can encourage the go toolchain to pull the whole project as a dependency. With that being said, I have been meaning to port this project to modules so that all the dependencies get pulled in correctly. (There's a 'v2' branch I've been patching on and off for a while now.) TL;DR the library code and code generator are inseparable; the only stability guarantees I am providing are source-level backwards-compatibility and encoding backwards-compatibility. That is, for any existing application, you can upgrade to the new library and code generator, re-generate the code, and everything will continue to work as before. |
Still I can use this library, but with one discomfort thing. I have to install msgp with some hack. Install with command To use Or you can remove |
I added the v*.. releases at the request of the Debian folks who package this code. It's disappointing that the Go tool has retroactively added new semantics to those releases. I will ask the Go folks what advice I should be giving my users. |
Command
go get -u -t github.com/tinylib/msgp
install msgp from master. It generates code withmsgp.WrapError
.But when using msgp in app with go modules, latest version is v1.0.2 and there are no
msgp.WrapError
. To migrate to version v2 you should usev2
postfix in import path, but I can't modify pregenerated code.It was broken in commit 1360bda
The text was updated successfully, but these errors were encountered: