Open dvirsky opened 9 years ago
+1
Sorry for the late reply. We'd need to remove all test files as well. Previously dependencies are vendored in a folder starting with "_" and Go ignores running tests in such folder (e.g., go test ./...
). But with the new folder "internal", Go won't ignore running tests from dependencies. Details see https://github.com/jingweno/nut/issues/11#issue-59561326.
We'd need to remove all test files as well.
I think there should at least be an option to opt-in/out of that, because I actually think it's a feature to run the tests for all vendored dependencies as well. Then you know your whole dependency chain is ok.
@renstrom Sure, I thought about this too. We could add build tags grouped by dependencies. For example, for dependency foo, we add:
// +build foo
Then you could run go test ./... -tags foo
to run tests for dependency foo. But let's do that one step at a time. I bet most people wouldn't need to vendor tests of dependencies.
That sounds like a good approach to me, didn't know about build tags.
Signed-off-by: Dvir Volk dvirsky@gmail.com