owenthereal / nut

Vendor Go dependencies
https://github.com/jingweno/nut
MIT License
232 stars 11 forks source link

renamed vendor/_nut to internal (re #11) #15

Open dvirsky opened 9 years ago

dvirsky commented 9 years ago

Signed-off-by: Dvir Volk dvirsky@gmail.com

bradrydzewski commented 9 years ago

+1

owenthereal commented 9 years ago

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.

lithammer commented 9 years ago

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.

owenthereal commented 9 years ago

@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.

lithammer commented 9 years ago

That sounds like a good approach to me, didn't know about build tags.