This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-25
Channels
- # beginners (152)
- # boot (4)
- # bristol-clojurians (1)
- # cider (1)
- # cljs-dev (176)
- # clojure (104)
- # clojure-china (2)
- # clojure-uk (6)
- # clojurescript (6)
- # core-async (23)
- # cursive (4)
- # datomic (3)
- # devops (1)
- # duct (32)
- # events (1)
- # fulcro (9)
- # hoplon (2)
- # jobs-discuss (9)
- # lein-figwheel (2)
- # leiningen (3)
- # off-topic (19)
- # pedestal (2)
- # portkey (14)
- # re-frame (20)
- # reagent (41)
- # rum (4)
- # shadow-cljs (26)
- # tools-deps (1)
- # unrepl (5)
@beta1036 It shouldn’t be unless there’s a key in the configuration that references it.
By “loaded” you mean loading the namespace, or having it as a dependency?
the cascading namespace is loaded and that fails, because I excluded compojure from the dependencies.
Does your prepped configuration have :duct.router/cascading
?
What’s the exception?
CompilerException java.io.FileNotFoundException: Could not locate compojure/core__init.class or compojure/core.clj on classpath., compiling:(duct/router/cascading.clj:1:1)
What’s the stacktrace?
Try commenting out the line that excludes Compojure from the dependencies, and then prepping the configuration
and the config is
{:duct.core/project-ns demo
:duct.core/environment :production
:duct.module/logging {}
:duct.server.http/aleph {}
:duct.module.web/api {}
:duct.module/ataraxy
{[:get "/example" #{?q}] [:example ?q]}
:demo.handler/example
{}}
Also, what versions are you using?
duct/core "0.6.2", duct/module.web "0.6.4", duct/module.ataraxy "0.2.0", duct/server.http.aleph "0.1.2"
What does the configuration look like when you include Compojure in your deps and prep it?
It looks like the cascading router has been inserted into the configuration by something.
Maybe, though it’s not supposed to. It might be an issue with the ordering of modules. Try adding a blank :duct.router/ataraxy {}
to your configuration and see if that helps.
Looks like an ordering issue. I believe I understand why the problem occurs. I’m refactoring how module dependencies work for the next version, so it shouldn’t be an issue for much longer.
It’s in duct/core, but I’m still experimenting with the behaviour. I don’t have a full write-up yet, but there are a few comments where I’ve written down ideas (https://github.com/duct-framework/core/issues/6#issuecomment-355597276)
The main changes are: Integrant gets refsets and prep-key Duct core gets #duct/include Modules and normal configuration keys are separated
The new design has a number of advantages, and I have a full explanation/migration document planned. There will be a few breaking changes, but I’ll explain them in the migration guide.