I think I figured out how to disable compilation. Seems to work. (just failing unit tests now)
http://build.clojure.org/job/core.typed/17/console Thanks! Ambrose On Mon, Mar 25, 2013 at 9:30 AM, Ambrose Bonnaire-Sergeant < abonnaireserge...@gmail.com> wrote: > Hi Stuart, > > I think the problem is slightly deeper with core.typed. I use `derive` to > define a common supertype for several defrecords, which is the source of > the original (Filter? +) assertion error. Filter? is defined > > (def Filter ::filter) > > (defn Filter? [a] > (isa? (class a) Filter)) > > This ends up with lots of weirdness with compilation. > > How do I disable AOT? I don't know if I even want AOT anyway: I'm moving > towards lazily loading most of core.typed. > > Thanks, > Ambrose > > On Mon, Mar 25, 2013 at 9:08 AM, Stuart Sierra < > the.stuart.sie...@gmail.com> wrote: > >> Ah yes, the joys of AOT-compilation and static initializers. I know them >> well. >> >> Strange things happen with AOT-compilation. Classes get loaded in a >> different order, or get loaded by different classloaders. Maybe someday we >> can figure it all out. Try replacing that with `instance?` as you say. (Is >> the return value of `defrecord` even defined?) >> >> If nothing else works, it is possible to disable AOT-compilation >> altogether. The Contrib super-POM does it only as a sanity check. >> >> I tried this and got failures during the test phase: >> >> [INFO] --- clojure-maven-plugin:1.3.13:test (clojure-test) @ core.typed >> --- >> Exception in thread "main" java.lang.StringIndexOutOfBoundsException: >> String index out of range: 1, >> compiling:(clojure/core/typed/test/mini_kanren.clj:575:3) >> at clojure.lang.Compiler.analyzeSeq(Compiler.java:6567) >> at clojure.lang.Compiler.analyze(Compiler.java:6361) >> >> -S >> >> >> >> On Friday, March 22, 2013 9:08:00 PM UTC-4, Ambrose Bonnaire-Sergeant >> wrote: >>> >>> On Sat, Mar 23, 2013 at 7:32 AM, Hugo Duncan <dunca...@gmail.com> wrote: >>> >>> Ambrose Bonnaire-Sergeant <abonnair...@gmail.com> writes: >>>> >>>> > Now that ClojureWest has finished, I'll gently bump this thread :) >>>> > >>>> > Thanks, >>>> > Ambrose >>>> >>>> Ambrose, >>>> >>>> I had a quick look at this. I tried running with zi:test, and it >>>> complained about a missing dependency on tools.macro. Adding that as a >>>> test scoped dependency and running again gives me: >>>> >>>> [ERROR] InvocationTargetException: java.lang.** >>>> StringIndexOutOfBoundsExceptio**n: String index out of range: 1, >>>> compiling:(clojure/core/typed/**test/mini_kanren.clj:575:3) >>>> >>>> The original error seems to have something to do with the core.contracts >>>> expansion. Defining TopFilter and BotFilter with c.core/defrecord (and >>>> defining appropriate type predicate functions) seems to get further. >>> >>> >>> Cheers Hugo. You're right, it does get further with some defrecords, >>> then gets stuck at another defconstrainedrecord predicate. >>> >>> This is the macroexpansion for a defconstrainedrecord predicate: >>> >>> (clojure.core/let [t__3815__auto__ (clojure.core/defrecord >>> TopFilter >>> [])] >>> (clojure.core/defn TopFilter? [r__3816__auto__] >>> (clojure.core.contracts.**constraints/= >>> t__3815__auto__ >>> (clojure.core/type r__3816__auto__)))) >>> >>> Perhaps we should be doing an (instance? TopFilter r) here instead? The >>> output of `defrecord` seems to be out of date immediately when compiling. >>> >>> 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/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.