-
Notifications
You must be signed in to change notification settings - Fork 85
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
How do you reference a versioned sub-package? #9
Comments
This would be the right URL: http://gopkg.in/GlassyMedia/go-json-rest.v1/trie |
Actually, I'm reopening this as it should be better documented. Thanks for bringing it up. |
thanks |
I have a project go-godo/godo with many subpackages.
package main
import (
. "github.com/go-godo/godo"
"github.com/go-godo/godo/util"
) I expected import rewrites but the source in gopkg.in/godo.v1 still refers to |
@mgutz yes you would need to import |
@GeertJohan That makes things quite problematic, doesn't it? You can't exactly refer to non-existent packages while your project is in development, so you have to develop in $GOROOT/gopkg.in/project.v[number] -- which kind of defeats the purpose of an isolated, version-locked directory, cloned from a normal github repo. On top of that, almost no one uses that standard, so any packages or libraries that import internally from github.com are now broken or basically just waiting to be broken. |
any updates on this? If I have a package that contains multiple sub packages, which are always 100% compatible to the parent package, renaming the imports is a lot of wasted effort/time and just overhead. |
I haven't tried gopkg.in with subpackages yet. Do you have a v1 branch with different import paths? And on every release you merge changes from master and have to update import paths or deal with conflicts? Looking at some of the Canonical uses,mike go-aws, they don't have a mater branch at all. So they only need to change import paths when releasing a new major version. You can set your default branch to something other than master on GitHub. |
This was here as a doc issue, but the links here seem to be talking about git modules? Either way, not that "go get" works more like gopkg.in itself, seems less of a concern. |
For example, if
router.go
ofmain
usestrie
package in a subdir, I triedgopkg.in/GlassyMedia/go-json-rest/trie.v1
but it doesn't seem to work. Is this feature available?I can send in a pull request if you point me in the right direction on how to patch it.
The text was updated successfully, but these errors were encountered: