-
Notifications
You must be signed in to change notification settings - Fork 18k
x/vgo: document behaviour of vgo vendor (and why it adds transitive (test) dependencies) #25672
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
Comments
A smaller app to show this package main
import _ "github.com/pelletier/go-toml"
func main() {
}
|
The docs says:
So this looks right. |
Agree with your conclusion @oiooj @flibustenet - I'm going to close this for now because it's working as intended/expected, but if you have any concerns with those semantics please feel free to comment/question here. Thanks |
My concern is not so much that it vendor additional dependencies, it's ok to have a full copy of the dependencies. My concern is that vendor it should not update For example my use case now is to vendor only because i need to use legacy tools (fresh, guru...) and there is no "universal proxy-cache". But soon i will not need to vendor, so i don't want to commit a |
@flibustenet Yes, your concerns is right. It's no need to change |
I suspect this is happening because your app's dependencies are not Go modules (i.e. do not have Others might be able to verify/refute this.
That's good to know. There is work in progress to help make these tools Go module aware. There is also the more general question of trimming/pruning |
I think it still need investigation, we should verify this and confirm that it's the behavior that we want. Maybe you can reopen it or do you see an other issue to discuss about vendoring with vgo ? |
@flibustenet - I think it certainly makes sense to re-open this issue as a placeholder for documenting how and what |
You would see the same things added to go.mod if you ran The quoted text, except for the typo, looks right to me. What more do you want to say? |
I think a sentence like this should go somewhere in the doc. Maybe in the vgo vendor help or more globally. Anyway for me it's clear now, and will see in the future what's append when every dependencies will have a go.mod. To @myitcv if you can close the issue |
There are situations where a build is ok (very few dependencies) but with transitive (test) dependencies it doesn't work. Then it's annoying to have to resolve broken test dependencies just to vendor working dependencies. What about an option to decide if we want to vendor test or not ? Example with
edit: The issue for spew : davecgh/go-spew#86 maybe related to #25871 |
Change https://golang.org/cl/122256 mentions this issue: |
The problem with go-spew/spew/testdata was just a bug. |
What version of Go are you using (
go version
)?go version go1.10.1 linux/amd64 vgo:2018-02-20.1
vgo updated just now
What did you do?
empty go.mod
vgo build
vgo list -m
They are really the dependencies that I use
vgo vendor
vgo build
vgo list -m
I don't use all of them
What did you expect to see?
The same dependencies at first.
I believe it's because of tests, it's ok to vendor them.
But maybe
go.mod
should not be updated with dependencies that my module don't use.The text was updated successfully, but these errors were encountered: