Thanks for the hints.

I didn't found any clue while searching the Web with these keywords, maybe 
others will find this usefull as a reference for future searches.

As for the dependency I also thought about adding it as a checkout but I 
didn't want to maintain it and keep it in sync with the main repo if needed.
Anyway monkey-patching is clearly not a sustainable way to go so I found a 
workaround.

Yet another argument to write an abstraction layer on top of some libraries 
so switching to an alternative less painful.

Arnaud.

Le lundi 10 février 2014 15:19:20 UTC+1, James Reeves a écrit :
>
> You should be able to just hop into the namespace and redef the function.
>
>     (in-ns 'namespace.to.change)
>
>     (def function-to-change ...)
>
> However, it's quite easy to fork a project and deploy your own version of 
> it. You just need to change the project name in project.clj from "foo" to 
> "org.clojars.your-username/foo" or some similarly unique group name.
>
> - James
>
>
> On 10 February 2014 11:11, Arnaud BOS <arnau...@gmail.com <javascript:>>wrote:
>
>> Hi,
>>
>> I have a dependency on a library that is no longer under very active 
>> development (or at least I'm not certain of it).
>> I did a change and sent a pull request but am not sure when or if it will 
>> be merged and deployed.
>>
>> Before I can decide if I need to switch to another dependency (when I'll 
>> find out if this library really is no longer maintained),
>> I'd like to change the behaviour of a function by I can't semm to find 
>> how.
>>
>> * with-bindings doesn't work on non-dynamic
>> * with-redefs-fn doesn't change the behaviour, only the result
>>
>> Is it possible to monkey-patch a function from another namespace in 
>> clojure?
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com<javascript:>
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com <javascript:>
>> 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+u...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
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/groups/opt_out.

Reply via email to