Skip to content

Conversation

@SamWhited
Copy link
Contributor

@SamWhited SamWhited commented Jan 16, 2019

Hello,

Please consider supporting Go Modules, the new packaging standard that will be on by default Go 1.12. Experimental support is in Go 1.11 and the new module paths are supported in Go 1.9.7+ and Go 1.10.3+ in a read-only manner for backwards compatibility with all supported versions of Go.

Because this library is still below version 2, and has no external dependencies, the go.mod file is fairly simple. If you accept this PR, the only other thing to do would be to start using semver compatible tags and tag a release of this library that others can pin to (for example v0.0.1 or v1.0.0).

Note that I set the language version go 1.9 in the mod file because 1.9.7 is the earliest version with partial support for reading the go.mod file (earlier versions will keep working as they always have and won't read the go.mod file) and it did not appear that you were using any standard library or language features introduced after 1.9 (it builds fine with 1.9.7).

Using modules if future changes are made to this library is relatively simple; go get -u on Go 1.11 with modules on or 1.12 by default will update dependencies (not a problem here), and go mod tidy will trim down any dependencies that have been removed from the go.mod file and go.sum file (which doesn't exist because there are no dependencies; it's nice to be lean!). I'd be happy to provide more information, or a quick crash course in using modules if you want to familiarize yourself with them, but of course there's not much to do for this library.

Thank you for your consideration.

@mremond
Copy link
Member

mremond commented Jan 17, 2019

Thanks for the patch!
I love Go modules, but I just not had time to catch up on all my projects yet.

@mremond mremond merged commit ef5f165 into processone:master Jan 17, 2019
@SamWhited SamWhited deleted the support_modules branch January 17, 2019 15:29
@SamWhited
Copy link
Contributor Author

Thanks! If you'd consider making a tag with a semver compatible version number (eg. v1.0.0) for these two libraries, we could also use that from the main xmpp library and have a much nicer looking mod file.

@mremond
Copy link
Member

mremond commented Jan 23, 2019

Hello Sam,
Sure, good point, I will add a v1.0.0 tag

@mremond
Copy link
Member

mremond commented Jan 23, 2019

@SamWhited Tags are done on mgp123 and soundcloud.

Thanks for pushing module support. Go 1.12 is around the corner and modules should now be the default.
I will also plan a stable release for Go XMPP and MQTT libraries, with module support and tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants