juji-io / datalevin

A simple, fast and versatile Datalog database
https://github.com/juji-io/datalevin
Eclipse Public License 1.0
1.13k stars 63 forks source link

Hard fail when upgrading to 0.9.0 from 0.8.29 #251

Closed light-matters closed 4 months ago

light-matters commented 4 months ago

App won't start when using a version later than 0.8.29: Exception in thread "main" Syntax error macroexpanding at (datalevin/compress.clj:1:1).

Narrowed it down to the change between 0.8.29 and 0.9.0. Here are my deps, which are basically a slightly modified version of the kit project.

The project is under udub.ourstory (for trace context).

:deps    {org.clojure/clojure {:mvn/version "1.11.3"}

           ;; Routing
           ;; metosin/reitit {:mvn/version "0.5.18"}
           metosin/reitit {:mvn/version "0.7.0"}

;; Ring
           metosin/ring-http-response {:mvn/version "0.9.3"}
           ring/ring-core {:mvn/version "1.9.5"}
           ring/ring-defaults {:mvn/version "0.3.3"}
           ring-oauth2/ring-oauth2 {:mvn/version "0.2.2"}

           ;; Logging
           ;; org.slf4j/slf4j-nop {:mvn/version "2.0.11"}
           ch.qos.logback/logback-classic {:mvn/version "1.4.14"}

           ;; Data coercion
           luminus-transit/luminus-transit {:mvn/version "0.1.6"
                                            :exclusions [com.cognitect/transit-clj]}
           metosin/muuntaja {:mvn/version "0.6.10"}

           ;; kit Libs
           io.github.kit-clj/kit-core {:mvn/version "1.0.3"}
           io.github.kit-clj/kit-undertow {:mvn/version "1.0.5"}
           selmer/selmer {:mvn/version "1.12.50"}
           luminus/ring-ttl-session {:mvn/version "0.3.3"}
           com.github.sikt-no/clj-jwt {:mvn/version "0.5.92"}

           ;; Data
           com.taoensso/nippy {:mvn/version "3.3.0"}
           datalevin/datalevin {:mvn/version "0.8.29"}
           babashka/fs {:mvn/version "0.5.20"}

           ;; app (non-web) functionality
           org.apache.pdfbox/pdfbox {:mvn/version "2.0.29"}
           ;; generateme/fastmath {:mvn/version "2.2.1"}
           ffclj/ffclj {:mvn/version "0.1.2"}
           scicloj/tablecloth {:mvn/version "6.103.1"}
           buddy/buddy-auth {:mvn/version "3.0.323"}
           io.github.kit-clj/kit-sql-conman {:mvn/version "1.0.5"}
           io.github.kit-clj/kit-sql-migratus {:mvn/version "1.0.2"}
           org.xerial/sqlite-jdbc {:mvn/version "3.36.0.3"}}

And here is the stack trace:

Exception in thread "main" Syntax error macroexpanding at (datalevin/compress.clj:1:1).
    at clojure.lang.Compiler.load(Compiler.java:7665)
    at clojure.lang.RT.loadResourceScript(RT.java:381)
    at clojure.lang.RT.loadResourceScript(RT.java:372)
    at clojure.lang.RT.load(RT.java:459)
    at clojure.lang.RT.load(RT.java:424)
    at clojure.core$load$fn__6908.invoke(core.clj:6162)
    at clojure.core$load.invokeStatic(core.clj:6161)
    at clojure.core$load.doInvoke(core.clj:6145)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invokeStatic(core.clj:5934)
    at clojure.core$load_one.invoke(core.clj:5929)
    at clojure.core$load_lib$fn__6850.invoke(core.clj:5976)
    at clojure.core$load_lib.invokeStatic(core.clj:5975)
    at clojure.core$load_lib.doInvoke(core.clj:5954)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.core$apply.invokeStatic(core.clj:669)
    at clojure.core$load_libs.invokeStatic(core.clj:6017)
    at clojure.core$load_libs.doInvoke(core.clj:6001)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invokeStatic(core.clj:669)
    at clojure.core$require.invokeStatic(core.clj:6039)
    at clojure.core$require.doInvoke(core.clj:6039)
    at clojure.lang.RestFn.invoke(RestFn.java:551)
    at datalevin.bits$eval29243$loading__6789__auto____29244.invoke(bits.clj:1)
    at datalevin.bits$eval29243.invokeStatic(bits.clj:1)
    at datalevin.bits$eval29243.invoke(bits.clj:1)

Hope this helps; more details available on request!

Edit: shortened stack trace (as it's not relevant anymore)

bzg commented 4 months ago

You need to upgrade the database, you can follow the instructions here. HTH!

light-matters commented 4 months ago

Arg, I wondered if it would be something like that as soon as I'd submitted it. Should have thought before typing. Apologies and thanks!

huahaiy commented 4 months ago

Was the upgrade successful?

bzg commented 4 months ago

I don't know about the OP but I upgraded a small db from 0.8.25 to 0.9.5 with no problem.

I believe the upgrade instructions could be made more prominent in the documentation: or perhaps mentioned in the release notes for minor releases?

huahaiy commented 4 months ago

Done.

huahaiy commented 4 months ago

Assuming this resolved.