Giter VIP home page Giter VIP logo

Comments (3)

dm3 avatar dm3 commented on May 26, 2024

Line 72 is comparing two numbers, why is that a problem? I'm not sure what's going on after looking at the code for 10 minutes. Seems like Types must implement Comparable in order to get inserted into the cache ConcurrentHashMap. Not sure why this is happening under Graal.

Do you have any more ideas?

from clojure.java-time.

livtanong avatar livtanong commented on May 26, 2024

Re: Line 72, it's just what immediately stood out to me as an obvious comparator operation. i didn't put additional thought into understanding that code further.

As for ideas, I don't have much, but I did replace it with an invocation to the actual java.time constructor, ZonedDateTime. That succeeded in compilation.

Sorry I'm not much help on the matter >.< I don't have intimate knowledge of how graal works.

from clojure.java-time.

andreyorst avatar andreyorst commented on May 26, 2024

It seems that I've got the same problem when using local-date to construct date from string of given format, e.g. with only this code: (t/local-date "dd-MM-yyyy" "01-01-2000") in the -main function.

stack trace
Exception in thread "main" java.lang.ClassCastException: java_time.graph.Types cannot be cast to java.lang.Comparable
        at clojure.lang.Util.compare(Util.java:153)
        at clojure.lang.APersistentVector.compareTo(APersistentVector.java:439)
        at java.util.concurrent.ConcurrentHashMap.compareComparables(ConcurrentHashMap.java:739)
        at java.util.concurrent.ConcurrentHashMap$TreeBin.<init>(ConcurrentHashMap.java:2819)
        at java.util.concurrent.ConcurrentHashMap.treeifyBin(ConcurrentHashMap.java:2676)
        at java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1068)
        at java.util.concurrent.ConcurrentHashMap.putIfAbsent(ConcurrentHashMap.java:1541)
        at java_time.potemkin.util$fast_memoize$fn__1361.invoke(util.clj:50)
        at java_time.graph.ConversionGraph$fn__1577.invoke(graph.clj:153)
        at clojure.core$filter$fn__5911.invoke(core.clj:2821)
        at clojure.lang.LazySeq.sval(LazySeq.java:42)
        at clojure.lang.LazySeq.seq(LazySeq.java:58)
        at clojure.lang.RT.seq(RT.java:535)
        at clojure.core$seq__5419.invokeStatic(core.clj:139)
        at clojure.core$reduce1.invokeStatic(core.clj:932)
        at clojure.core$set.invokeStatic(core.clj:4101)
        at clojure.core$set.invoke(core.clj:4093)
        at java_time.graph.ConversionGraph.equivalent_targets(graph.clj:154)
        at java_time.graph$graph_conversion_path.invokeStatic(graph.clj:193)
        at java_time.graph$graph_conversion_path.invoke(graph.clj:188)
        at java_time.graph$fn__1698.invokeStatic(graph.clj:303)
        at java_time.graph$fn__1698.invoke(graph.clj:300)
        at java_time.potemkin.util$fast_memoize$fn__1361.invoke(util.clj:52)
        at java_time.graph$conversion_fn.invokeStatic(graph.clj:316)
        at java_time.graph$conversion_fn.invoke(graph.clj:312)
        at java_time.local$local_date.invokeStatic(local.clj:12)
        at java_time.local$local_date.invoke(local.clj:12)
        at myapp.core$_main.invokeStatic(core.clj:223)
        at myapp.core$_main.doInvoke(core.clj:221)
        at clojure.lang.RestFn.invoke(RestFn.java:397)
        at clojure.lang.AFn.applyToHelper(AFn.java:152)
        at clojure.lang.RestFn.applyTo(RestFn.java:132)
        at myapp.core.main(Unknown Source)

from clojure.java-time.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.