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 has been archived by the owner on Sep 9, 2020. It is now read-only.
I was starting a new project and decided to give dep a whirl, so this experience is from my first moments with the tool
I started with a noop main.go, ran dep init which produced an empty lock/manifest which seemed about right, then attempted dep ensure github.com/gorilla/mux which gave an error of sorts, with no packages being added to vendor/
dep: No constraint or alternate source specified for "github.com/gorilla/mux", omitting from manifest
So I attempted to manually specify a constraint: dep ensure github.com/gorilla/mux@^1.3.0 which gave no output but did add the dependency to the manifest. However no packages were added to vendor or the lock file.
With a bit of trial and error I found that I have to use the package in my project before it exists to have dep install it.
The main reason I want to install a package first as it allows editors to provide code completion, but it's also just habit from other tools/languages (npm, cargo, glide etc)
The text was updated successfully, but these errors were encountered:
Thanks for trying dep, and for providing the feedback!
Yeah, we've been back and forth over this quite a lot. I honestly can't even remember where we've landed right now.
There's an existing mechanism by which we could accomplish the outcome you want pretty easily - see #36. The question has mostly about whether we can do it in a way that won't have weird gotchas for folks, and that won't make the command set awkward, or have the same literal command have drastically different behavior depending on disk state.
It should be easier to do this under the new approach to the command set we're taking. That's being discussed in #277.
go version go1.8 linux/amd64
I was starting a new project and decided to give dep a whirl, so this experience is from my first moments with the tool
I started with a noop main.go, ran
dep init
which produced an empty lock/manifest which seemed about right, then attempteddep ensure github.com/gorilla/mux
which gave an error of sorts, with no packages being added to vendor/So I attempted to manually specify a constraint:
dep ensure github.com/gorilla/mux@^1.3.0
which gave no output but did add the dependency to the manifest. However no packages were added to vendor or the lock file.With a bit of trial and error I found that I have to use the package in my project before it exists to have dep install it.
The main reason I want to install a package first as it allows editors to provide code completion, but it's also just habit from other tools/languages (npm, cargo, glide etc)
The text was updated successfully, but these errors were encountered: