Fork me on GitHub
#boot
<
2017-07-12
>
sreekanth12:07:05

Any directions to have dev profile using boot with cider, emacs.

sreekanth13:07:44

Yeah, how can i have dev profile with lein profiles.clj :dev

richiardiandrea13:07:15

sorry I don't understand what you would like to achieve

richiardiandrea13:07:46

with the task above you can do boot cider dev and the middleware will be loaded

sreekanth13:07:15

Sorry for the confusion, can i run cider-jack-in for the boot project, load dev profile automatically?

richiardiandrea13:07:11

np, yes, if you do jack-in with a modern cider (which version are you using?) you should not need any additional configuration

richiardiandrea13:07:20

boot does not have profiles, just tasks

sreekanth13:07:55

CIDER 0.15.0snapshot (package: 20170629.106)

richiardiandrea13:07:13

so just a jack-in should be enough

sreekanth13:07:22

Yeah i understood that, looking for how to have similar workflow.

richiardiandrea13:07:45

still not sure I understand...

richiardiandrea13:07:12

jack-in should detect if you are running on boot or lein

richiardiandrea13:07:17

and call the right command

sreekanth13:07:17

Okay this was my workflow with lein, emacs, cider for development, there i don't need to run "boot cider dev" or lein run on terminal, all i used to do cider-jack-in, start the app in repl.

richiardiandrea13:07:05

if you have an error paste it here, you just need cider-jack-in

sreekanth13:07:48

In that i had a user.clj that was the default namespace on cider-jack-in

richiardiandrea13:07:18

ok, but these are two problems

richiardiandrea13:07:28

let's solve one by one

richiardiandrea13:07:55

is it jacking in and ending up in user=>?

sreekanth13:07:09

CIDER 0.15.0snapshot (package: 20170629.106)

sreekanth13:07:25

"boot.user>" yeah

richiardiandrea13:07:03

so can you (in-ns 'your-namespace.core)?

sreekanth13:07:51

my-namespace.core>

richiardiandrea13:07:44

ok...sorry I meant if you can in-ns in one of your namespaces of your app and call some function

richiardiandrea13:07:50

in-ns actually creates the namespace so you need to try to call something for real 😄

sreekanth13:07:12

i replaced "your" with "my" when am entering here, not just copy paste 😛, what i tried is my project namespace.

richiardiandrea13:07:21

ah ah ok, so it is on the classpath if you can execute a function

richiardiandrea13:07:28

about the automatic change

richiardiandrea13:07:22

you should pass --init-ns to your repl task

richiardiandrea13:07:57

you have two options, one is to modify how cider launches it, the second is to set the option with task-options! in build.boot

kommen16:07:48

@richiardiandrea fyi, I got live-reloading in webworkers with boot-figreload working, but it needed a custom boostrap script, as documented here: https://github.com/bhauman/lein-figwheel/wiki/Using-Figwheel-with-Web-Workers but as the I needed to use boot-cljs’ generated main the static script as in the example didn’t do and I decided to try to do it the proper way, which resulted in adding support for targeting webworkers in clojurescript, see https://dev.clojure.org/jira/browse/CLJS-2216

richiardiandrea16:07:09

oh that super cool!

richiardiandrea16:07:53

do you think we could use :preloads for that script or something?

richiardiandrea16:07:54

we could convert that script to a cljs one and do what we do in boot-cljs-devtools for hooking it up with a switch or a custom conf entry in the .cljs.edn file

richiardiandrea16:07:40

oh ok, I have just checked out the patch, even better there 😄

richiardiandrea16:07:33

so what we could do, and if you want to contribute it would be awesome, is to have a branch in https://github.com/arichiardi/figreload-demo with a worker

kommen11:07:57

let’s see if that patch is accepted in that form or if david wants to go with something like thomas heller suggests. I see pluses and minuses for both

kommen11:07:32

should it land, i’d be happy to contribute a figreload with worker demo

bigdaddys1oth17:07:44

Hey all, I'm having issue actually getting boot on my system

bigdaddys1oth17:07:55

I have the boot.sh and make it executable and added it to my systems PATH but it still can't make use of the boot command

bigdaddys1oth17:07:40

I can run the script via ./my_dir/boot.sh but that's about it

juhoteperi17:07:12

the filename must be boot instead of boot.sh if you want to use boot command

bigdaddys1oth17:07:52

Soooo...could I make an alias like alias boot='./boot.sh'?

juhoteperi17:07:20

You could, but much easier to just rename the file

juhoteperi17:07:29

Hmh, the install steps in readme don't say to rename the file, but the example command does that: curl -fsSLo boot

juhoteperi17:07:39

-o boot says to save the file as boot

bigdaddys1oth17:07:30

Tried that, it popped up and error I can't remember

juhoteperi17:07:54

could be about missing /usr/local/bin

bigdaddys1oth17:07:02

Maybe. I'll just rename boot.shlater and try it.

bigdaddys1oth17:07:36

I gotta be somewhere in a hour. :P

tmarble21:07:07

I'm trying to have a project depend upon [org.clojure/clojure "1.9.0-alpha17" :scope "provided"]

tmarble21:07:26

but when I run boot show --deps it says

tmarble21:07:41

Classpath conflict: org.clojure/clojure version 1.8.0 already loaded, NOT loading version 1.9.0-alpha17

tmarble21:07:07

If I change (in boot.properties) BOOT_CLOJURE_VERSION=1.9.0-alpha17, then I get a bunch of spec errors.... any ideas?

alandipert21:07:13

@tmarble is the entrypoint of the application boot?

tmarble21:07:52

well, maybe it is.. as I'm trying to run cider in a DUAL REPL configuration

tmarble21:07:08

emacs calls boot which calls my cider tasks....

alandipert21:07:30

perhaps you have code in your profile.boot that set-env! clojure?

alandipert21:07:48

in theory tho your setup sounds like it should work. boot uses 1.9.0-alpha17 for itself, then marks that version of clj as a dep to prevent other versions of clj from being loaded

tmarble21:07:11

hmm.. if i set BOOT_CLOJURE_VERSION=1.9.0-alpha17 and do NOT specify clojure in set-env! I get the spec errors

tmarble21:07:35

.. .when i run 'boot show --deps'

alandipert21:07:21

what does echo '(clojure-version)' | boot repl report?

tmarble21:07:05

boot repl fails with BOOT_CLOJURE_VERSION=1.9.0-alpha17 in boot.properties... reverting to 1.8.0...

tmarble21:07:36

now with BOOT_CLOJURE_VERSION=1.8.0 and set-env! [org.clojure/clojure "1.9.0-alpha17"]

tmarble@cerise 329 :( boot repl
Classpath conflict: org.clojure/clojure version 1.8.0 already loaded, NOT loading version 1.9.0-alpha17
nREPL server started on port 43733 on host 127.0.0.1 - 
REPL-y 0.3.7, nREPL 0.2.13
Clojure 1.8.0
OpenJDK 64-Bit Server VM 1.8.0_131-8u131-b11-2-b11
        Exit: Control+D or (exit) or (quit)
    Commands: (user/help)
        Docs: (doc function-name-here)
              (find-doc "part-of-name-here")
Find by Name: (find-name "part-of-name-here")
      Source: (source function-name-here)
     Javadoc: (javadoc java-object-or-class-here)
    Examples from : [clojuredocs or cdoc]
              (user/clojuredocs name-here)
              (user/clojuredocs "ns-here" "name-here")
boot.user=> (clojure-version)
"1.8.0"
boot.user=> 

tmarble22:07:43

I've got to run now, but I do hope to figure this out (in order to play with clojure.spec while using boot)

alandipert22:07:32

super weird. yeah, sorry, nothing wrong sticks out