This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-01
Channels
- # atom-editor (11)
- # babashka (25)
- # beginners (142)
- # boot (9)
- # calva (3)
- # cider (19)
- # clara (15)
- # clj-kondo (6)
- # cljs-dev (20)
- # clojars (11)
- # clojure (164)
- # clojure-dev (9)
- # clojure-europe (6)
- # clojure-italy (17)
- # clojure-nl (3)
- # clojure-spec (19)
- # clojure-sweden (10)
- # clojure-uk (23)
- # clojurescript (34)
- # code-reviews (31)
- # conjure (20)
- # cursive (14)
- # datomic (54)
- # emacs (1)
- # fulcro (51)
- # graalvm (24)
- # graphql (6)
- # helix (3)
- # jobs (3)
- # kaocha (1)
- # malli (2)
- # meander (15)
- # off-topic (81)
- # pathom (2)
- # re-frame (43)
- # reagent (26)
- # reitit (1)
- # releases (1)
- # sci (12)
- # shadow-cljs (29)
- # sql (22)
- # timbre (3)
- # tools-deps (15)
hi, i'm working with a cljc file project.cljc
and shadow's complaining that a clojure-only keyword doesn't exist even though it's only referenced inside a #?(:clj ...)
reader conditional. the offending code:
(ns glam.models.project
(:require #?(:clj [glam.neo4j.project :as prj])
#?(:clj [glam.neo4j.core :refer [one rename-id]])
#?(:clj [com.wsscode.pathom.connect :as pc])))
#?(:clj
(pc/defresolver all-projects [{:keys [neo4j current-user]} _]
{::pc/output [:project/id]}
(prj/get-document-ids neo4j)))
the error:
X Compilation failed.
------ ERROR -------------------------------------------------------------------
File: [...]/glam/models/project.cljc:8:18
--------------------------------------------------------------------------------
5 |
6 | #?(:clj
7 | (pc/defresolver all-projects [{:keys [neo4j current-user]} _]
8 | {::pc/output [:project/id]}
------------------------^-------------------------------------------------------
glam/models/project.cljc [line 8, col 18] Invalid keyword: ::pc/output.
--------------------------------------------------------------------------------
9 | (prj/get-document-ids neo4j)))
10 |
11 | #?(:clj
12 | (pc/defresolver get-project [{:keys [neo4j]} {:project/keys [id]}]
--------------------------------------------------------------------------------
if I expand the keyword and write :com.wsscode.pathom.connect/output
the error of course goes away, but it'd be nice to avoid that
@lgessler the pc
alias needs to exist in CLJS as well. otherwise the code isn't readable. consider it a quirk in clojure and tools.reader since both have this issue. not something shadow-cljs can do anything about.
in shadow-cljs.edn
what’s the difference between
:dev-http {8000 "resources/public"}
and
:devtools {:http-root "resources/public"
:http-port 8000}
?the second converts to :dev-http
. use :dev-http
. the :devtools
http stuff is deprecated
thanks!
Hi, just started learning CLJS and I'm interested in trying this out: https://blog.fikesfarm.com/posts/2015-06-15-see-js-in-cljs-repl.html . I've tried setting :repl-verbose true
in devtools
in my shadow-cljs config file, but that didn't seem to do anything. Does anyone know if this is possible in combination with shadow-cljs?
I think it shouldn’t be in the devtools
, probably in the first level of the edn, but I haven’t test it before
:repl-options {:repl-verbose true}
Hi! Is there a way to reset the Inspect tab of the shadow server so that I can easily see new values that have been tap-ed to it? Thanks!
@thheller Hey quick question, is it easy for shadow to warn when an underscore is included as an actual clojure namespace symbol?
because I just started work at a new place and their project compiled fine under CLJS in a build script but shadow timed out with "par-timeouts"
@royalaid not even aware that was an issue. it should be warning already if the filename doesn't match the expected ns name but maybe it doesn't