You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So a problem has popped up that appears to be related to the use of tools.namespace for reloading (I'm reporting some detective work by llasram in #clojure here):
Ok, so usually namespaces are created on-demand and never removed
When clojure.core is first loaded and initialized data-readers, it creates
namespaces and vars for all the referenced reader functions, which will
be at that point unbound
Normally, when you then load a namespace, if the namespace object
already exists, it just creates/updates the bindings for vars in the namespace
But the tools.namespace reload code is destroying the namespace itself,
and creating a new one to then load code into
The data-readers map is left holding a var in a namespace object which
no-one else can see, and never gets new code loaded into it
The net result is that if you try and use a reader literal in your test code you get an exception, see: https://www.refheap.com/85727 which you don't get in normal use or from the REPL.
Any thoughts?
m/
The text was updated successfully, but these errors were encountered:
Will have to look into it. Seems like either might need to do something different with tools.namespace or try to figure out if tools.namespace can be patched.
Hi Jake. I'm not sure how I'd apply this workaround as the namespace I'd need to stop reloading contains the namespace I'm testing which is, I assume, what is getting reloaded for each test run?
Hi Jake.
So a problem has popped up that appears to be related to the use of tools.namespace for reloading (I'm reporting some detective work by llasram in #clojure here):
The net result is that if you try and use a reader literal in your test code you get an exception, see: https://www.refheap.com/85727 which you don't get in normal use or from the REPL.
Any thoughts?
m/
The text was updated successfully, but these errors were encountered: