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
subpackage recognised as independent package? #244
Comments
We're checking into this. Out of curiosity, does everything still build okay? |
Yes, looks fine after |
@stroborobo what version of Glide are you using ( |
Latest release: glide version 0.8.3 |
Oh, via brew :) |
@stroborobo can you try Glide 0.9.0 RC1? It's available at https://github.com/Masterminds/glide/releases/tag/0.9.0-rc1. The section of code that does this work was rewritten between 0.8.3 and the release candidate. It may already be fixed. |
Tried it, didn't fix the problem unfortunately, but the output changed:
I quadro-checked the repo path and import path now, definitely no typo. This is what the yamcha repo looks like, if that helps:
(The Makefile is only for putting godoc into the readmes, so no fancy building mechanism.) |
@stroborobo I think I've figured out the problem. Glide follows the same path conventions Go itself does when looking at remote packages and the repos they live in. Go expects patterns like This has to do with Glide, or I'm open to suggestions to handle this differently. Right now we are following what Go itself does. |
Now that you're saying that I've never
So I changed the For all four in both cases:
Btw, using the 0.9.0 RC1 I got this in both cases:
However I still wonder why that's important when I'm specifically saying where the repo is and what kind of VCS to use. |
I'm having the same issue here with a private git repo. How does glide fetch private/internal repos? |
Hey i am having the same issues. I suggest that if it is already specified within the glide.yaml as an import package, then it shouldn't try to update it subpackages. I imagine to implement this, requires a key value pair which stores packages that's already been updated during the 'glide update' and do a check whether a package which about to be updated is a subpackage of that. |
Is it possible to append to vcsList (util.go) something like following so that GetRootFromPackage() return correctly the root package in this case:
This regex is based on my case: (same naming as github.com/user/repo)
|
@itscaro This is something we're going to have to really think about. To change the patterns is to break compatibility with We've gotten enough requests we will talk about it. |
@mattfarina I think this is a fairly important issue as it relates to the ability to use private packages. (hosted on GH or elsewhere). Go get works fine, but the VCS host detection fails to interpret git@github.com:user/repo pattern. We really like the design of glide, but are unable to use it until we could properly reference our private packages. |
@davidzhao A couple things that may help... First, you can use Glide with private packages using something like this in your - package: github.com/user/repo
repo: git@github.com:user/repo
vcs: git This will tell Glide to use the Git repo at that location for a package with that path. If you're going off GitHub or using GitHub Enterprise as your own domain the package name may need a mild variation. Second, I'm working to make repo detection for URLs like |
@mattfarina Thanks for the tip! your workaround solved that problem. Tho I ran into a related problem with subpackages. Our glide config looks like this
While it fetches the privaterepo just fine, it gave me the following errors at the end:
Is this related to private repo? |
I am also running into the same issue that @davidzhao is experiencing. Worth noting that I'm using an https+git endpoint instead of git via ssh |
@davidzhao I think I know what happened. Glide expects the |
@mattfarina for me the repo is a Go getable path edit: Looking into the source code it looks like it attempts to |
I had a similar issue where a private repo that had 3 subpackages wasn't being created properly in the glide.yaml. I fixed the issue the same way @stroborobo does in this first comment by adding the submodules by had and removing the extra packages. I hit the same issue when I was trying to do a glide update/install and get the can not detect VCS type. It doesn't make sense to me that glide would try to look in the subpackages folder for the VCS info as I think it is. I created a work around which adds packages to the alreadySeen map if they are subpackages in dependency/resolver.go
I'm not entirely sure if this breaks the purpose of subpackages but it produces a valid glide.lock and my project builds fine now. I don't think this is a good workaround but maybe it helps identify the problem a little better. |
Hi Guys I'm having a related issue Using a package and a sub package When doing a
my glide.yaml looks similar to
any help is very much appreciated |
@mattfarina - package: github.com/golang/protobuf
subpackages:
- proto when running [WARN] Unable to checkout github.com/golang/protobuf/proto |
The solution could be having
in your glide.lock file, remove subpackage lines
this will work nicely. @mattfarina |
Any news about this issue being fixed? :) |
@mattfarina similar to public repository, it should not try to set version for subpackages of a private repo in glide.lock file. When I remove the lines (i.e. name and version) related to subpackages from glide.lock file, it works nicely. |
@mattfarina @stroborobo @technosophos @davidzhao @elan100cs Even i am facing this issue just with glide update. For any packages which has dependent sub pacakges while resolving imports it prompts for password. I can understand removing the sub package stuff from glide.lock before I execute glide install. But in my case glide update is also prompting for password. I Have gone through the code ,when the dependency struct is initialised repo literal are not set as per its parent repo details. |
Hi,
I'm using glide for the first time today, so maybe I just misunderstood something, but here's the problem:
After
glide create
, fixing(?) a private repo entry, andglide install
the latter always outputs warnings that it's "Unable to checkout" a (sub)package. Glide however did put the package into the vendor dir, just as the other subpackages of the same repo (that didn't get a warning).Here's the
glide.yaml
import entry I edited:The one from
glide.lock
:The
glide install --debug
output (snippet):Also this warning right before "Project relies on X dependencies":
Did I misunderstand something or is this a bug?
The text was updated successfully, but these errors were encountered: