This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-11
Channels
- # adventofcode (8)
- # announcements (1)
- # arachne (23)
- # beginners (146)
- # boot (4)
- # calva (2)
- # cider (48)
- # cljs-dev (17)
- # clojure (214)
- # clojure-austin (2)
- # clojure-berlin (1)
- # clojure-europe (9)
- # clojure-italy (5)
- # clojure-nl (2)
- # clojure-sanfrancisco (2)
- # clojure-spec (124)
- # clojure-uk (67)
- # clojured (3)
- # clojurescript (95)
- # community-development (7)
- # cursive (68)
- # data-science (1)
- # datomic (80)
- # emacs (19)
- # figwheel (3)
- # figwheel-main (5)
- # fulcro (61)
- # javascript (2)
- # kaocha (1)
- # off-topic (25)
- # pathom (21)
- # pedestal (1)
- # perun (4)
- # reitit (11)
- # ring-swagger (2)
- # shadow-cljs (55)
- # spacemacs (4)
- # sql (8)
- # test-check (16)
- # tools-deps (2)
- # vim (13)
- # yada (4)
is it possible to run say watch
with a config that’s passed in without a shadow-cljs.edn?
I want to do something like this from figwheel
(fig/start {:id "dev"
:options {:main (symbol main)
:nrepl-port 7002
:output-to "target/public/cljs-out/main.js"}
:config {:watch-dirs paths}})
I have a little code visualizer, that updates a page as you make changes, in a ‘target’ project. got it working with figwheel, but need to to get it working with shadow since most of my ui code uses shadow and figwheel doesn’t understand the string requires, etc. I was poking through the devtools api, and it seems like watch can take a map, but i’m not clear on how that ‘maps’ to whats in the normal config file I guess as a workaround I could create a separate build for it in the project that it’s looking at. but I was trying to keep it as self-contained as possibleI'm having a weird issue where despite my locally installed-in-node_modules folder, I have react 16.8.1, but for whatever reason the version getting compiled into my build is 16.7.0
my guess is there's an old dependency from the project that relied on this and I have a cache to clean
@eoliphant that use-case is not currently supported. you can instruct it to watch without a config file just fine but running the complete shadow-cljs instance isolated is not supported. one design choice I made is only allowing one shadow-cljs runtime per JVM. shadow-cljs.edn
is also required currently.
If you explain your use-case a bit more I can maybe relax some of those requirements
maybe the embedded API already solves most of your issues https://shadow-cljs.github.io/docs/UsersGuide.html#embedded
@mattly I just fixed a bug where changes to node_modules
files were not picked up properly by running watch
processes
it should never be possible to get into a state where a freshly started shadow-cljs picks up files that no longer exist or of the wrong version
since 2.7.32
it also shouldn't be possible to get into that state while watch
is running
hey, I'm trying to get chlorine working with shadow-cljs. but for whatever reason when running shadow-cljs there is no socket connection being opened
$ npx shadow-cljs server
shadow-cljs - config: ...\shadow-cljs.edn cli version: 2.7.32 node: v10.15.1
shadow-cljs - socket connect failed, server process dead?
shadow-cljs - HTTP server for :app available at
shadow-cljs - server version: 2.7.32 running at
shadow-cljs - nREPL server started on port 53349
I've seen that in many examples of shadow-cljs a socket repl is started when running shadow-cljs
hm, but it does in some examples, like at the bottom here: https://github.com/thheller/shadow-cljs/wiki/REPL
you can set a fixed port by setting :socket-repl {:port 12345}
in the shadow-cljs.edn
I'm not sure, but I think chlorine is the most fully featured atom clojure package, and it uses socket repl
but yeah I didn't want people looking for random port numbers on startup. tools should just check .shadow-cljs/socket-repl.port
instead
Hey @thheller thanks for the clarification. Based on what you're saying I think, I'll just need to add a build, etc. Basically, I have a little lib that I use to create a sorta generic domain/attribute model. From that model I can generate datomic/relational schemas, APIs, etc. I have a visualizer that uses plantuml, and just spits out an SVG, but I also started working on one that's interactive and dynamically rendered with JS. So the goal was include the lib, and setup a deps alias that runs the viewer against the target ns. Based on what you mentioned about only allowing one shadow instance, what I was trying to do probably won't work. But conversely, adding a :my-viewer build to a project isn't a big deal either
there build-config
is a map as it would appear in the shadow-cljs.edn
with an extra :build-id
key
hmm.. I might be conflating the terms (server, build, etc) a bit and as we’re talking about this, I just realized there’s already a ‘shadowy’ lol, model for what I want to do. In say, fulcro apps, workspaces are conceptually the same thing I’m doing, a different ‘view’ of some portion of my application code. Just adding a ‘build’ and the setup code, is probably fine. Well the way my stuff works, is that I have a DSL, that jams stuff into an internal datascript db (imagine spec’s global registry). So if I add an attribute in say the `mydomain.person’ namespace, that should be reloaded, which updates the db, and my dynamic view shold get updated as well