This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-06
Channels
- # announcements (2)
- # beginners (110)
- # calva (4)
- # cider (2)
- # cljs-dev (3)
- # cljsrn (1)
- # clojure (83)
- # clojure-dev (56)
- # clojure-italy (2)
- # clojure-nl (6)
- # clojure-uk (19)
- # clojurescript (14)
- # core-async (1)
- # cursive (6)
- # datomic (1)
- # defnpodcast (1)
- # figwheel (1)
- # figwheel-main (87)
- # fulcro (7)
- # graphql (1)
- # luminus (3)
- # off-topic (5)
- # pedestal (6)
- # re-frame (1)
- # reagent (3)
- # shadow-cljs (22)
- # spacemacs (1)
- # specter (12)
I am using fighweel.main to run a ClojureScript project that has re-frame and re-frame-10x. If I start the project from the command line it works correctly, re-frame-10x gets loaded. However, if I try to run the project from emacs/CIDER, it loads ok except for re-frame-10x that is not loaded. The JS console states: > goog.require could not find: day8.re_frame_10x.preload Has anyone succeeded in running a project with re-frame-10x from emacs/CIDER?
Hi. Is there a way to start figwheel-main with http-kit instead of jetty? Sadly, Jetty is not supported by https://github.com/ptaoussanis/sente
@zakora_clojurians it sounds like the classpath is not the same when you start it from CIDER
Do you have any pointer on how to fix this (if it is even possible)? I am pretty new to Clojure and emacs.
the figwheel server will handle websocket communication for reloads, and REPL interaction
Is there an elegant way to start my http-kit from figwheel-main? I mean inside the same process...
I hacked it that way: I have configured a custom :ring-handler
in figwheel-main.edn
. It forwards to my http-kit server. Which is started in the namespace of the figwheel ring handler. Since figwheel loads this namespace, it starts my http-kit. Works fine for me. Thank you for figwheel - I love it!
you can use the clojure
-i
flag to load and run a script to require and run your server.
you can also put the code to start your server in a user.clj
file on your classpath and then use an eval flag -e
(user/start-my-server)
to start it
@bhauman thanks for the hint. Previously I put the re-frame-10x dependency in {:aliases {:figdev {:extra-deps {day8.re-frame/re-frame-10x ...}}}
in deps.edn, but if I move the dependency to {:deps {day8.re-frame/re-frame-10x ...}}
then it works from CIDER.
hi all!
trying to move to figwheel-main, and it almost all works, but if I try to do a uberjar
$ lein uberjar
Deleting non-target project paths [".../target%s"] is not allowed.
Check :clean-targets or override this behavior by adding metadata ->
:clean-targets ^{:protect false} [...targets...]
I think I understand how to fix it
@andrea.crotti I’ve been thinking about this and I think I have a simple solution
but I wonder why it's building in target
instead of resources
like cljsbuild does?
ah yes exactly
so if you are porting its best to put :target-dir "resources"
in figwheel-main.edn
or in the build file metadata
yeah trying now
ok now uberjar works
and btw about porting I found that this resource was quite nice
the only remaining problem is that it doesn't reload
even though it's connected and it looks like it's reloading
it's actually an OSS project so this is how I'm doing it
ahh ok I'll try thanks
would be great to have in the figwheel-main readme at least a short list of things that changed
to just make it easier to see what I need to do
mm unfortunately this blows up
(defn ^:after-load mount-root [page]
(re-frame/clear-subscription-cache!)
(reagent/render [page]
(.getElementById js/document "app")))
Uncaught Error: Invalid arity: 0
I guess it expects the mount function to not take any arguments
mm yeah I have to restructure the code a bit somehow
actually maybe that's the all reason why I had problems with the old figwheel 😄
but the error was so confusing that I just tried to upgrade to fix it
I just have to restructure the code to not need to take an argument probably
@andrea.crotti I’d write a different function entirely
yes sure, it's a bit tricky given how I did it with accountant, but should be feasible
amazing it all works now
thanks for the great work and the help @bhauman!
@andrea.crotti my pleasure!
Hello. I have been having an issue running Fighwheel-main using clojure 1.10.0-beta1. Autobuilds no longer runs. Running on 1.10-alpha8 seems to work. Could anyone confirm? https://github.com/rpkarlsson/figwheel-beta1-rebuild-reprod
Yes. com.bhauman/figwheel-main {:mvn/version "0.1.9"}
Np. Mentioned it to @alexmiller. Will continue to dig around.
@bhauman reverting https://github.com/clojure/clojure/commit/7a6f5527c24b16b9f896725defa538b8e3fd7d28 seems to restore the autobuilds.