Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
x/vgo: go.mod files in subdirectories are ignored when building the whole directory #24605
What version of Go are you using (
The problem is that each build always runs in the context of a single top-level repo. There's no direct connection between the parent dir and the sub dir (it's not like the parent dir mentions the sub dir in a replace directive or other connection).
At least for now I think the answer is that ./... should stop matching when it finds a directory containing a go.mod. That is, ./... can only match packages in the module where "." is, and sub would therefore be excluded.
Thanks for the quick response!
I think ideally, running
But I'm also not 100% sure what users expect as outcome for building this way with multiple modules in the directory.