Ah, ok. I’ve not used with-redefs. I’ll give it a shot.

On Wed, Jan 17, 2018 at 8:23 AM Patrik Sundberg <patrik.sundb...@gmail.com>
wrote:

> I tend to add a path to my :resource-paths in boot for dev-only things.
> You can do the same with lein (and hopefully any other build tool you use).
>
> I'm not sure I got your question fully. My interpretation is that you want
> to have a different version of the "same" fn, so that other parts of the
> code that use the fn ends up using a diff version without needing to be
> changed. I think that's what you asked? :)
>
> If so then adding a dev-only path like mentioned above, with the dev
> versions of the fns, and then e.g. add a wrapper macro that uses
> with-redefs to point the fns you want to the dev versions from the dev NS.
> You can then use this macro to to execute code with the dev versions, like
> (dev-mode (form1) (form2) ... ).
>
>
>
> On Monday, January 15, 2018 at 4:31:05 PM UTC, Jonathon McKitrick wrote:
>>
>> I’d like to have a namespace loaded with dev-only versions of some
>> functions.
>>
>> Is there a better way than using environ with ‘require’ and ’ns-resolve’
>> to do this?
>>
>> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/LPi164ENGzc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Jonathon McKitrick

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to