integrant

Chris Lester 2023-01-28T04:28:48.472499Z

I've a newbie integrant.repl question .. do I need to duplicate all of the ig/init-key \ halt-key and spec logic over to the dev namespace for the repl workflow? I'm unsure how to make the various defmethods visible from another namespace (dev.clj). Mostly would like to just re-use it while I'm debugging .. for test, mock out some of them. Or do people add that in a (comment ...) in the prod code for that use case?

robertfw 2023-02-06T18:48:18.543329Z

I think the only things you would want in your dev namespace is a bit of code to load your system with development configuration, and the rest of your work can be done in the namespaces the code lives in normally. If it'd be useful to look at an example, I've got some code that shows how to hook up integrant along with aero for both local development and production, https://github.com/usefulprojects-ca/usefulprojects.ca/

imre 2023-01-28T09:43:25.666269Z

Not sure I read it right but it sounds like you want to require some of the defmethod-containing namespaces in your dev ns

imre 2023-01-28T09:44:36.999799Z

You can do that ina comment block as well

Chris Lester 2023-01-28T23:49:05.349779Z

Thanks Imre. I'd required the set of namespaces those are in before switching to the dev namespace and for some reason expected them to be piped into the new namespace with in-ns .. it didn't seem odd at the time lol (not much sleep yesterday). Moving the require to the dev namespace fixed the issue .. and yes, comments in the namespace where I have the init-key/halt-key,etc do work. I just wasn't sure if that was common practice vs sticking the debug restart code in the user or dev ns. I suppose it's no different than using that space for debugging/testing.