When compiling class files for my project with (binding [*compile-files* true] (dev))
(deduced from https://clojure.org/guides/dev_startup_time), and running (reset)
from integrant.repl
, I get the error below. Has anyone seen something like this before? Does reset
have trouble with detecting changes to sources when class files are present (hinted at by the fact that :reloading
lists all namespaces).
I've had this problem (without the binding
) but what worked for me was running lein clean
Yeah, that does it, but it nukes the whole target/default+repl+repl
dir, which is where the class files lives that improves startup time by 75% (from 16s to 4s) in my case.
Hmm, not sure what to do about that sadly. Haven't even heard of class files to improve startup time
It's described here https://clojure.org/guides/dev_startup_time 🙂
Thanks for the link
Hi there!
I'd like to remove :duct.middleware.web/log-errors
in production.
But I did not find any way to remove keys in a profile.
How does one go about that?
Thanks in advance!
I had the same issue not too long ago. I'm honestly not sure if there's an option to remove it (I don't think so)
What you could try (I haven't tested this) is to dissoc
the :duct.middleware.web/log-errors
after running duct.core/prep-config
in your main.clj
However, what might work (haven't tested it), is that you could dissoc the
Normally you use the duct.core/exec-config
function, to prep and init your config, and finally block for daemons
Instead, maybe this could work in your main.clj
file:
(-> config
(duct.core/prep-config profiles)
(dissoc :duct.middleware.web/log-errors)
(ig/init keys)
(duct/.core/await-daemons)))
(reference to duct/exec-config
https://github.com/duct-framework/core/blob/bd216f6f3ab3671d809cafc1daa36fe44dd23592/src/duct/core.clj#L221)
Again, I haven't tested this. But I think it should work
Hmm. sorry this probably won't work 😞
Because it's being referenced https://github.com/duct-framework/module.web/blob/47a07008d42a349e77131ee35fe552b9f67e3a1a/src/duct/module/web.clj#L39-L40
Alternatively you could override it with your own ig/init-key
but that's a bit hacky