This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-25
Channels
- # announcements (1)
- # babashka (3)
- # beginners (48)
- # calva (1)
- # clj-kondo (1)
- # cljs-dev (6)
- # clojure (29)
- # clojure-europe (15)
- # clojure-spec (1)
- # clojure-uk (8)
- # clojurescript (17)
- # conjure (23)
- # css (7)
- # cursive (16)
- # datascript (1)
- # emacs (4)
- # fulcro (32)
- # hoplon (3)
- # keechma (16)
- # leiningen (1)
- # luminus (1)
- # meander (11)
- # off-topic (18)
- # pathom (15)
- # re-frame (12)
- # reagent (12)
- # reitit (5)
- # reveal (5)
- # spacemacs (5)
- # xtdb (18)
So I am trying to run crux with rocksdb on windows.
When I start it in WSL I get this error: No implementation of method: :as-file of protocol: #'
And when I run it in windows I get this error: java.lang.IllegalArgumentException: No implementation of method: :as-file of protocol: #'
which is basically the same error, just with a different class.
It fails at crux.kv.rocksdb
line 144 with this code:
(RocksDB/open opts (.getAbsolutePath (doto (io/file db-dir) (.mkdirs))))
where db-dir is of type WindowsPath although I pass in a string as db-dir option:
:crux.kv/db-dir (str (io/file storage-dir "db"))
Does it work if you don't have the (str ...)
? We don't officially want to support Windows just yet but I am surprised WSL isn't working either and it would be good to understand why
Without the (str ...)
it does not work either.
I am currently debugging this and am stuck in crux.topology/parse-opts
I see that it takes the path as str as it should and then calls (s/conform v type)
where type is :crux.config/path
.
So I think while conforming it turns the path into one of these classes. I just cannot find the type definition for crux.config/path
.
I created an issue: https://github.com/juxt/crux/issues/996
Thanks! One more thought from me, does the directory already exist? If not, what happens if you have created it manually first?
-.- I used rocksdb version "20.07-1.9.2-beta"
Now I just checked some more sources and saw that there was a commit regarding paths: https://github.com/juxt/crux/commit/fdbff026b745d96ef25e474be3128e131f0a3944#diff-213326f730be85f2c4b81ba31fbe17acR146 which fixes that exact problem. So, If I switch to the yesterday released verison: "20.07-1.10.0-beta-SNAPSHOT" it wokrs.
I will close the ticket then, Thanks for listening. I mean, I am happy that it was fixed already, but feel like I wasted a few peoples time now 😄
Nonetheless, I learned something interesting (io/file) does not work with java.nio.file.Path.
Thanks for reporting this, @U0677JTQX 🙂
As you discovered, this was part of a change between 1.9.2 and 1.10.0-SNAPSHOT - in theory, though, 1.9.2 should still have been using :crux.config/string
for :crux.kv/db-dir
, so I'm a little confused as to why you saw this issue :thinking_face:
Initially :crux.kv/db-dir
was a string, but then it got coerced to a Path, which was then passed into (io/file
which lead to the described error.
Yes - although that change was only introduced in 1.10.0 - if you were using 1.9.2 it shouldn't have been being coerced?
Interesting. I just had another look, so I had crux-core in version: "20.07-1.10.0-beta-SNAPSHOT" and crux-rocksdb in version "20.07-1.9.2-beta" which explains the difference I guess? I upgraded the core version yesterday after the anouncement in this channel and picked up rocksdb today according to the docs, where the 1.92. version was still linked.
I created an issue: https://github.com/juxt/crux/issues/996