ring-clojure / ring

Clojure HTTP server abstraction
MIT License
3.77k stars 520 forks source link

wrap-reload doesn't reload depended namespace #376

Closed tendant closed 5 years ago

tendant commented 5 years ago

wrap-reload doesn't reload depended namespace because of loading order of namespaces.

A testing project is created to demo this issue: https://github.com/tendant/ring-reload-debug

In testing project, namespace "ring-reload-debug.a" depends on namespace "ring-reload-debug.b", if we call non-existed function "f2" in namespace b from namespace a, namespace a will failed to reload. Then add this function in namespace b, refresh page, even the code has been fixed, it still failed to reload namespace a.

The only way to fix this reload issue is to remove function call "b/f2" from namespace a or restart server.

This case can happen very often during development phase, which slow down development cycle.