-
Notifications
You must be signed in to change notification settings - Fork 373
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
Tracing code has a number of circular references during require #1999
Comments
I think this might be the opposite. Tracing should reference That should eliminate these circular references, which are holdovers from internal 1.0 related namespace refactors. |
We ideally would like it to be a leaf, no depending on anything, like @delner mentioned, but it's kind of messy today. For this specific ticket, we either have to move some of the |
Running into this same problem, I always try to have warnings turned on in tests:
|
Just for folks passing by here: I was encountering the same problem in one of our applications. Just this error when running the RSpecs. Eventually in our case it was a duplicate |
We have cleaned up the main offender here, dd-trace-rb/lib/datadog/core.rb Line 3 in 170ede5
There have been no reports of circular require since the I'm going to close this issue as solved. |
Nice work! |
We've recently fixed a number of circular references during require...
But there are quite a few remaining. These almost all caused by the following loop:
datadog/core
requiresdatadog/core/configuration/components
which requires a bunch of tracing components directly:dd-trace-rb/lib/datadog/core/configuration/components.rb
Lines 10 to 12 in adc96b3
and then indirectly quite a few of these components require
datadog/core
in some of their files.These are the warnings we get right now:
I suspect the solution here will be for individual tracing components to stop requiring
datadog/core
, and assuming that whoever requires them has taken care of that. Nowadays that's insidedatadog/core/configuration/components
but in the future that would probably bedatadog/tracing
directly.The text was updated successfully, but these errors were encountered: