There is an important distinction:
- users of your project / library are interested in hard dependencies of it
- developers / testers of your library will actually be using its test
dependencies
Go modules enforces the first group your test dependencies as hard
dependencies, which is not right.
A dependency is a dependency. There are no scopes like you might find in
Maven(Java) land. Your project needs these "test deps" to run your tests, so
they are in your module file. Even so, Go is smart enough when it builds your
binary to not include the extra bloat.
--
You received this
Hi,
Say you have a project with:
- hard dependencies
- some extra dependencies only used during testing, not needed otherwise
Are they treated equally? When you switch to go modules, does the second
group become hard dependencies? It seems like they do.
--
You received this message because