ring-clojure / ring

Clojure HTTP server abstraction
MIT License
3.73k stars 518 forks source link

False positive circular dependency in wrap-reload due to as-alias #507

Closed caumond closed 3 weeks ago

caumond commented 3 weeks ago

Hi all,

First, thanks for your great tools.

Wrap-reload raises an exception about a circular dependency, which is compiled without dependency with clj cli or with cider.

I understand what is a circular dependency with :as, but the point of as-alias is to not load the namespace and then introduce link that would create dependencies if they were classical :as

For more details, you can have a look to this public repository in which I’ve reused the example I learnt wrap-reload with in the excellent Web Development with Clojure third edition.

  1. Do we agree this is not the expected behavior?
  2. Any chance for a fix?
weavejester commented 3 weeks ago

Thanks for the bug report. It looks like there was already a PR on ns-tracker that fixed this, one that had slipped between the cracks of my inbox and was never merged. I'll push a new release of ns-tracker and then one of Ring in the next day or two.

weavejester commented 3 weeks ago

Released ns-tracker 1.0.0, which should fix your issue. I'll also update Ring to include the new dependency.