Closed hartzell closed 5 years ago
@hartzell "fidelity" is indeed the wrong word here with respect to a "clean" go mod vendor
. The result of go mod vendor
is a strict subset of the contents of the module download cache's zip file for the same module.
However, the point I was trying to convey here is that it's also quite easy for the contents of vendor
to get outdated/modified etc. And unless you have suitable CI checks in place, you can't be sure it's identical to a clean go mod vendor
, or the module download cache. Hence "higher fidelity".
This will, however, change with https://github.com/golang/go/issues/33848
Ahhh.
Repeating back to see if I understand, the issue is that the module cache is updated every time go build
(or many of the other commands) is run, whereas the vendor cache is only updated when someone explicitly invokes go mod vendor
.
Do you think there's any point in updating 012_modvendor, or am I a rare duck?
I ran into golang/go#33848 separately (in the same research spree that led me here) and I'm enthusiastic about making vendoring a first class citizen.
Thanks!
Repeating back to see if I understand, the issue is that the module cache is updated every time
go build
(or many of the other commands) is run, whereas the vendor cache is only updated when someone explicitly invokesgo mod vendor
.
Exactly.
Do you think there's any point in updating 012_modvendor, or am I a rare duck?
It might be worth it, although at some point we have to draw a line between how much detail we go into vs creating a neat summary. There are so many nuances of all this stuff... we could write a book!
Lets see if anyone else stumbles on this issue and says "Me too!". I'll bet that https://github.com/golang/go/issues/33848 lands first.
Sounds good. Thanks for raising for discussion in any case.
The 012_modvendor intro includes this statement vis-a-vis vendoring:
That sentence is a bit of a mind-blower. I'm unclear about how it can be higher fidelity; it seems that either the result of
go mod vendor
is correct or it isn't.On the off chance that other folks are also confused, it'd be great if you can expand on the topic a bit. If you can clue me in I can write it up and PR it if that's easier for you.
Thanks!