figwheel

general discussion about figwheel, specific discussions in #figwheel-main and #lein-figwheel
Oliver George 2018-08-12T02:19:41.000011Z

Some quick feedback as I play with figwheel.main - Seems odd to me that I can't refer to a filename for -b. Stated another way it's odd that there's a requirement that build option files end in .cljs.edn. I see the superficial benefit of simpler/shorter invocations but cost of unnecessary opaqueness and forcing filename conventions seems. Perhaps that boils down to "it's easy but not simple".

Oliver George 2018-08-12T02:19:58.000003Z

(but know that I love figwheel and appreciate all your hard work)

bhauman 2018-08-12T15:46:44.000053Z

There's a long explaination as to why this works the way it does

bhauman 2018-08-12T15:51:58.000038Z

it's mostly because a build files purpose is to create an id. This id has a lot of value in to the build process in terms of isolating it from other builds. The id informs where output files go, it informs which REPL connects to which open tab, it is a handle that is used in the scripting api. A concise id is a semantic handle that is much better than I the more general path for all of these uses. I also want to differentiate the -b option from the -co option and make it similar to how folks are accustomed to using figwheel and cljsbuild.

bhauman 2018-08-12T15:52:11.000024Z

@olivergeorge ^

souenzzo 2018-08-12T16:11:52.000008Z

hello I'm using figwheel-sidecar.repl-api/start-figwheel! and [figwheel-sidecar "0.5.16"] I tryied to add :ring-handler next to compiler and inside figwheel map, and both fail (f/start-figwheel! {:builds [{:figwheel {} :compiler {}}]}) Where should I add it?

souenzzo 2018-08-12T16:12:44.000031Z

Next to compiler:

:ring-handler server.core/index-handler
^---- The key :ring-handler should probably be :warning-handlers

bhauman 2018-08-12T16:13:30.000095Z

https://github.com/bhauman/lein-figwheel#scripting-figwheel

1👍
bhauman 2018-08-12T16:13:40.000005Z

it needs to go in :figwheel-options

souenzzo 2018-08-12T16:15:10.000073Z

Exception Unable to resolve spec: :figwheel-sidecar.schemas.config/cljs-build-fn strictly-specking-standalone.spec/the-spec (spec.clj:143)

bhauman 2018-08-12T16:15:47.000024Z

that sounds like a different problem entirely

bhauman 2018-08-12T16:15:56.000050Z

are you using Clojure 0.1.9?

bhauman 2018-08-12T16:16:09.000041Z

oh

souenzzo 2018-08-12T16:16:11.000030Z

1.10.0-alpha6

souenzzo 2018-08-12T16:16:48.000025Z

That is because I'm still using figwheel-sidecar, not? I will try to move to figwheel-main

bhauman 2018-08-12T16:17:13.000019Z

I have no idea what is causing that error

bhauman 2018-08-12T16:17:16.000056Z

it makes no sense

bhauman 2018-08-12T16:17:43.000062Z

I'd start again fresh

souenzzo 2018-08-12T16:23:47.000081Z

Connecting to local nREPL server...
Clojure 1.10.0-alpha6
nREPL server started on port 40991 on host 127.0.0.1 - <nrepl://127.0.0.1:40991>
(require 'figwheel-sidecar.schemas.config)
=&gt; nil
(user/start)
Exception Unable to resolve spec: :figwheel-sidecar.schemas.config/cljs-build-fn  strictly-specking-standalone.spec/the-spec (spec.clj:143)
(require '[clojure.spec.alpha :as s])
=&gt; nil
(s/describe :figwheel-sidecar.schemas.config/cljs-build-fn)
Exception Unable to resolve spec: :figwheel-sidecar.schemas.config/cljs-build-fn  clojure.spec.alpha/reg-resolve! (alpha.clj:69)
(strictly-specking-standalone.spec/describe :figwheel-sidecar.schemas.config/cljs-build-fn)
Exception Unable to resolve spec: :figwheel-sidecar.schemas.config/cljs-build-fn  strictly-specking-standalone.spec/the-spec (spec.clj:143)

bhauman 2018-08-12T16:24:45.000019Z

yeah that wont work because figwheel-sidecar is using a vendored version of spec

souenzzo 2018-08-12T16:25:36.000042Z

There is a (strictly-specking-standalone.spec/describe :figwheel-sidecar.schemas.config/cljs-build-fn) too

souenzzo 2018-08-12T16:26:37.000040Z

The project is here: https://github.com/souenzzo/my-next-stack/blob/master/dev/user.clj#L56 With a :figwheel-options {:ring-handler 'server.core/index-handler} on this line (this handler also not commited)