You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 9, 2020. It is now read-only.
I am trying to get dep setup for my company's repo, but I ran into the issue that I cannot init dep at GOPATH/src.
However, it is not immediately clear why this would no be allowed. What is the issue?
For reference, here is our current setup that seems to be unsupported:
We have one monorepo, with our go code at $REPO/go/src. When fetching 3rd-party dependencies, we place them in ~/go_third_party/src. Then we set our GOPATH=\~/go_third_party;$REPO/go/src.
I would love to move to using dep with vendoring, and it seems like the most logical thing to do would be to create a Gopkg.toml/lock file at $REPO/go/src. Trying this fails with:
root project import: dep does not currently support using GOPATH/src as the project root
So, my 2 questions would be:
1: why is this not allowed?
2: what would you recommend as a way around this? We would really rather have one consistent set of dependencies across the company, so creating a separate .toml/.lock file for each subdirectory is not ideal.
The text was updated successfully, but these errors were encountered:
The reason for not currently supporting it are somewhat arcane and detailed; they're covered in #313, particularly #313 (comment). It's not an unsolvable problem, though, and we had someone at the Gophercon community day hackathon start tackling it. The canonical issue for it is #417.
I am trying to get dep setup for my company's repo, but I ran into the issue that I cannot init dep at GOPATH/src.
However, it is not immediately clear why this would no be allowed. What is the issue?
For reference, here is our current setup that seems to be unsupported:
We have one monorepo, with our go code at
$REPO/go/src
. When fetching 3rd-party dependencies, we place them in~/go_third_party/src
. Then we set ourGOPATH=\~/go_third_party;$REPO/go/src
.I would love to move to using dep with vendoring, and it seems like the most logical thing to do would be to create a Gopkg.toml/lock file at $REPO/go/src. Trying this fails with:
So, my 2 questions would be:
1: why is this not allowed?
2: what would you recommend as a way around this? We would really rather have one consistent set of dependencies across the company, so creating a separate .toml/.lock file for each subdirectory is not ideal.
The text was updated successfully, but these errors were encountered: