Thanks. Here's a good test, feel free to use it.
(deftest direct-linking-for-load (let [original-load load called? (atom nil) logger (fn [& args] (reset! called? true) nil)] (with-redefs [load logger] ;; doesn't actually load clojure.repl, but should ;; eventually call `load` and reset called?. (require 'clojure.repl :reload)) (is @called?))) Thanks, Ambrose On Fri, Nov 20, 2015 at 10:55 AM, Alex Miller <a...@puredanger.com> wrote: > I reopened the ticket. You can hold on the patch - I think we're going to > make another change that will affect what the patch will be. > > > On Friday, November 20, 2015 at 9:29:43 AM UTC-6, Ambrose > Bonnaire-Sergeant wrote: >> >> I was going to reopen the ticket and create/test a patch. Does that work >> for you? >> >> On Fri, Nov 20, 2015 at 10:22 AM, Ambrose Bonnaire-Sergeant < >> abonnaireserge...@gmail.com> wrote: >> >>> Alex, >>> >>> That sounds correct. >>> >>> Thanks, >>> Ambrose >>> >>> >>> On Fri, Nov 20, 2015 at 10:10 AM, Alex Miller <a...@puredanger.com> >>> wrote: >>> >>>> I see the same and I suspect it's because of the forward declare. :( >>>> >>>> >>>> On Friday, November 20, 2015 at 12:25:28 AM UTC-6, Ambrose >>>> Bonnaire-Sergeant wrote: >>>>> >>>>> I don't think CLJ-1845 <http://dev.clojure.org/jira/browse/CLJ-1845> >>>>> had the intended effect. >>>>> >>>>> user=> (alter-var-root #'load (fn [f] (fn [& args] (prn "patched") >>>>> (apply f args)))) >>>>> #object[user$eval1241$fn__1242$fn__1243 0x1c857e6 >>>>> "user$eval1241$fn__1242$fn__1243@1c857e6"] >>>>> user=> (load) >>>>> "patched" >>>>> nil >>>>> user=> (require 'clojure.core :reload) >>>>> nil >>>>> user=> (require 'clojure.tools.analyzer :reload) >>>>> nil >>>>> user=> (require 'clojure.tools.analyzer :reload-all) >>>>> nil >>>>> >>>>> I was expected "patched" to be printed with each call to `load` via >>>>> `require`. >>>>> >>>>> Do others observe this also? >>>>> >>>>> Thanks, >>>>> Ambrose >>>>> >>>>> -- >>>> 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. >>>> >>> >>> >> -- > 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. > -- 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.