ring-clojure / ring-clojure/ring
require syntax causes wrap-reload not to reload some namespaces
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 3.9k
- Forks
- 528
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the wrap-reload implementation and the require handling around core.clj, then reproduce the example using nested requires and a change to raflapi.clj. Compare reload behavior with the flattened require form; done means the affected namespaces reload without requiring a change to core.clj.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100