This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-17
Channels
- # 100-days-of-code (4)
- # announcements (4)
- # aws (2)
- # beginners (88)
- # cider (1)
- # cljsrn (9)
- # clojure (126)
- # clojure-conj (4)
- # clojure-dev (8)
- # clojure-greece (1)
- # clojure-italy (37)
- # clojure-nl (3)
- # clojure-spec (13)
- # clojure-uk (91)
- # clojurescript (392)
- # clojurewerkz (1)
- # clojutre (10)
- # core-async (6)
- # cursive (5)
- # data-science (1)
- # datomic (41)
- # emacs (21)
- # events (1)
- # figwheel-main (52)
- # fulcro (2)
- # hyperfiddle (4)
- # jobs (3)
- # jobs-discuss (9)
- # luminus (3)
- # lumo (9)
- # mount (1)
- # nyc (1)
- # off-topic (73)
- # other-languages (6)
- # pedestal (8)
- # portkey (2)
- # re-frame (9)
- # reagent (8)
- # rum (17)
- # shadow-cljs (38)
- # sql (19)
- # tools-deps (18)
- # yada (4)
Hello! I would like to use Figwheel Main, but can't find any docs, how to connect to REPL started by Figwheel Main from Emacs/Cursive? Is there any guides how to open nREPL port from REPL started by Figwheel Main?
I’m a bit confused about configuration, and specifically what should be in the map and what should be in the metadata of the map
is the map the config that’s passed to clojurescript?
is that documented somewhere?
for clj I followed the tutorial in figwheel-main and just used Cider-jack-in-cljs and it worked.
@jduhamel Hi! I'm using Clj CLI + Spacemacs. Where did you find such tutorial? Here? https://cider.readthedocs.io/en/latest/clojurescript/
@bhauman thanks, but I’m mainly wondering about where I can find information about the options that go into the map
I did find the documentation on the figwheel options (very complete documentation btw, I’m impressed!)
but what are “ClojureScript options” 🙂
I suppose that would be on the clojurescript website somewhere
@stathissideris its linked to on the create a build page
@bhauman Hello, Bruce! Is there any tutorial, how to connect to REPL from Cursive, which run by Figwheel Main?
I use Clojure CLI
@bhauman Thanks. Now a bit more clearer. But, when I run (figwheel.main.api/cljs-repl "dev") it hangs my REPL in Cursive and Chrome console tells me "WebSocket connection to '<ws://localhost:3449/figwheel-ws/dev>' failed:"
@bhauman I always used lein-figwheel and it works very straightforward. Now, I'm trying to migrate my configs for Figwheel Main and I think I mixed some configuration for both (lein-figwheel and Figwheel Main). I'm trying to achieve next workflow: 1. Run REPL using clojure CLI from terminal with Rebel support 2. Run Figwheel Main and switch REPL from CLJ to CLJS mode 3. Connect to REPL from Cursive or Spacemacs using remote connection 4. have fun with coding CLJS and FigWheel and eval sexp from IDE, not terminal It would be nice to have such guide
Did you try to start with https://github.com/bhauman/figwheel-main-template ?
@bhauman thanks, and sorry, I hadn’t seen the link! I think I was just missing the name for it (“compiler options”)
@zane I looked into the asyc loading problem, and it seems that I solved it long ago and forgot about it
so if a you are calling a main function and its not available, it would be interesting to trace when it’s getting called compared to when the file is actually loading
I think this happens because when figwheel is loading it takes over the loading of dependencies at that point
@bhauman i've made a little progress in debugging my lein fig;test
issue:
By using -pc and looking at the source I found the reason my :output-dir changed in my client's code, but not in the template code:
It's because in the template code example the :dev profile has :resource-paths ["target"]
which causes should-add-temp-dir? to be false in
https://github.com/bhauman/figwheel-main/blob/master/src/figwheel/main.cljc#L559
By adding (in my client project.clj) :resource-paths ["target"]
now :output-dir/:output-to are the
expected [Figwheel] Compiling build test to "target/public/cljs-out/test-main.js"
The next problem is that while I mimic what the template does by creating a test HTML file in resources/public/test.html
when running the test (using the example in test.cljs.edn of :open-url "http://[[server-hostname]]:[[server-port]]/test.html"
) the actual URL is not found?
The symptom is that the test hangs at:
Launching Javascript environment with script: ["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" "--headless" "--disable-gpu" "--repl" :open-url]
Environment output being logged to: target/public/cljs-out/test/js-environment.log
And a the process is still running:
tmarble@tmarble 43 :) ps -ef | grep headless | grep -v -E '(Helper|grep)'
502 97428 97424 0 2:23PM ttys002 0:00.98 /Applications/Google Chrome.app/Contents/MacOS/Google Chrome --headless --disable-gpu --repl
tmarble@tmarble 44 :)
And trying to load
in a normal browser tab shows:
Figwheel Server: Resource not found
Keep on figwheelin' yep
OMG I fixed the this last problem by completely commenting out... (from the client project.clj)
;; Avoid contamination of AOT artifacts (e.g. during uberjar) vs dev artifacst
:target-path "target/%s/"