Fork me on GitHub
#duct
<
2020-07-17
>
walterl00:07:37

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).

Kevin07:07:47

I've had this problem (without the binding) but what worked for me was running lein clean

walterl12:07:17

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.

Kevin12:07:48

Hmm, not sure what to do about that sadly. Haven't even heard of class files to improve startup time

Kevin13:07:36

Thanks for the link

๐Ÿ‘ 3
Carl13:07:37

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!

Kevin13:07:34

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

Kevin13:07:12

Normally you use the duct.core/exec-config function, to prep and init your config, and finally block for daemons

Kevin13:07:40

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)))

Kevin13:07:37

Again, I haven't tested this. But I think it should work

Kevin14:07:30

Hmm. sorry this probably won't work ๐Ÿ˜ž

Kevin14:07:40

Alternatively you could override it with your own ig/init-key but that's a bit hacky