Re: "Injecting" new clojure.core functions into third-party libraries

2012-12-14 Thread Stuart Sierra
`in-ns` is special. To create Vars in another namespace, use `intern` instead of `defn`. -S -- 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

Re: "Injecting" new clojure.core functions into third-party libraries

2012-12-06 Thread Meikel Brandmeyer (kotarak)
Hi, Am Donnerstag, 6. Dezember 2012 17:41:24 UTC+1 schrieb Brian Marick: > > (when (ecosystem/clojure-1-3?) > (in-ns 'clojure.core) > (defn ex-info ...) > (in-ns 'midje.util.backwards-compatible-utils)) > > Why not? What should I do instead? > > Without having looked at

Re: "Injecting" new clojure.core functions into third-party libraries

2012-12-06 Thread Brian Marick
(Actually, previous was wrong. The `in-ns` calls seem to have to be at the top level, as in: (in-ns 'clojure.core) (if-not (resolve 'ex-info) (defn ex-info ...) (in-ns 'midje.repl) - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional cons

Re: "Injecting" new clojure.core functions into third-party libraries

2012-12-06 Thread Brian Marick
On Dec 6, 2012, at 10:41 AM, Brian Marick wrote: >(ns midje.repl > (:require ... >midje.util.backwards-compatible-utils >[leiningen.core.project :as project] > It worked to remove the modification to core from `m.u.backwards-compatible-utils` to the b