Closed mattly closed 11 months ago
My only experience with this error message & code reloading is when developing test.check itself, where I might accidentally redefine the Generator
defrecord and suddenly any existing generators or code that references that class will be referencing the older version of the class.
I'm not sure why that would happen to you since I assume you're developing your own project and test.check is just a library that tools.namespace
should not be reloading.
If none of that rings a bell, I will probably need some sort of succinct way of reproducing the problem, because this isn't much to go on, and subsequence
doesn't look strange at all.
(I did just glance at it and saw that it used the test.chuck/for
macro, which raises the possibility that the macroexpansion somehow references an older Generator
class, but I see no such reference, and that still wouldn't explain why Generator
would be getting reloaded anyhow)
hm.. I'm not defining any of my own Generator
or doing anything with test.check or test.chuck, but I do have a macro in my own project (that rarely should get reloaded by tools.namespace
that wraps checking
to provide me with status on my test runs, since they can take a long time.
It's good to know that this is a known problem, at least.
I'll see if I can narrow the problem down a bit to something reproducible. It might take a while... the problem has been happening for a while in my own project, but recently I was refactoring some non-test code that uses the generators for "demo data" purposes and this was happening a lot, so I've got some ideas on where to look.
I found this issue because it suddenly started happening for me. If I can narrow it down, I'll post here.
With varying frequency, sometimes when running
clojure.tools.namespace.repl/refresh
, I'll get an error similar to:The location and source of the error varies, but it's always some place that's using
subsequence
as a generator. I'm not entirely sure what's going on, and it's difficult to reproduce, but once it happens, the problem persists until I quit the running JVM and restart it again.