-
Notifications
You must be signed in to change notification settings - Fork 1k
UX feedback around ensure #745
Comments
Hi @zmb3 . Thanks for sharing your feedback.
Refer to When should I use If you have time please read all the FAQs as they will answer a lot of questions you might have. And please let us know if you any additional feedback. |
Thanks for the claification @ibrasho. I actually did see that particular question in the FAQ, but it came off to me as explaining why you settled on a particular naming convention as opposed to explaining why the tool doesn't add dependencies.
I think what was confusing to me is that the help message states otherwise:
Perhaps the last section of the help message could be improved.
One additional piece of feedback - this workflow doesn't seem to play nice with goimports. If I know of a library I want to use but I don't currently have it in my GOPATH, I have to add an import to a *.go file and then run |
hi @zmb3, thanks for the issue. as @ibrasho noted, we don't currently support this - however, for many of the reasons you cite here (and as previously raised in e.g. #303), we are planning to add some behaviors that'll be more along these lines. #489 will be the first draft at those, hopefully to be merged this week. The CLI docs you note are definitely out of sync with the behavior of the tool. Unfortunately, they were written prior to deciding to move to the new model (#277) that #489 begins to implements. As happens, it's taken much longer than expected for us to catch up with the planned change...and we let the docs languish in the meantime. |
Thanks for the history Sam. I appreciate the work you all are doing. It's clear from reading these issues that this is a much harder problem to solve than it would appear on the surface. |
Greetings,
I'm just starting to give
dep
a whirl and have run into some behavior I can't explain.I may be doing something wrong, or I may just not understand the tool, but I thought I'd share my initial experience. For reference, I have mostly used glide for dependency management up until now.
I started a project, ran
dep init
, and then added a single dependency withdep ensure
. All worked as expected.A few days later I came back and tried to add another dependency.
The command completed without any output, and without modifying the lock file or adding anything to the vendor directory.
I tried again, running the same command with the
-v
flag to see if I could get some more information. I see some output about the original dependency, but nothing on the new dependency I'm trying to add. I ran the tool once more with the-n
flag, and the lock file that it says it would generate is identical to the current one (again nothing on the new dependency).My assumption is that
dep ensure
is supposed to go out and fetch a dependency for me, then update my lock file. Is this not the case?I suspected maybe for some reason
dep
only looks at code that's already in$GOPATH
, so I rungo get github.com/someuser/somelib
and then try anotherdep ensure
.In this exercise, the library I'm attempting to pull in is github.com/mitchellh/pointerstructure.
Now that the library is in my
$GOPATH
I see some different behavior when runningdep ensure
:I don't fully understand
dep
's constraints yet, but my Gopkg.toml consists only of the commented out lines that were produced bydep init
. I have not intentionally set any constraints, so I'm confused as to why I can't pull in the latest commit of some package like I could do withglide add
.The text was updated successfully, but these errors were encountered: