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 - HttpChannelOverHttp@6cb7a582{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 SelectChannelEndPoint@6c2a164c{/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 SelectChannelEndPoint@6c2a164c{/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 HeapByteBuffer@4ad6c92f[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 HttpConnection@4c0f1bfa[FILLING,SelectChannelEndPoint@6c2a164c{/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},c=HttpChannelOverHttp@6cb7a582{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 HttpConnection@4c0f1bfa[FILLING_FILL_INTERESTED,SelectChannelEndPoint@6c2a164c{/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},c=HttpChannelOverHttp@6cb7a582{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 HttpConnection@4c0f1bfa[FILL_INTERESTED,SelectChannelEndPoint@6c2a164c{/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},c=HttpChannelOverHttp@6cb7a582{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 SelectChannelEndPoint@6c2a164c{/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 org.eclipse.jetty.io.SelectChannelEndPoint$1@6420692e
2019-01-29 17:58:24,886 [qtp1983245770-20-selector-ServerConnectorManager@3a866444/0] DEBUG org.eclipse.jetty.io.SelectorManager - Selector loop woken up from select, 0/4 selected
2019-01-29 17:58:24,886 [qtp1983245770-20-selector-ServerConnectorManager@3a866444/0] DEBUG org.eclipse.jetty.io.SelectorManager - Running change org.eclipse.jetty.io.SelectChannelEndPoint$1@6420692e
2019-01-29 17:58:24,886 [qtp1983245770-20-selector-ServerConnectorManager@3a866444/0] DEBUG o.e.jetty.io.SelectChannelEndPoint - Key interests updated 0 -> 1 on SelectChannelEndPoint@6c2a164c{/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 [qtp1983245770-20-selector-ServerConnectorManager@3a866444/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.