Fork me on GitHub
#figwheel-main
<
2019-01-29
>
joshkh11:01:07

is there a way to watch css directories only if they exist? it feels weird that i have to compile my css for figwheel to start:

$ clj -Afigwheel
[Figwheel] Validating figwheel-main.edn
Configuration error in figwheel-main.edn
-- Spec failed --------------------

  {:css-dirs ["resources/public/css"], :watch-dirs ...}
              ^^^^^^^^^^^^^^^^^^^^^^

should satisfy

  directory-exists?

-- Doc for :css-dirs -----

  A list of CSS source directories to be watched and reloaded into the browser.

      :css-dirs ["resource/public/css"]

-------------------------
Detected 1 error

joshkh11:01:46

(coming from the perspective of cloning the project and running figwheel, and the css dir is not checked into version control)

achikin13:01:46

I have tons of output after compilation and before the repl prompt appears like this

achikin13:01:49

2019-01-29 17:58:24,884 [qtp1983245770-25] DEBUG org.eclipse.jetty.server.HttpChannel - [email protected]{r=69,c=false,a=IDLE,uri=} handle exit, result COMPLETE
2019-01-29 17:58:24,885 [qtp1983245770-25] DEBUG org.eclipse.jetty.io.ChannelEndPoint - filled 0 [email protected]{/0:0:0:0:0:0:0:1:58600<->9500,Open,in,out,-,-,2/200000,HttpConnection}{io=0,kio=0,kro=1}
2019-01-29 17:58:24,885 [qtp1983245770-25] DEBUG org.eclipse.jetty.io.ChannelEndPoint - filled 0 [email protected]{/0:0:0:0:0:0:0:1:58600<->9500,Open,in,out,-,-,2/200000,HttpConnection}{io=0,kio=0,kro=1}
2019-01-29 17:58:24,885 [qtp1983245770-25] DEBUG org.eclipse.jetty.http.HttpParser - parseNext s=START [email protected][p=0,l=0,c=8192,r=0]={<<<>>>HTTP/1.1 101 Swit...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
2019-01-29 17:58:24,885 [qtp1983245770-25] DEBUG o.e.jetty.io.AbstractConnection - fillInterested [email protected][FILLING,[email protected]{/0:0:0:0:0:0:0:1:58600<->9500,Open,in,out,-,-,2/200000,HttpConnection}{io=0,kio=0,kro=1}][p=HttpParser{s=START,0 of -1},g=HttpGenerator{s=START},[email protected]{r=69,c=false,a=IDLE,uri=}]
2019-01-29 17:58:24,885 [qtp1983245770-25] DEBUG o.e.jetty.io.AbstractConnection - FILLING-->FILLING_FILL_INTERESTED [email protected][FILLING_FILL_INTERESTED,[email protected]{/0:0:0:0:0:0:0:1:58600<->9500,Open,in,out,-,-,2/200000,HttpConnection}{io=0,kio=0,kro=1}][p=HttpParser{s=START,0 of -1},g=HttpGenerator{s=START},[email protected]{r=69,c=false,a=IDLE,uri=}]
2019-01-29 17:58:24,885 [qtp1983245770-25] DEBUG o.e.jetty.io.AbstractConnection - FILLING_FILL_INTERESTED-->FILL_INTERESTED [email protected][FILL_INTERESTED,[email protected]{/0:0:0:0:0:0:0:1:58600<->9500,Open,in,out,-,-,2/200000,HttpConnection}{io=0,kio=0,kro=1}][p=HttpParser{s=START,0 of -1},g=HttpGenerator{s=START},[email protected]{r=69,c=false,a=IDLE,uri=}]
2019-01-29 17:58:24,886 [qtp1983245770-25] DEBUG o.e.jetty.io.SelectChannelEndPoint - Local interests updating 0 -> 1 for [email protected]{/0:0:0:0:0:0:0:1:58600<->9500,Open,in,out,R,-,1/200000,HttpConnection}{io=1,kio=0,kro=1}
2019-01-29 17:58:24,886 [qtp1983245770-25] DEBUG org.eclipse.jetty.io.SelectorManager - Queued change [email protected]
2019-01-29 17:58:24,886 [[email protected]/0] DEBUG org.eclipse.jetty.io.SelectorManager - Selector loop woken up from select, 0/4 selected
2019-01-29 17:58:24,886 [[email protected]/0] DEBUG org.eclipse.jetty.io.SelectorManager - Running change [email protected]
2019-01-29 17:58:24,886 [[email protected]/0] DEBUG o.e.jetty.io.SelectChannelEndPoint - Key interests updated 0 -> 1 on [email protected]{/0:0:0:0:0:0:0:1:58600<->9500,Open,in,out,R,-,1/200000,HttpConnection}{io=1,kio=1,kro=1}
2019-01-29 17:58:24,886 [[email protected]/0] DEBUG org.eclipse.jetty.io.SelectorManager - Selector loop waiting on select

achikin14:01:10

This is very annoying because it scrolls away compilation issues

achikin14:01:33

It looks like figwheel-main starts a dev server for me, but I don't need that. How can I disable the dev server?

Jan K14:01:27

Figwheel needs that server, you shouldn't disable it even if you also use your own

Jan K14:01:36

I also get the spammy logs, it happens when I put com.fzakaria/slf4j-timbre in my project dependencies. I configured timbre to blacklist logs from the jetty packages, not sure what you use for your logs.

achikin14:01:36

There is a https://figwheel.org/config-options#log-level config option, but it seems that it does not affect the logs from jetty

Jan K14:01:26

Do you use timbre? If so you can do (taoensso.timbre/merge-config! {:ns-blacklist ["org.eclipse.jetty.*"]}) to suppress those logs

achikin14:01:22

I don't see any traces of timbre in my dependencies

achikin14:01:16

But I use taoensso.tempura

Jan K14:01:26

You can try (require 'taoensso.timbre) to see if there's timbre in your deps, but I guess it could by any logging system that might need some configuration.

Jan K14:01:31

With a minimal project like https://github.com/bhauman/flappy-bird-demo-new the logs don't appear.