-
Notifications
You must be signed in to change notification settings - Fork 689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dependency loop with nats-server #1145
Comments
Hi @gibmat, how are the tests that were disabled run? Is it by doing:
or a different command? Go modules works mostly fine with circular dependencies in the server, but one way to improve this is by moving all tests that depend on the server package to be under the |
Currently none of the tests are being run when the nats.go package is built, because they depend on code in the nats-server library/program. But yes, that is the basic form of how tests are run with Debian's packaging framework, dh_golang. Debian policy requires that all packages build without accessing the Internet, so for golang libraries there's a bit of glue in place to modify the GOPATH and then fulfill all the build dependencies via other Debian packages that contain the dependencies listed in go.mod. Because of how package dependencies are resolved, it's an all-or-nothing sort of situation, and dependency loops are something we need to avoid to guarantee the ability to rebuild packages at any time and for any architecture supported by Debian. At the moment this isn't blocking the use of these packages in Debian, but if non-test code ever started depending on nats-server, that would be a bigger concern. |
thank you @gibmat for the response, that is very helpful |
Sorry for the delayed reply -- this finally got back to the top of my priority queue. 😁 |
Basically we need to revisit a handful of tests to decouple this ( |
Fixed via #1441 |
Defect
Make sure that these boxes are checked before submitting your issue -- thank you!
Versions of
nats.go
and thenats-server
if one was involved:nats.go version: 1.20.0
nats-server version: 2.9.8
OS/Container environment:
Debian sid
Steps or code to reproduce the issue:
I am working on updating some of the various nats-io packages in Debian, and observed that there is a dependency loop between nats.go and nats-server. While the nats-server dependency is only needed by tests in nats.go (see the
go_test.mod
file), that still forms a dependency loop. For the time being to break the loop, the nats.go tests are disabled in the Debian package, but that's clearly not an optimal solution.The text was updated successfully, but these errors were encountered: