This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-04
Channels
- # atom-editor (2)
- # babashka (39)
- # beginners (123)
- # calva (90)
- # cider (57)
- # clojure (103)
- # clojure-australia (13)
- # clojure-europe (38)
- # clojure-france (3)
- # clojure-italy (13)
- # clojure-nl (7)
- # clojure-norway (2)
- # clojure-seattle (1)
- # clojure-uk (22)
- # clojurescript (28)
- # conjure (20)
- # cursive (2)
- # datascript (1)
- # datomic (20)
- # depstar (23)
- # emacs (1)
- # events (2)
- # graphql (12)
- # honeysql (4)
- # jobs (2)
- # kaocha (2)
- # malli (14)
- # music (2)
- # off-topic (103)
- # pathom (8)
- # polylith (7)
- # quil (3)
- # reagent (7)
- # reitit (2)
- # remote-jobs (1)
- # shadow-cljs (55)
- # slack-help (4)
- # spacemacs (29)
- # xtdb (16)
Ok. I am using React Native and Expo with an iOS simulator. I got the IP addresses to line up and disabled fast refresh on the simulator. When I refresh my code the simulator displays the new set up immediately, then reloads the previous state. What am I doing wrong?
sorry I don't use react-native or expo and it has been a couple years since I tested this. there used to be a separate expo reload. no clue if that still exists. I cannot help you track this down but if you see two reloads then this is the most likely cause.
Hey all! I recently just updated my shadow version on a project (from 2.8 to 2.11) and am now seeing a "Failed to inspect file <path>.css" - it's coming from a JS file that is built and imports a CSS file via require. I would expect this issue https://github.com/thheller/shadow-cljs/issues/598 to have solved this, but maybe I'm missing something. I also kinda remember an ignore-resources
option existing once, but I'm not sure if I'm misremembering
Any tips on how to best resolve this?
(Also, interestingly, the same application compiles fine under 2.8)
@rschmukler the default changed from ignoring asset css requires to failing them so they don't go unnoticed. you can set :js-options {:ignore-asset-requires true}
to get the old behaviour
Wonderful, thank you for the help! Is this potentially worth documenting in the user-guide? I will add a comment to that issue as well
Having a problem with inspect - my taps are not showing up in the Inspect stream. I have devtools.preload
in the :preloads
. Has something changed?
Ah, that is the console.log formatter, never mind. But yea sounds like I should be seeing taps, but I'm not seeing any.
don't know what you are doing so really can't help much. try shadow-cljs browser-repl
or shadow-cljs node-repl
and see if those show up
I'm running tap>
in my code that runs in the browser, then trying to inspect those values in
I'm sure the tap>
s are getting executed because I have console logging on the same code path
the tap> is only setup after the ready
message so if you log before that it won't make it to the UI
Would you accept a PR to have the shadow tap listener queue messages until the page is ready, then flush?
if you do it in a clean way. the way this is currently set up this isn't easily possible.
I am watching my source files using Hawk. Ordinarily, when I hit save, I get 1 :modify event as expected. However, when running Shadow in watch mode, saving a single file results suddenly in all that io:
:hawk :create #object[java.io.File 0x18f77246 /home/adam/projects/clj/helins/medium/src/dev/helins/medium/4913]
:hawk :modify #object[java.io.File 0x52954b80 /home/adam/projects/clj/helins/medium/src/dev/helins/medium/4913]
:hawk :delete #object[java.io.File 0x58038f69 /home/adam/projects/clj/helins/medium/src/dev/helins/medium/4913]
:hawk :delete #object[java.io.File 0x7f50d4a /home/adam/projects/clj/helins/medium/src/dev/helins/medium/dev.cljc]
:hawk :create #object[java.io.File 0x43e0fe21 /home/adam/projects/clj/helins/medium/src/dev/helins/medium/dev.cljc~]
:hawk :create #object[java.io.File 0x393148d /home/adam/projects/clj/helins/medium/src/dev/helins/medium/dev.cljc]
:hawk :modify #object[java.io.File 0x3fffaee3 /home/adam/projects/clj/helins/medium/src/dev/helins/medium/dev.cljc]
:hawk :delete #object[java.io.File 0x4b70ec0a /home/adam/projects/clj/helins/medium/src/dev/helins/medium/dev.cljc~]
Is that normal?shadow is just watching. it never modifies your source files ever, it only reads. the events happening are done by you
Hmmm, weird, I get that behavior only when Shadow is running (same editor and all...)
But yeah, I was surprised at the idea it might modify anything in the source
i'm attempting to startup up a :deps true
style project with CIDER. I'm getting the dreaded "missing instance". I remember reading in the users guide (although i can no longer find it) that if i made sure ensure that shadow's middleware was included all would be good. I'm attempting:
/usr/local/bin/clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.8.3"} cider/piggieback {:mvn/version "0.5.2"} cider/cider-nrepl {:mvn/version "0.25.8"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[\"cider.nrepl/cider-middleware\",\"shadow.cljs.devtools.server.nrepl/middleware\",\"cider.piggieback/wrap-cljs-repl\"]"]}}}' -M:test:cider/nrepl
and then
(do (require '[shadow.cljs.devtools.api :as shadow]) (shadow/watch :app) (shadow/nrepl-select :app))
after startup and i'm still getting the missing intance message. Is there something i'm skipping over?hopefully that makes it clearer in the future https://github.com/thheller/shadow-cljs/commit/c7c831e19851ff4ef1fa4967abb60b469fc76b98
ah i'm sorry. I've found (and documented before) that i need to call (shadow.cljs.devtools.server/start!)
@dpsutton yeah missing instance always means that shadow-cljs has not been started in the JVM you are connected to. which won't happen if you just start an nrepl server like the command above.
the strange thing is i had npx shadow-cljs server
which includes :nrepl {:port 8701}
. My understanding is that it would have been the server
the above commands starts its own nrepl server in a new JVM which cider then probably connects to
if you want to do it absolutely correctly and the way it is intended then DO NOT configure a fixed :nrepl
port and instead look up the port in .shadow-cljs/nrepl.port
haha. i know more about it than only 2 or 3 people and i'm still working it out 🙂 Trying to figure out how to setup
for local dev
Hello, I use emacs/cider and have a clojurescript project build with shadow cljs. I connected to the nrepl server, but I'm not able to send s-expressions to the repl with C-c C-e
like I normally do. Can someone here me with this?
wanna chat in #cider for the time being? Most likely an issue with setup and not actually shadow
nah. its a single comment and if anyone has a similar issue maybe they'll be directed to #cider
hi there—think im running into a user error here when trying to override config from the repl. ive been trying to walk this path:
(shadow/compile
:build1
{:config-merge
{:closure-defines '{ true}}})
and i must be getting something slightly off because it gives the error that the structures can't be merged. the exception makes it look like the structure is a seq
of map entries rather than a map potentially? sincere apologies if ive missed something in the manual that addresses this use-casei actually think the solution im aiming for will eliminate the need to do this, but in general this seemed like something someone might want to do
ah, impeccable what a few minute break and a glass of water will do. this works as expected:
(shadow/compile
:build1
{:config-merge
[{:closure-defines '{ true}}]})
which makes sense in hindsight. apologies for the noise!I'm running tap>
in my code that runs in the browser, then trying to inspect those values in