ring
ring copied to clipboard
require syntax causes wrap-reload not to reload some namespaces
I have a project where core.clj requiring looks something like this:
(:require
...
[rafl.ui-backend
[api-proxy :as api]
(apis :as apis)
(config :refer [config])
(auth :as auth :refer [ensure-auth-session])
(raflapi :as raflapi)
(hooahyoo :as hooahyoo)
(entries :as entries)
(filemaker :as filemaker)]
[rafl.ui-backend.templates
(index :as index)])
This [namespace (subnamespace1 :as x) (subnamespace2 :as y) ...] syntax seems to cause certain namespaces not to reload. For instance, core.clj reloads fine. However, a change to raflapi.clj is not reloaded. If, after changing raflapi.clj, I change core.clj, the change in raflapi.clj gets reloaded. I couldn't figure out a pattern that governed which namespaces would be reloaded properly.
[Fix] Flattening the require syntax causes all namespaces to be reloaded properly.
What happens if you use vectors instead of lists? e.g. [filemaker :as filemaker] instead of (filemaker :as filemaker)?
Nope, that doesn't seem to fix the problem.
Does adding the [org.clojure/tools.namespace "0.2.11"] dependency to your project fix the issue?
I guess I should also add that I'm using ring-core version 1.3.2 which is using 0.2.2 of ns-tracker.
Working on testing your suggestion.
Adding [org.clojure/tools.namespace "0.2.11"] doesn't seem to change anything.
This issue might require some code changes to ns-tracker. Sounds like it's not accounting for something.