This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-15
Channels
- # 100-days-of-code (3)
- # announcements (14)
- # beginners (100)
- # calva (20)
- # cider (50)
- # cljdoc (29)
- # cljs-dev (6)
- # clojure (78)
- # clojure-europe (1)
- # clojure-italy (8)
- # clojure-losangeles (1)
- # clojure-nl (11)
- # clojure-uk (108)
- # clojurescript (23)
- # code-reviews (5)
- # cursive (7)
- # datomic (11)
- # devops (1)
- # editors (1)
- # figwheel-main (65)
- # fulcro (114)
- # hoplon (31)
- # hyperfiddle (1)
- # juxt (4)
- # lein-figwheel (2)
- # nrepl (13)
- # off-topic (72)
- # re-frame (35)
- # reagent (9)
- # shadow-cljs (42)
- # spacemacs (2)
- # specter (5)
- # tools-deps (60)
- # yada (2)
@kwladyka I have verified that figwheel does indeed watch directories outside of the local project directory. This is on OSX, and all I’m doing is adding directories to watch-dirs:
@kwladyka if this isn’t happening for you please file a detailed issue, because I do want to support this
I remember I had an error path can’t be outside project directory about 2 months ago
@dimovich I have not been able to reproduce this behavior, I am able to have multiple clients locally and non locally all receive reload broadcasts at the same time
@bhauman, thanks for trying it out again! I guess we have some magical combination of libraries or sth 🙂. Btw, where is located the code that broadcasts these messages?
@richiardiandrea you can have command line testing if you run run tests from the command line see “Custom testing with :extra-main-files”
if you run that from the command line you will see the test output on the command line whenever the code reloads
Is there a way to add my own CSS pre-processor but still tie in to Figwheel path watching?
That is, telling Figwheel to watch my SCSS files and when they change run my custom function, then push the new generated CSS files to the browser
You could have a separate process process watching scss files and writing to resources/public/css/style.css. When the scss files, the style compiler creates a new output css, which figwheel sees @orestis
@bhauman I was just adding support for figwheel main to JUXT's build tool (meaning edge will soon be upgrading too). I notice that cljsjs support was added ❤️.
@orestis with sidecar, I sovled this by using my own filewatcher. I think a potential solution here is a more "a la carte" figwheel, where there's a notify callback you can call on a whim, this should make it easier to integrate figwheel into other build tools.
How do you mean? The scripting API is not quite as full featured yet as the “main” command line functionality, if I understand correctly.
I mean, one option is to have a figwheel without the filewatcher, where you call a function to notify the browser.
fwiw, within 15m I expect kick will support doing this for you, at least partially. (Both file watchers will be on).
@bhauman Am I setting myself up for bad things™ by having :watch-dirs
point at directories which don't contain cljs? Or is that more of a "warning" than an "error"? Things seem to work okay.
We've been passing that (mapv str classpath-dirs)
up until now also, so I guess it's the same failure cases (that we haven't seen).
🙈 I'm filling in defaults for people. It's probably okay, I always put stuff in "src".
Although, I have just noticed that this now causes figwheel to try and build all cljs on the classpath, which means that the injector I wrote which only works with sidecar is being compiled, which is failing the compile…
I’m having an issue where, nearly as soon as it connects, the repl host page throws [goog.net.WebSocket] The WebSocket disconnected unexpectedly: undefined
. The command-line repl then exits without error. Can anybody give me a hint on how to start troubleshooting this?
@bhauman for deps.edn I can probably filter out a lot of things by parsing the clojure.libfile
system property...
Of course, this then makes it harder to have a mono-repo, where cljs lives in adjacent :local/repo
, as those directories won't get watched for cljs changes. Bah.
[:main]
seems like it would solve my immediate problem :thinking_face: but would then force users to provide extra inputs for their test namespaces...
Needs some thinking. Best solution is probably to just have kick split into multiple projects, each with their own deps. Then all cljs on the classpath always compiles, presumably that's true for most clojurescript. Maybe not.
I have "solved" the problem by doing:
[:main]
+ looking at a system property that clojure sets called "libfile" which allows me to find all the libraries used to start the classpath. Using that, I filter those directories out of the classpath, so you end up with src/test/blah.
You're out of luck if you use kick with boot/lein, but I doubt anyone does. I also don't think they'll run into any issues as they probably aren't using gitlibs/local deps anyway, and if they are, I expect libfile to be set.
I started an empty project. Contains only the code from the tutorial and it still occurs.
I once saw Exception in thread "main" clojure.lang.ExceptionInfo: Eval timed out!
fly by but just once.
Of course, this then makes it harder to have a mono-repo, where cljs lives in adjacent :local/repo
, as those directories won't get watched for cljs changes. Bah.
I take it a Figwheel session ID is given to the client before the websocket has finished connecting, then?