This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-28
Channels
- # announcements (9)
- # aws (2)
- # beginners (45)
- # biff (2)
- # calva (20)
- # cider (4)
- # cljdoc (15)
- # cljs-dev (9)
- # clojure (102)
- # clojure-austin (14)
- # clojure-europe (39)
- # clojure-france (3)
- # clojure-germany (1)
- # clojure-norway (39)
- # clojure-spec (1)
- # clojure-uk (3)
- # conjure (8)
- # cursive (6)
- # datahike (3)
- # datomic (8)
- # emacs (28)
- # events (1)
- # holy-lambda (6)
- # hyperfiddle (13)
- # jobs (11)
- # keechma (2)
- # lsp (4)
- # malli (33)
- # nbb (36)
- # off-topic (52)
- # pathom (5)
- # pedestal (2)
- # portal (1)
- # reagent (2)
- # reitit (3)
- # remote-jobs (1)
- # scittle (1)
- # spacemacs (2)
- # xtdb (5)
Is there some way to work around this issue I have with multiple terminators? I have the following (example) routes:
["/resource/{id}" {:name :resource/page}]
["/resource/{id}.json" {:name :resource/json}]
["/resource/{id}/thing" {:name :resource/thing}]
When compiling the routes I get:
Execution error (ExceptionInfo) at reitit.exception/exception (exception.cljc:19).
:reitit.trie/multiple-terminators
{:terminators (".json" "/thing"), :path "/resource/{id}"}
I cannot change the URIs of the things as this is an existing service that I'm trying to put reitit into.A good question. You could force a linear-router (via an option to reitit.core/router
), but then you would lose a lot of perf, if that matters. The error is raised from the trie compilation (https://github.com/metosin/reitit/blob/3dff4c84aa748618cafc561e16ecdecf90ce87fb/modules/reitit-core/src/reitit/trie.cljc#L362), don't have a quick solution on how to change that. Long time since that code has been created/touched.
Thx, I'll try the linear router suggestion. Routing perf is probably not that big a deal in this service. 🙏
👍 1