figwheel

general discussion about figwheel, specific discussions in #figwheel-main and #lein-figwheel
reefersleep 2020-05-14T11:50:50.050600Z

@bhauman yes, it’s a part of the :plugins vector.

bhauman 2020-05-14T12:56:07.051700Z

so you will want to set :figwheel {:readline false …} in the project.clj

bhauman 2020-05-14T12:56:12.051900Z

@reefersleep ^

reefersleep 2020-05-14T12:58:13.052900Z

That’d be fine in my own personal project, but if I do it globally in this project, I’ll break readline functionality for those of my colleagues who use it.

reefersleep 2020-05-14T12:58:37.053400Z

Is it possible to put into a profile that can be +’d at startup?

reefersleep 2020-05-14T12:59:44.054300Z

But it’d have to be merged with the options from the other profile(s).

reefersleep 2020-05-14T13:01:07.055100Z

So something like :no-readline {:figwheel {:readline ^:replace false

bhauman 2020-05-14T13:04:52.057Z

that could work you may also need to remove the rebel-readline library in the profile as well

reefersleep 2020-05-14T13:06:27.057600Z

How do I instruct start-figwheel! to merge profiles?

bhauman 2020-05-14T13:06:41.057800Z

oh it doesn’t

bhauman 2020-05-14T13:06:54.058100Z

but

bhauman 2020-05-14T13:08:06.058900Z

you can supply options to start figwheel

reefersleep 2020-05-14T13:08:38.059600Z

Currently I’m pointing towards my build profile, like (ra/start-figwheel! "my-profile")

reefersleep 2020-05-14T13:10:05.061Z

Is it an either/or thing? Either I supply the entire build information on my call, or I refer to exactly 1 profile?

bhauman 2020-05-14T13:10:59.061600Z

You can fetch the config and alter it (figwheel-sidecar.config/fetch-config)

reefersleep 2020-05-14T13:11:08.061800Z

Cool! I’ll try that.

bhauman 2020-05-14T13:11:29.062300Z

(start-figwheel! (figwheel-sidecar.config/fetch-config) "dev")

reefersleep 2020-05-14T13:33:42.063500Z

@bhauman that worked great for merging the :figwheel options. However, the dependency is mentioned in our project.clj like

:profiles {:dev {:dependencies [[figwheel-sidecar "0.5.19"
                                 :exclusions [org.clojure/clojurescript
                                              org.clojure/core.async]]
                                [com.bhauman/rebel-readline "0.1.4"]
...

reefersleep 2020-05-14T13:33:49.063800Z

And that does not seem to be available from the config.

bhauman 2020-05-14T13:36:34.064700Z

hey

bhauman 2020-05-14T13:36:46.065100Z

is it working that way?

bhauman 2020-05-14T13:37:00.065600Z

without getting rid if rebel-readline

reefersleep 2020-05-14T13:37:34.066300Z

The REPL is running, and the config ends up having the :readline false set in :figwheel for the desired build

reefersleep 2020-05-14T13:37:40.066500Z

but it does not get rid of rebel-readline

bhauman 2020-05-14T13:37:51.066900Z

so you still have the warning

reefersleep 2020-05-14T13:37:54.067100Z

yes

bhauman 2020-05-14T13:37:57.067300Z

OK

bhauman 2020-05-14T13:38:31.067700Z

well that seems like a bug

reefersleep 2020-05-14T13:38:48.068300Z

Maybe it’s just not possible with the way our :profiles is set up?

bhauman 2020-05-14T13:38:48.068400Z

the readline false option should be respected

reefersleep 2020-05-14T13:38:52.068700Z

oh!

reefersleep 2020-05-14T13:38:55.068900Z

Hm, ok.

reefersleep 2020-05-14T13:39:05.069300Z

Thought you said I might need to remove the dep as well.

bhauman 2020-05-14T13:39:28.069700Z

yeah if you want it to work right now you do

reefersleep 2020-05-14T13:40:08.070Z

Just for fun, I’ll try testing it without the dep

reefersleep 2020-05-14T13:43:38.070300Z

reefersleep 2020-05-14T13:46:46.071Z

Right, I’m not prompted when the dependency is not present. Verified 🙂

reefersleep 2020-05-14T13:47:20.071600Z

Should I file this properly at the lein-figwheel github repo?

bhauman 2020-05-14T13:47:43.071900Z

no worries I’m going to look at it in a moment

reefersleep 2020-05-14T13:47:50.072100Z

Amazing 😄

reefersleep 2020-05-14T13:48:30.073100Z

Thanks for figwheel, btw, it’s great! I think it’s part of the reason I got so into CLJS to begin with.

👍 1
bhauman 2020-05-14T13:56:29.074100Z

awesome, BTW the I’ve got the new :bundle target working in lein-figwheel and in figwheel-main

bhauman 2020-05-14T13:57:02.074700Z

so if you want to try npm integration its pretty sweet now

👌 1