-
Notifications
You must be signed in to change notification settings - Fork 1k
Support empty ProjectRoot #417
Comments
Hi! Thanks for the awesome tool! I want to ask for update on this one. What is the status of this in 2018? It's unclear from the linked issues whether it's still a planned feature, or when is it to be exected. Meanwhile most of the manuals out there just tell you to 'dep init' as if you can do it wherever you want, which is a great source of confusion. In the meantime, I'd like to suggest appending "ctx.DetectProjectGOPATH: /home/ror6ax/testproject is not within a known GOPATH" with something like "To use dep, please move your code to GOPATH/src." So far, as a first-timer I would have no idea what is going on. |
I'm also curious to know, I saw a 0.4.0 tag floating around yesterday, but no release. I'm specifically interested in the issue called out in #836 which was closed, pointing here. Our use case is similar to that in #836, but we want to make sure our third_party tools have a consistent set of dependencies, and it's very not-obvious (other than somewhat crazy Makefile heroics) how we can add specific Gopkg/Golock files to third-party checkouts. This is the somewhat odd case of needing a third party tool (the protobuf go generator, specifically) as part of the build toolchain, and we want to make sure we have reproducible builds, so we need to pin the third_party repo (& it's deps) to a specific hash. |
Any ETA on this landing? This defect seems to break some pretty common work flow patterns. |
Yep, same here. I've been wanting to migrate to dep, but there doesn't appear to be a nice way to get it working (I'll gladly accept a workaround if there's one :)) |
I just copy in a dummy main.go to get started, that uses cobra or viper or some library I know I'll eventually be using. I then do |
The use case I'm interested in here is similar to others where I'd like to have a monorepo containing multiple internal projects, but have a single set of third-party dependencies stored under New to the codebase but I've been trying to hack on this to see what might be possible. It seems to work for some sample test cases (see below) but not all others. I'm curious if anyone has thoughts as to where I should be looking to properly support this use case. Example working layout:
I've been able to support the above use case by hacking things up to remove the empty ProjectRoot checks:
Example non-working layout:
I believe |
Answering my own question here .. but it looks like the reason why the It seems like a bit of hack to rely on the standard import logic. One path I've explored is whether using RootManifest.IgnoredPackages() is the right way to ignore all local imports (i.e., add all local subdirs in the GOPATH root). That seems to get past the package list step but fails at the deducing step (it still seems to try and deduce the type via HTTP and fails). |
For further reference, I assume this issue was closed due to #2166. |
Hey, yes, that was rather a brute force approach, I can reopen. |
Dep was officially deprecated earlier this year, and the proposal to archive this repository was accepted. As such, I'm closing outstanding issues before archiving the repository. For any further comments, please use the proposal thread on the Go issue tracker. Thanks! |
From @sdboyer on March 20, 2017 16:3
#313 highlighted an issue where things don't behave very well if
ProjectRoot
is empty. This seems like a case we should explicitly support, though. This is kind of a stub issue for all that, but two quick thoughts:ListPackages()
andPackageTree.ToReachMap()
to work differently when the root is emptyCopied from original issue: sdboyer/gps#197
The text was updated successfully, but these errors were encountered: