This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-29
Channels
- # babashka (64)
- # beginners (60)
- # calva (10)
- # circleci (3)
- # clj-kondo (62)
- # cljdoc (6)
- # clojars (2)
- # clojure (152)
- # clojure-europe (19)
- # clojure-nl (3)
- # clojure-uk (18)
- # clojurescript (50)
- # clojureverse-ops (12)
- # core-async (21)
- # cursive (6)
- # data-science (1)
- # datomic (17)
- # events (14)
- # fulcro (64)
- # graalvm (20)
- # graphql (5)
- # honeysql (14)
- # jackdaw (3)
- # jobs (1)
- # jobs-discuss (22)
- # kaocha (2)
- # lsp (9)
- # luminus (8)
- # malli (30)
- # meander (31)
- # other-languages (1)
- # polylith (8)
- # re-frame (15)
- # shadow-cljs (85)
- # specter (2)
- # sql (11)
- # tools-deps (56)
- # vim (39)
- # vscode (7)
- # xtdb (16)
I'm trying to integrate Crux into my Fulcro app and I keep getting errors - often inconsistent - but I have a feeling it has to do with how I'm using Crux and Mount. The latest error I'm seeing is:
iced repl :main --force-shadow-cljs --with-cljs -A:dev
OK: CLJS option is enabled.
OK: shadow-cljs project is detected
OK: For shadow-cljs project, start watching instead of starting REPL.
shadow-cljs - config: project/shadow-cljs.edn cli version: 2.8.64 node: v12.18.0
shadow-cljs - starting via "clojure"
WARNING: Use of -A with clojure.main is deprecated, use -M instead
shadow-cljs - HTTP server available at
shadow-cljs - server version: 2.11.23 running at
shadow-cljs - nREPL server started on port 9000
shadow-cljs - watching build :main
[:main] Configuring build.
[:main] Compiling ...
GUARDRAILS IS ENABLED. RUNTIME PERFORMANCE WILL BE AFFECTED.
Mode: :runtime Async? false Throw? false
Guardrails was enabled because the CLJS Compiler config enabled it
[:main] Build completed. (309 files, 0 compiled, 0 warnings, 11.63s)
[2021-07-29 11:04:13.165 - WARNING] :shadow.cljs.devtools.server.nrepl-impl/init-ns-ex - {:init-ns sheluchin.user}
Note: The following stack trace applies to the reader or compiler, your code was not executed.
CompilerException Syntax error compiling at (crux/codec.clj:358:27). #:clojure.error{:phase :compile-syntax-check, :line 358, :column 27, :s
ource "crux/codec.clj"}
clojure.lang.Compiler.analyze (Compiler.java:6808)
clojure.lang.Compiler.analyze (Compiler.java:6745)
clojure.lang.Compiler$InvokeExpr.parse (Compiler.java:3820)
clojure.lang.Compiler.analyzeSeq (Compiler.java:7109)
clojure.lang.Compiler.analyze (Compiler.java:6789)
clojure.lang.Compiler.analyze (Compiler.java:6745)
clojure.lang.Compiler$InvokeExpr.parse (Compiler.java:3888)
clojure.lang.Compiler.analyzeSeq (Compiler.java:7109)
clojure.lang.Compiler.analyze (Compiler.java:6789)
clojure.lang.Compiler.access$300 (Compiler.java:38)
clojure.lang.Compiler$LetExpr$Parser.parse (Compiler.java:6384)
clojure.lang.Compiler.analyzeSeq (Compiler.java:7107)
Caused by:
RuntimeException No such var: mem/->nippy-buffer
clojure.lang.Util.runtimeException (Util.java:221)
clojure.lang.Compiler.resolveIn (Compiler.java:7388)
clojure.lang.Compiler.resolve (Compiler.java:7358)
clojure.lang.Compiler.analyzeSymbol (Compiler.java:7319)
clojure.lang.Compiler.analyze (Compiler.java:6768)
clojure.lang.Compiler.analyze (Compiler.java:6745)
Anyone know what the cause might be? I'm kinda new to Clojure -- I can read and write the code pretty well, but the build tools and runtime still give me trouble.I've not tried to run Crux under shadow-cljs - there's lots in Crux (especially in crux.memory
/`crux.codec`) that won't play nicely with ClojureScript. I'd probably try to exclude Crux from that in some way 🙂
Unfortunately it's been a long time since I've used shadow-cljs, I'd have to defer to someone more current about how to do that...
Hi there, what happens when :crux.tx/match
fails? Is an exception thrown?
Hey, it will be logged by default, and you can check whether a transaction succeeded by calling tx-committed?
uhm this is not easy to test I guess - the scenario being throwing a 409 conflict when that happens...I'll probably need to with-redefs
the function
hmm, I've not thought about mapping to 409s before, but I would be curious to hear about / see what you end up with
well unless I am misunderstanding the semantics of it - it should be possible to match
right before put
to make sure the entity did not change..?
@@malcolmsparks is intending to add 412s (with etags) to juxt/site
in the not-too-distant future to do approximately the same thing also, see https://github.com/juxt/site/blob/f6f20f2e177fee4b3f55de4e65545aecc5b253b9/src/juxt/site/alpha/handler.clj#L282
@U899JBRPF for tx-committed?
do I need to await-tx
? It seems like I am receiving a bunch of "node out of sync" exceptions here