DrLjótsson 2020-05-11T06:25:21.198700Z

I'm following the guide on to get started with figwheel-main. I run

lein trampoline run -m figwheel.main
which works fine, BUT I get hundreds of DEBUG logg messages from org.eclipse.jetty.server in the terminal. How can I shut them off? I have tried putting org.eclipse.jetty.util.log.announce=false in a jetty-logging.propertiesfile in the resources directory and adding Dorg.eclipse.jetty.util.log.announce=false to :jvm-opts in project.clj. Neither works.

DrLjótsson 2020-05-11T06:39:58.199100Z

I solved it! I edited logback.xml.


morning all!


I was trying to trigger builds with figwheel and I noticed something quite weird, evaluating a function like

(defn build
  (with-config-overrides {:auth-disabled true}
    (ig.repl/set-prep! (constantly automation-config))
    (fm/build-once :automation)
would actually log Build id not found: automation


so the build runs even just by evaluating the function


which I can see also from

e2e.common> (macroexpand '(fm/build-once :automation))
Build id not found: automation


and also strangely it never finds that build, but if I do (fm/start {:mode :build-once} "automation") it works, even though it's still watches for changes, it doesn't do it only once


this lein run -m figwheel.main -- -bo automation seems to be the only thing that behaves the way I would expect, it builds only once and then quits

bhauman 2020-05-11T14:57:56.209500Z

@andrea.crotti yes the build-once command in the cljs repl is intended to take an available build and build it once

bhauman 2020-05-11T15:02:33.211200Z

@andrea.crotti there should be a way to use fm/start to build once without starting a watch process

bhauman 2020-05-11T15:03:16.211900Z

but there should probably be a short hand for this


Yeah I'm in the clj repl, I'm using it to run smoke tests in ci, so it should build once and start jetty for example


But the question was also, how come it build-once seems to be doing something at macro expansion time?


And so I have to use start then right? I'll try to find the option to not make it watch then, I thought it was just mode: build-once like I tried but it wasn't enough

bhauman 2020-05-11T15:08:03.217300Z

fm/build-once is intended only for use in the cljs-repl


Ah ok understood

bhauman 2020-05-11T15:09:18.218Z

its part of an api for interacting and modifying running builds

bhauman 2020-05-11T15:10:46.219500Z

@andrea.crotti it could be that fm/start doesn’t handle build-once correctly. That is certainly possible. It’s a straightforward fix if it doesn’t

bhauman 2020-05-11T15:11:23.219800Z

I add that to my list


ok thanks I'll check again


I mean I could use the lein command but it should work in the repl as well

bhauman 2020-05-11T16:47:03.221300Z

@andrea.crotti absolutely


so looks like I was using start from figwheel.main instead of figwheel.main.api, but well it still starts the watcher as well if I call (fma/start {:mode :build-once} :automation)

bhauman 2020-05-11T16:54:20.222700Z

cool its on my list

bhauman 2020-05-11T16:54:23.222900Z



ah wait a moment, I had watch-dirs set in that build config file


so well now it doesn't watch anything anymore. I guess it could still avoid watching if you pass build-once, but yeah it's kind of silly to have watch-dirs in the config anyway


so not a real bug probably


but btw should build-once maybe not be in a cljs file instead of cljc?

bhauman 2020-05-11T17:00:55.225900Z

its a macro 🙂

bhauman 2020-05-11T17:01:50.227100Z

and it needs to be one as its a hack, the complier evals macros in the running clojure process

bhauman 2020-05-11T17:02:27.227800Z

and thus we can reach the clojure process from the cljs repl

bhauman 2020-05-11T17:03:02.228300Z

but it sure as heck should have some docs on it


uhm actually I take it back again, it doesn't watch now but it doesn't run the build once either, the process stays running


so yeah build-once is just not doing anything I guess


and the other thing is that I can't even do (fma/stop :automation) if I started it with the build-once option, it says it wasn't registered, but if I do (fma/stop-all) it kills it