This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-17
Channels
- # ai (115)
- # announcements (8)
- # babashka (26)
- # beginners (7)
- # biff (8)
- # calva (1)
- # cider (10)
- # clerk (2)
- # clj-together (11)
- # clojure (26)
- # clojure-boston (1)
- # clojure-denmark (3)
- # clojure-europe (23)
- # clojure-nl (1)
- # clojure-norway (33)
- # clojure-uk (3)
- # clojurescript (14)
- # conjure (3)
- # cursive (65)
- # emacs (10)
- # events (18)
- # exercism (6)
- # honeysql (14)
- # hyperfiddle (11)
- # kaocha (6)
- # nbb (17)
- # off-topic (58)
- # pathom (5)
- # reagent (28)
- # reitit (1)
- # releases (1)
- # sci (3)
- # shadow-cljs (22)
- # xtdb (29)
Hi folks. I'm trying to start off with the quickstart and I'm getting a missing dependency from xtdb:
; Evaluating file: xtdb-client.clj
; Syntax error (FileNotFoundException) compiling at (xtdb/io.clj:1:1).
; Could not locate cognitect/anomalies__init.class, cognitect/anomalies.clj or cognitect/anomalies.cljc on classpath.
; Evaluation of file xtdb-client.clj failed: class clojure.lang.Compiler$CompilerException
I've just copied in the quickstart ns code for now into a namespace and trying to load it in the repl. Adding that dependency in deps.edn (to see what would happen) results in change to
; Evaluating file: xtdb-client.clj
; Syntax error reading source at (xtdb/io.clj:406:61).
; Invalid token: ::anomalies/category
; Evaluation of file xtdb-client.clj failed: class clojure.lang.Compiler$CompilerException
cl
Is there a configuration I'm missing? Polylith component deps:
{:paths ["src" "resources"]
:deps {org.clojure/core.memoize {:mvn/version "1.0.257"}
com.xtdb/xtdb-core {:mvn/version "1.23.1"}
com.xtdb/xtdb-rocksdb {:mvn/version "1.23.1"}}
:aliases {:test {:extra-paths ["test"]
:extra-deps {}}}}
@US893PCLF Can you link me to the docs you're following and explain what xtdb-client.clj
is?
Since you're using Polylith, I'm wondering what your :dev
alias looks like -- in particular, are you using :extra-paths
for Cursive or :extra-deps
for every other editor/IDE?
For example, if I start a REPL with just com.xtdb/xtdb-core
, I'm able to require
just fine:
(~/clojure)-(!2003)-> clj -Sdeps '{:deps {com.xtdb/xtdb-core {:mvn/version "1.23.1"}}}'
Clojure 1.12.0-alpha2
user=> (require ')
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See for further details.
nil
user=>
So I think this might be something in your env/project setup...?I'd also check your version of Clojure itself (`org.clojure/clojure` I mean):
relies on :as-alias
so it requires Clojure 1.11 (or 1.12):
[cognitect.anomalies :as-alias anomalies]
If you're using Clojure 1.10 or earlier, that will silently fail when it gets to ::anomalies/categoy
I'm following this one. https://docs.xtdb.com/guides/quickstart/
Which doesn't mention Polylith 🙂
... will check the clojure version as well. I'm guessing it is in my setup, just don't know where yet.
No, I'm adding it in as a component :)
You may have Clojure 1.10 or earlier in your workspace-level deps.edn
file.
Yep, 1.10.3 .. will update to later version.
Also see my comment about your :dev
alias and IDEs...
:dev {:extra-paths ["development/src"]
:extra-deps {org.clojure/clojure {:mvn/version "1.12.0"}
org.clojure/tools.deps {:mvn/version "0.17.1297"}
;; pedestal deps
cli-matic/cli-matic {:mvn/version "0.5.4"}
com.taoensso/timbre {:mvn/version "6.0.2"}
expound/expound {:mvn/version "0.9.0"}
org.apache.commons/commons-lang3 {:mvn/version "3.12.0"}
;; state management
aero/aero {:mvn/version "1.1.6"}
integrant/integrant {:mvn/version "0.8.0"}
integrant/repl {:mvn/version "0.3.2"}
;; http responses
metosin/ring-http-response {:mvn/version "0.9.3"}
;; json parsing
cheshire/cheshire {:mvn/version "5.11.0"}
;; web services
io.pedestal/pedestal.immutant {:mvn/version "0.5.11-beta-1"}
io.pedestal/pedestal.route {:mvn/version "0.5.11-beta-1"}
io.pedestal/pedestal.service {:mvn/version "0.5.11-beta-1"}
;; security
yogsototh/clj-jwt {:mvn/version "0.3.0"}
;; spec tools
metosin/spec-tools {:mvn/version "0.10.5"}
commons-validator/commons-validator {:mvn/version "1.7"}
com.gfredericks/test.chuck {:mvn/version "0.2.14"}
;; bases
poly/ixi-cli {:local/root "bases/cli"}
poly/pedestal {:local/root "bases/pedestal"}
;; components
poly/auth {:local/root "components/auth"}
poly/client-milvus {:local/root "components/client-milvus"}
poly/client-openai {:local/root "components/client-openai"}
poly/client-xtdb {:local/root "components/client-xtdb"}
poly/common-regex {:local/root "components/common-regex"}
poly/common-specs {:local/root "components/common-specs"}
poly/health {:local/root "components/health"}
poly/http-specs {:local/root "components/http-specs"}
poly/jwt-auth0 {:local/root "components/jwt-auth0"}
poly/notematic {:local/root "components/notematic"}
poly/responses-web {:local/root "components/responses-web"}
poly/storage {:local/root "components/storage"}}}
OK, cool. Not Cursive 🙂
Nope, Calva
{:mvn/version "1.12.0"}
-- either 1.11.1 or 1.12.0-alpha2 -- there is no 1.12.0 GA yet
(I'm using 1.12.0-alpha2 because I'm testing all the fun new stuff in it -- and we often run pre-release builds in production at work)
I'm not sure if XTDB docs make it clear anywhere that Clojure 1.11.1 is required...?
Thanks for this, the :as-alias
usages was introduced last patch. I've asked the team whether the next release should relax the requirement or if we should update the docs 🙏.
I'm not sure if XTDB docs make it clear anywhere that Clojure 1.11.1 is required...?
hey @U797MAJ8M 👋
loosely speaking, it's a query to find both the rows to update and the rest of each of the updated rows (i.e. the cols you haven't SET
) and then follows a similar path to Datalog :put
s
is that query run on the thread which submits the tx? I'm wondering about the new consistency model since I'm not clear where the serialization happens now, e.g. two updates to the same document at the same time will result in one being silently overridden, since there isn't match
support yet?
> is that query run on the thread which submits the tx? nope, the query happens on the indexing thread (same principle as transaction functions or match operations) so the ~same caveats apply about not wanting to make those linearized UPDATEs too 'chunky' (else you'll stall the other writers) > are the writes now deltas instead of whole documents? also nope, underlying writes to object storage are operating in terms of whole documents ('rows') due to being schemaless, and there is (again) no explicit structural sharing across versions, beyond the potential for columnar compression of identical values
we haven't yet built anything approaching optimistic MVCC / row-level locking / Calvin at this point