This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-17
Channels
- # bangalore-clj (1)
- # beginners (70)
- # boot (1)
- # cider (39)
- # cljs-dev (69)
- # clojure (56)
- # clojure-dev (1)
- # clojure-norway (1)
- # clojure-russia (4)
- # clojure-spec (1)
- # clojure-uk (10)
- # clojurescript (34)
- # clr (3)
- # community-development (3)
- # component (1)
- # datascript (1)
- # datomic (7)
- # emacs (1)
- # figwheel (3)
- # fulcro (5)
- # graphql (2)
- # hoplon (75)
- # jobs (4)
- # jobs-discuss (1)
- # luminus (15)
- # planck (3)
- # portkey (55)
- # re-frame (2)
- # reagent (2)
- # reitit (3)
- # ring (13)
- # ring-swagger (1)
- # shadow-cljs (72)
- # spacemacs (4)
- # tools-deps (2)
- # unrepl (7)
- # vim (2)
just made new template for using psql
but i am getting
db-spec mount.core.DerefableState@1eb6f936 is missing a required parameter
if i try to use function defined in queries.sql
i run project by user/start
@lepistane it looks like the db state isn't started, if it's not referenced anywhere then running (user/start)
won't start the database
mount resolves states based on the namespace hierarchy, so if you have a defstate
in a namespaced that isn't referenced in the project, it's ignored
but in most cases it's better to just reference the namespace where you'll end up using it
as far as i remember it used to be when i use (user/start)
from the repl
i could access functions defined in queries.sql
using project.db.core :as db
then db/create-user! {:something "else"}
and it would work
now same flow gives me errors
i even checked my old project made by following ur book
and it works as expected
either i am doing something wrong or there is bug with newest template i just restared my pc tried getting newest template and running migrations they got stuck
lein run migration
2018-03-17 15:02:04,982 [main] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider
2018-03-17 15:02:05,799 [main] INFO twd.env -
-=[twd started successfully using the development profile]=-
2018-03-17 15:02:06,383 [main] INFO luminus.http-server - starting HTTP server on port 3000
2018-03-17 15:02:06,486 [main] DEBUG io.undertow - starting undertow server io.undertow.Undertow@45c03831
2018-03-17 15:02:06,522 [main] INFO org.xnio - XNIO version 3.3.6.Final
2018-03-17 15:02:06,852 [main] DEBUG io.undertow - Configuring listener with protocol HTTP for interface 0.0.0.0 and port 3000
2018-03-17 15:02:06,986 [main] INFO org.projectodd.wunderboss.web.Web - Registered web context /
2018-03-17 15:02:06,988 [main] INFO luminus.repl-server - starting nREPL server on port 7000
2018-03-17 15:02:07,021 [main] INFO twd.core - #'twd.config/env started
2018-03-17 15:02:07,022 [main] INFO twd.core - #'twd.handler/init-app started
2018-03-17 15:02:07,022 [main] INFO twd.core - #'twd.handler/app started
2018-03-17 15:02:07,022 [main] INFO twd.core - #'twd.core/http-server started
2018-03-17 15:02:07,022 [main] INFO twd.core - #'twd.core/repl-server started
seems like db namespace isnt getting loadedi found solution, it was referenced but there was typo in the code which made it not load btw mount is amazing!
minor question @yogthos
shouldn't this be
https://github.com/yogthos/memory-hole/blob/master/src/clj/memory_hole/middleware.clj#L66
(wrap-identity)
?