Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: do not download “modules” that contain no Go files #31866
At the moment,
I am not aware of any reasonable use-case for such a repository:
Furthermore, if someone did find a way to make modules without Go source code useful (for the above use-cases or others), it's trivial to add a
On the other hand, module proxies tend to rely on the
Therefore, I propose that we change the
Another example use case is to deliver supporting scripts and assets with module. Not saying it is the greatest idea, but I included base Makefile from
Such approach was working with vendor before.
I agree for such case it should be not a problem to at least add
Actually in the proxy we am writing, we download the repository using the VCS, not using go get or go download. So, I don't know whether the repository is a useful go module or not, I let the proxy user's go decide on that. So actually, a go module without go files doesn't bother me at all. I'd rather not have to decide in the proxy whether a repository contains go files or not, so I am not in favor of this proposal.