This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-24
Channels
- # announcements (1)
- # aws (2)
- # beginners (147)
- # boot (19)
- # cider (57)
- # clara (52)
- # cljdoc (18)
- # cljs-dev (14)
- # cljsrn (4)
- # clojure (176)
- # clojure-conj (9)
- # clojure-dev (9)
- # clojure-germany (2)
- # clojure-italy (4)
- # clojure-spec (13)
- # clojure-uk (56)
- # clojurescript (72)
- # code-reviews (11)
- # cursive (17)
- # data-science (1)
- # datomic (52)
- # duct (26)
- # emacs (6)
- # events (9)
- # figwheel (1)
- # figwheel-main (21)
- # fulcro (132)
- # funcool (1)
- # graphql (3)
- # jobs-discuss (42)
- # leiningen (3)
- # luminus (45)
- # mount (10)
- # off-topic (2)
- # re-frame (17)
- # reagent (12)
- # reitit (20)
- # ring-swagger (7)
- # rum (3)
- # shadow-cljs (256)
- # slack-help (15)
- # sql (7)
- # tools-deps (50)
- # uncomplicate (1)
- # yada (9)
Hello. I’m trying to add an ataraxy router to my existing Duct project. I’ve successfully used this same setup before but this time around I’m getting an Ataraxy validation error that’s really stumping me.
Evaluation error at ataraxy.core/parse (core.clj:98). AssertionError Assert failed: (valid? routes)
I can’t figure out why my routes are failing the spec. Can anyone spot the problem? I’ve simplified all the way back to duplicating the Ataraxy core tests:
(require '[clojure.spec.alpha :as s])
(require '[ataraxy.core :as ataraxy])
(s/explain ::ataraxy/routing-table-with-meta {"/foo" [:bar]})
; nil
; {"/foo" [:bar]} - failed: (or (nil? %) (sequential? %)) in: [0] at: [:value :unordered] spec: :ataraxy.core/routing-table
; {"/foo" [:bar]} - failed: list? in: [0] at: [:value :ordered] spec: :ataraxy.core/routing-table
What do your routes look like? Just {"/foo" [:bar]}
or something more complicated?
That should be fine. And you have a handler associated with the index route?
Yes. Here’s the pared down system.
{:duct.core/project-ns ticean.clara
:duct.core/environment :production
:duct.module/ataraxy {"/" [:index]}
:ticean.clara.handler/index
{:logger #ig/ref :duct.logger/timbre
:engine #ig/ref :ticean.clara/engine}}
Have you tried restarting the REPL and hitting lein clean
? Potentially there's something left in memory that's causing issues.
Hmm… Same problem. I’m using deps.edn
and I don’t have a compiled target dir. I cleared my .cpcache
. Even deleted ataraxy
and duct/module.ataraxy
from my .m2
and saw that they re-downloaded.
Curious. I just created a blank project to test, and it works fine there. What version of Duct and module.ataraxy are you using?
:deps {duct/core {:mvn/version "0.6.2"}
duct/logger {:mvn/version "0.2.1"}
duct/logger.timbre {:mvn/version "0.4.1"}
duct/module.ataraxy {:mvn/version "0.2.0"}
duct/module.logging {:mvn/version "0.3.1"}
duct/module.web {:mvn/version "0.6.4"}
instaparse {:mvn/version "1.4.9"}
org.clojure/clojure {:mvn/version "1.10.0-alpha8"}
com.cerner/clara-rules {:mvn/version "0.18.0"}}
That rings a bell...
Ah, yes, there was a fix in Ataraxy recently about 1.10 compatibility.
Try adding: ataraxy {:mvn/version "0.4.2"}
to your deps
It’s published? Failing to retrieve it. Could not find artifact duct:module.ataraxy:jar:0.4.2 in central
Not the duct/module.ataraxy library
ataraxy {:mvn/version "0.4.2"}
Add a dependency to Ataraxy to override the version pulled in by the module.