This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-31
Channels
- # announcements (3)
- # aws-lambda (1)
- # babashka (122)
- # beginners (241)
- # calva (28)
- # cider (7)
- # clara (7)
- # clj-kondo (43)
- # clojars (5)
- # clojure (326)
- # clojure-europe (60)
- # clojure-italy (2)
- # clojure-nl (4)
- # clojure-spec (21)
- # clojure-uk (4)
- # clojurescript (162)
- # cursive (30)
- # datomic (3)
- # editors (5)
- # emacs (4)
- # figwheel-main (1)
- # fulcro (24)
- # gratitude (3)
- # helix (7)
- # honeysql (20)
- # improve-getting-started (1)
- # introduce-yourself (11)
- # jobs (3)
- # joker (2)
- # kaocha (15)
- # lsp (21)
- # lumo (2)
- # meander (3)
- # off-topic (34)
- # re-frame (6)
- # reagent (1)
- # releases (4)
- # rum (2)
- # shadow-cljs (37)
- # spacemacs (16)
- # tools-deps (16)
- # vim (23)
- # xtdb (32)
i was trying to evaluate the following query from the query documentation:
(defquery get-promotions
"Query to find promotions for the purchase."
[?type] ;;; can also be specified using a keyword as :?type, but symbols are more idiomatic to specify bindings.
[?promotion <- Promotion (= ?type type)])
and got a syntax error: unable to resolve symbol ?type
in this context. when i change the ?type
symbol to a keyword, the error goes away. very new to clojure/clara here. am i missing something? thanks!here’s the full stack trace
2. Unhandled clojure.lang.Compiler$CompilerException
Error compiling src/bug.clj at (19:1)
#:clojure.error{:phase :compile-syntax-check,
:line 19,
:column 1,
:source "/Users/johsi/Documents/clj-rules/src/bug.clj"}
Compiler.java: 6812 clojure.lang.Compiler/analyze
Compiler.java: 6749 clojure.lang.Compiler/analyze
Compiler.java: 3191 clojure.lang.Compiler$SetExpr/parse
Compiler.java: 6803 clojure.lang.Compiler/analyze
Compiler.java: 6749 clojure.lang.Compiler/analyze
Compiler.java: 3108 clojure.lang.Compiler$MapExpr/parse
Compiler.java: 6801 clojure.lang.Compiler/analyze
Compiler.java: 38 clojure.lang.Compiler/access$300
Compiler.java: 596 clojure.lang.Compiler$DefExpr$Parser/parse
Compiler.java: 7111 clojure.lang.Compiler/analyzeSeq
Compiler.java: 6793 clojure.lang.Compiler/analyze
Compiler.java: 6749 clojure.lang.Compiler/analyze
Compiler.java: 7185 clojure.lang.Compiler/eval
Compiler.java: 7136 clojure.lang.Compiler/eval
core.clj: 3202 clojure.core/eval
core.clj: 3198 clojure.core/eval
interruptible_eval.clj: 87 nrepl.middleware.interruptible-eval/evaluate/fn/fn
AFn.java: 152 clojure.lang.AFn/applyToHelper
AFn.java: 144 clojure.lang.AFn/applyTo
core.clj: 667 clojure.core/apply
core.clj: 1977 clojure.core/with-bindings*
core.clj: 1977 clojure.core/with-bindings*
RestFn.java: 425 clojure.lang.RestFn/invoke
interruptible_eval.clj: 87 nrepl.middleware.interruptible-eval/evaluate/fn
main.clj: 437 clojure.main/repl/read-eval-print/fn
main.clj: 437 clojure.main/repl/read-eval-print
main.clj: 458 clojure.main/repl/fn
main.clj: 458 clojure.main/repl
main.clj: 368 clojure.main/repl
RestFn.java: 137 clojure.lang.RestFn/applyTo
core.clj: 667 clojure.core/apply
core.clj: 662 clojure.core/apply
regrow.clj: 18 refactor-nrepl.ns.slam.hound.regrow/wrap-clojure-repl/fn
RestFn.java: 1523 clojure.lang.RestFn/invoke
interruptible_eval.clj: 84 nrepl.middleware.interruptible-eval/evaluate
interruptible_eval.clj: 56 nrepl.middleware.interruptible-eval/evaluate
interruptible_eval.clj: 152 nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
AFn.java: 22 clojure.lang.AFn/run
session.clj: 202 nrepl.middleware.session/session-exec/main-loop/fn
session.clj: 201 nrepl.middleware.session/session-exec/main-loop
AFn.java: 22 clojure.lang.AFn/run
Thread.java: 829 java.lang.Thread/run
1. Caused by java.lang.RuntimeException
Unable to resolve symbol: ?type in this context
Util.java: 221 clojure.lang.Util/runtimeException
Compiler.java: 7418 clojure.lang.Compiler/resolveIn
Compiler.java: 7362 clojure.lang.Compiler/resolve
Compiler.java: 7323 clojure.lang.Compiler/analyzeSymbol
Compiler.java: 6772 clojure.lang.Compiler/analyze
Compiler.java: 6749 clojure.lang.Compiler/analyze
Compiler.java: 3191 clojure.lang.Compiler$SetExpr/parse
Compiler.java: 6803 clojure.lang.Compiler/analyze
Compiler.java: 6749 clojure.lang.Compiler/analyze
Compiler.java: 3108 clojure.lang.Compiler$MapExpr/parse
Compiler.java: 6801 clojure.lang.Compiler/analyze
Compiler.java: 38 clojure.lang.Compiler/access$300
Compiler.java: 596 clojure.lang.Compiler$DefExpr$Parser/parse
Compiler.java: 7111 clojure.lang.Compiler/analyzeSeq
Compiler.java: 6793 clojure.lang.Compiler/analyze
Compiler.java: 6749 clojure.lang.Compiler/analyze
Compiler.java: 7185 clojure.lang.Compiler/eval
Compiler.java: 7136 clojure.lang.Compiler/eval
core.clj: 3202 clojure.core/eval
core.clj: 3198 clojure.core/eval
interruptible_eval.clj: 87 nrepl.middleware.interruptible-eval/evaluate/fn/fn
AFn.java: 152 clojure.lang.AFn/applyToHelper
AFn.java: 144 clojure.lang.AFn/applyTo
core.clj: 667 clojure.core/apply
core.clj: 1977 clojure.core/with-bindings*
core.clj: 1977 clojure.core/with-bindings*
RestFn.java: 425 clojure.lang.RestFn/invoke
interruptible_eval.clj: 87 nrepl.middleware.interruptible-eval/evaluate/fn
main.clj: 437 clojure.main/repl/read-eval-print/fn
main.clj: 437 clojure.main/repl/read-eval-print
main.clj: 458 clojure.main/repl/fn
main.clj: 458 clojure.main/repl
main.clj: 368 clojure.main/repl
RestFn.java: 137 clojure.lang.RestFn/applyTo
core.clj: 667 clojure.core/apply
core.clj: 662 clojure.core/apply
regrow.clj: 18 refactor-nrepl.ns.slam.hound.regrow/wrap-clojure-repl/fn
RestFn.java: 1523 clojure.lang.RestFn/invoke
interruptible_eval.clj: 84 nrepl.middleware.interruptible-eval/evaluate
interruptible_eval.clj: 56 nrepl.middleware.interruptible-eval/evaluate
interruptible_eval.clj: 152 nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
AFn.java: 22 clojure.lang.AFn/run
session.clj: 202 nrepl.middleware.session/session-exec/main-loop/fn
session.clj: 201 nrepl.middleware.session/session-exec/main-loop
AFn.java: 22 clojure.lang.AFn/run
Thread.java: 829 java.lang.Thread/run
i think the issue is that a syntax change was made and the documentation updated, but those never made it to a new release: https://github.com/cerner/clara-rules/pull/463👍 2
I will try and work with @U0KRSVDHR and see if we can get that released
I can plan on doing a release sometime this weekend @U3KC48GHW.