This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-27
Channels
- # beginners (54)
- # bitcoin (2)
- # boot (1)
- # calva (10)
- # cider (30)
- # cljs-dev (25)
- # cljsrn (17)
- # clojure (27)
- # clojure-dev (16)
- # clojure-estonia (3)
- # clojure-hk (1)
- # clojure-italy (8)
- # clojure-losangeles (1)
- # clojure-nl (17)
- # clojure-russia (1)
- # clojure-spec (15)
- # clojure-uk (45)
- # clojurebridge (1)
- # clojurescript (95)
- # clojurescript-ios (1)
- # core-async (5)
- # cursive (10)
- # datomic (8)
- # emacs (2)
- # figwheel-main (31)
- # fulcro (99)
- # hyperfiddle (3)
- # immutant (1)
- # jobs (13)
- # jobs-discuss (82)
- # keechma (6)
- # leiningen (3)
- # lumo (1)
- # nrepl (1)
- # off-topic (37)
- # onyx (1)
- # pedestal (6)
- # re-frame (7)
- # reitit (2)
- # remote-jobs (1)
- # ring-swagger (3)
- # rum (6)
- # shadow-cljs (14)
- # specter (4)
- # tools-deps (27)
- # yada (12)
@bhauman First attempt at Cursive documentation is PR’ed - if I have the time tomorrow I will try and tackle the combined project, let me know if you want anything changed (or feel free to change it yourself as desired). I’m planning to also get some screenshots and maybe a gif of the steps if I can figure out a nice way to do it.
Hey! I'm having issues using ^{:watch-dirs ..}
when using extra-paths
in my alias. Somehow first compilation fails and I get goog.require could not find: ..
errors.
Nothing specific in the REPL. Is there a way to access more logs to troubleshoot this?
Oh actually figured I have to put the whole paths in watch-dirs
, not just the specific path I am interested with.
When I compile a production build with these settings:
:foreign-libs [{:file "../foo/bar.js",
:provides ["react"
"react-dom"
"create-react-class"
"react-dom/server"]
:global-exports {react React
react-dom ReactDOM
create-react-class createReactClass}}]
a funny thing happens: it creates a directory foo/
in the cwd and copies the files thereMy expectation is that the compiler uses ../foo/bar.js
. Is this because I'm using a file that is outside the cwd?
Not sure if it's figwheel or the cljs compiler that's doing that. The funny thing is that this doesn't seem to happen with dev builds
@pesterhazy yeah figwheel doesn’t do anything with these opts they just get apssed to the compiler, so you are looking at the compilers behavior
Hey there, is it possible to use figwheel-main to hot reload server code? If not, any suggestions how I might go about that?
@jstaab AIUI that's not figwheel's job (it's about ClojureScript). So figwheel is orthogonal to server-side reloading, and you can use the same techniques you'd use otherwise for reloading server code in a JVM that also runs Figwheel
Ok, thanks — I have more questions on how to do that in general, but I'll move this to the appropriate channel . Any suggestions on where to take the discussion?
Integrant may be a good starting point yes
One thing to consider is whether you really want a file-watching based dev cycle
Usually with Clojure is super easy to just connect to the running repl and re-evaluate the current buffer
The advantage is that you get compile errors etc. right there in your Emacs buffer (or Atom or ....)
The final step then is to restart the web server, which is sometimes required (e.g. when you change the routes)
You can do that from repl too, or have some kind of hook that executes after reloading the buffer
Is there an example out there I could take a look at? I've never quite grokked the whole "live in the repl" lifestyle with lisps.
I highly recommend reading this https://clojure.org/guides/repl/introduction
It’s an excellent intro to the repl
And to clarify, file-watch based vs reload buffer from editor is just a matter of resources? or control of when/if something gets reloaded?
@jstaab I've got integrant working nicely with figwheel-main - not auto-reload, but on each change it's easy to refresh with a command in the repl. https://skillsmatter.com/skillscasts/9820-enter-integrant-a-micro-framework-for-data-driven-architecture-with-james-reeves is a good video introduction for Integrant https://vimeo.com/223309989 is a good video for repl based development
@jstaab I've not experimented with it, but figwheel-main also has an option for reloading Clojure files - https://figwheel.org/config-options#reload-clj-files No idea how it would work for what you are looking for, though
I'm actually using shadow-cljs for my client-side stuff; I was only looking at figwheel-main because it was the word in my head associated with "hot reloading"
If you're looking for server side, I think figwheel vs. shadow-cljs is probably the wrong place to spend time on - they are both pretty much concerned with the client side. I've been really happy with Integrant for the server side aspect but there are definitely other options (mount, component, etc).