ReverseProxy can have a configurable HTTP client. The choices are Hackney and Tesla.
Those clients use
@behaviour Pleroma.ReverseProxy.Client. However,
Pleroma.ReverseProxy.Client also contains functions, resulting in compile-time cycles.
After thinking about this harder, I realized the code in
ReverseProxy.Client is a Client itself. It dynamically chooses either Hackney or Tesla based on the user's config.
In light of this, I moved the code into
ReverseProxy.Client is strictly a behaviour with no other deps. It removes a cycle and reduces 3 others: https://www.diffchecker.com/lA3gMLyO
I'm pretty happy with this one because I think it's a code quality improvement in addition to speeding up recompilation.