Join GitHub today
cmd/go: go get -u on a single module results in indirect modules being updated too #28156
What did you do?
I have a project that uses go modules. It includes in it an indirect dependency on
It can be seen in the commits for the project here: https://github.com/jsternberg/go-get-update
Inside of that repository, the output of
What did you expect to see?
I did not expect to see
What did you see instead?
At the moment, I think it's only with this very specific relationship where a dependency is not a module and it is included implicitly in a module and included explicitly in a third module. We've experienced some weird update behaviors and are unsure about which ones are bugs and which ones are us learning modules. I think this one is a bug based on my current understanding of modules though.
When updating, I also see this output which is strange considering that only a single module is being updated:
This was referenced
Oct 23, 2018
At the moment there is a bit of ambiguity as to whether “transitive dependencies” should apply to packages or modules (#26902), but I suspect that it does not change the outcome for your example.