replikativ / konserve

A clojuresque key-value/document store protocol with core.async.
Eclipse Public License 1.0
300 stars 25 forks source link

Unable to resolve symbol key-vec in lein reagent template #123

Open kasbah opened 21 hours ago

kasbah commented 21 hours ago

I am able to reliably reproduce the error when adding konserve as dependency to a lein reagent project:

Syntax error compiling at (konserve/filestore.clj:585:25).
Unable to resolve symbol: key-vec in this context

Method 1

Generate an example project from template

lein new reagent example +test

Add the konserve dependency and create a new test file importing it:

diff --git a/project.clj b/project.clj
index 44cb038..a9b2db9 100644
--- a/project.clj
+++ b/project.clj
@@ -18,6 +18,7 @@
                   :scope "provided"]
                  [metosin/reitit "0.5.18"]
                  [pez/clerk "1.0.0"]
+                 [io.replikativ/konserve "0.7.317"]
                  [venantius/accountant "0.2.5"
                   :exclusions [org.clojure/tools.reader]]]

diff --git a/test/example/test.clj b/test/example/test.clj
new file mode 100644
index 0000000..04361a9
--- /dev/null
+++ b/test/example/test.clj
@@ -0,0 +1,3 @@
+(ns example.test
+  (:require [konserve.filestore :refer [connect-fs-store]]
+            [konserve.core :as k]))

Run tests:

lein test

Method 2

Alternatively you can grab the repo I made:

git clone https://github.com/kasbah/konserve-key-vec-repro
cd konserve-key-vec-repro
lein test

Additional info

$ clojure --version
Clojure CLI version 1.12.0.1479
$ lein --version
Leiningen 2.11.2 on Java 11.0.25 OpenJDK 64-Bit Server VM
kasbah commented 21 hours ago

Was able to narrow it down to something in these deps/config. If I delete this it seems fine in terms of test (of course cljs dev workflow is probably broken):

--- a/project.clj
+++ b/project.clj
@@ -17,7 +17,6 @@
                  [org.clojure/clojurescript "1.11.54"
                   :scope "provided"]
                  [metosin/reitit "0.5.18"]
-                 [pez/clerk "1.0.0"]
                  [io.replikativ/konserve "0.7.317"]
                  [venantius/accountant "0.2.5"
                   :exclusions [org.clojure/tools.reader]]]
@@ -100,14 +99,12 @@
                                   [ring/ring-mock "0.4.0"]
                                   [ring/ring-devel "1.9.5"]
                                   [prone "2021-04-23"]
-                                  [figwheel-sidecar "0.5.20"]
                                   [nrepl "0.9.0"]
                                   [thheller/shadow-cljs "2.16.7"]
                                   [pjstadig/humane-test-output "0.11.0"]

  ]

-                   :source-paths ["env/dev/clj"]
                    :plugins [[lein-figwheel "0.5.20"]
                              [lein-doo "0.1.10"]
pkpkpk commented 20 hours ago

Try excluding core async from pez/clerk, maybe set core async latest as an override dep