Fork me on GitHub
#figwheel-main
<
2018-07-23
>
conan12:07:42

hi, i'm having trouble loading leiningen profiles when running fighweel in cursive using figwheel-sidecar (in particular, i need to load a profile in order to load figwheel-sidecar). any ideas on how i can do it?

conan12:07:44

there's a library (https://github.com/bhauman/simple-lein-profile-merge) that looks like it can do this, but i don't really want to be manually merging profiles

conan12:07:47

maybe a figwheel.edn file in order to separate figwheel from the rest of my project?

conan12:07:29

i'm not sure i can specify dependencies in there though, and it's dependencies that i need from my profiles

bhauman12:07:58

specifying deps is separate than specifying build traits

conan12:07:20

is there another way of configuring deps for figwheel rather than using profiles?

conan12:07:06

to run figwheel i use figwheel-sidecar for example, but i don't need that in my production builds (and have a good reason to exclude it)

bhauman12:07:31

I hear you

bhauman12:07:46

but Im not clear yet on your actual needs

bhauman12:07:04

you are starting a clojure env from cursive correct?

conan12:07:23

i'm running in a clojure.main process in order to run figwheel in cursive

bhauman12:07:50

so you are needing the clojure.main process to have the dependencies

bhauman12:07:56

does that make sense

conan13:07:05

yes, that's exactly it

bhauman13:07:05

so you first have to solve that problem

conan13:07:21

i'm trying to work out how to get the necessary deps into my clojure.main process

conan13:07:34

i've recently had to reconfigure my build to use profiles for different sets of deps

bhauman13:07:00

so I don't use cursive

conan13:07:04

i can't work out how to specify which deps figwheel gets if i'm not allowed to use profiles, which seems to be the case with sidecar

bhauman13:07:24

OK these are seperate issues

bhauman13:07:31

can you see that

bhauman13:07:40

figwheel-sidecar is a dependency

bhauman13:07:54

so if you can specify that it is a dependency

conan13:07:55

not really; i think i only have one issue: how to specify deps for figwheel in a clojure.main process

conan13:07:13

i can't specify that it is a dependency at the top level of my project.clj

bhauman13:07:14

but that isn't a thing

bhauman13:07:45

I'm not trying to resist you, I just want you to understand

❤️ 4
conan13:07:45

i think i've misunderstood something then

conan13:07:01

here's the (Brief) history

bhauman13:07:06

that you can only specify dependencies for a Clojure process

bhauman13:07:21

in leiningen that is where you use profiles

conan13:07:33

I have a project with both clj and cljs in it. My clj won't start fast enough because too many deps, so I split clj and cljs deps into profiles.

bhauman13:07:43

yes that makes sense

conan13:07:51

now i can't run fighweel, because the deps it needs are in a profile which does not get merged.

bhauman13:07:00

so you want to start a clojure.main process with the correct lein profile

conan13:07:34

ok, i see that i thought figwheel could do this, but now i see it is not a figwheel issue

bhauman13:07:48

and this it is this question that you will want to ask a cursive user

conan13:07:59

ok thanks v much!

euccastro15:07:21

one missing step in that description is that you'll get prompted for the build to use, and you need to provide that as a keyword (that is, preceded by :). for example, if you have a dev build defined in a dev.cljs.edn, you need to respond :dev when asked about it

euccastro15:07:48

this was tested in CIDER 0.18.0-snapshot btw; I'm not sure if it'll work in 0.17.0

euccastro15:07:35

note that while the instructions say you'll need to adapt them if you're not using Leiningen, if you're using cider-jack-in-cljs there's nothing really to adapt

euccastro15:07:46

since piggieback is not required in that case

richiardiandrea16:07:45

@euccastro I added that and I think I should tweak it so that it accepts a string...is there an issue open as reminder (pretty please :D)

euccastro21:07:46

I'm happy to add an issue, but what repo would that be in? I get a clojure traceback when providing plain dev as my build, so I imagine this need to be fixed somewhere else than clojure-emacs/cider itself?

richiardiandrea21:07:45

and the fix is similar to this one already there for shadow - but the opposite 😉 https://github.com/clojure-emacs/cider/blob/e47ce978077479542d57fd2f15eb5523cf09826a/cider.el#L691

richiardiandrea21:07:48

probably would be good to normalize to a string with no : and then add if/when necessary or something

euccastro12:07:15

I tried to not break the (undocumented?) case where a user might want to pass a map of options (which figwheel-main/start supports, according to some docstring in cider.el), or even an arbitrary s-expr

euccastro13:07:09

this is my first PR to cider so please point out if I'm missing something basic

euccastro13:07:05

in particular, I couldn't find the doc with the contributon guidelines

euccastro15:07:34

'ts been merged! cider

richiardiandrea16:07:54

Awesome work, just checked! Thank you!

richiardiandrea17:07:29

Also I would make it point 1) and 2) less visible - at the end of the day they are not necessary - meaning....it should be more evident that there is no need to modify the configuration because cider does auto injection

bhauman19:07:05

now the figwheel-main docs will be much simpler when getting folks started with an editor

bhauman19:07:16

Also there is a weird artifact in the docs a cut off clojure which seems out of place

richiardiandrea20:07:24

ah the doc was not me 😉 team work !