Fork me on GitHub
#boot
<
2017-08-10
>
miikka06:08:55

boot's CHANGES.md does not include BOOT_WATCHERS_DISABLE, by the way.

miikka06:08:06

Is there a plan to release 2.7.2 soon? @juhoteperi

juhoteperi06:08:26

@micha ^ Is there a plan to release 2.7.2?

djebbz12:08:28

Hi everyone, I want to use boot's checkout capability to have ClojureScript itself as a checkout dependencies, so I can put println calls where necessary to understand it. The CLJS repo has a project.clj, but I can't find how to do with lein the equivalent of boot watch build-jar so that anytime I change CLJS code source it's reinstalled locally and taken into account in my app. Any idea ?

richiardiandrea12:08:52

@djebbz isn't that a lein question? Anyway there must be a plugin for that

djebbz12:08:06

Dunno, for me it's a mixed boot/lein, I don't know how they interact

juhoteperi12:08:36

@djebbz Lein doesn't have anything built-in for that. You could use something like inotifywait in Linux or fswatch in OS X to trigger lein install on file changes, you'll need shellscript for this.

juhoteperi12:08:18

Also, boot-cljs doesn't (and can't easily) load new ClojureScript version even if you use :checkouts with ClojureScript

juhoteperi12:08:41

At least not when you use watch.

juhoteperi12:08:58

If you start new Cljs compilation with (boot (cljs)) new pod, with new ClojureScript version is created

juhoteperi12:08:40

but with (watch (cljs)) Boot will use the existing pod with old Cljs version

juhoteperi13:08:37

And changing this is not really possible. Creating new pod with new Cljs version would mean clearing cache etc. and cold-build, the same as when you start new boot process

djebbz13:08:12

Thanks @juhoteperi, too bad :/

juhoteperi13:08:40

Not sure why this would be that useful anyway.

juhoteperi13:08:12

If you need to fix/change something on ClojureScript compiler, it is best to create test cases on Cljs and use those to validate fix. Then test with the project.

juhoteperi13:08:40

Ah, well, you mentioned println.

kommen13:08:59

@richiardiandrea I was wondering if you had the figwheel repl running already with figreload? I couldn’t figure it out yet, and as we were able to work around the boot-cljs-repl issue (https://github.com/adzerk-oss/boot-cljs-repl/issues/49#issuecomment-321546131) we’re sticking with it for now

richiardiandrea13:08:35

@kommen no I haven't, I was using boot-cljs-repl (or dirac)

richiardiandrea13:08:52

that's good that you worked around that anyways

kommen13:08:39

ok, I will give the figwheel repl another try at some point, maybe when I understand all this repl stuff, nrepl, et all a little bit more

richiardiandrea13:08:05

@kommen I think it would not be that hard to bootstrap an nrepl server...then the next step is to see if and what custom messages figwheel expects...on the other hand, if no custom messages are required...then that's a plain nrepl + piggieback 😱

cpmcdaniel13:08:39

Is there a way to force a boot dependency to look in the local repo only and not error when it can’t find it in the remotes?

djebbz14:08:43

@cpmcdaniel Isn't this what :checkout is all about ?

cpmcdaniel14:08:52

I’ll give it a shot, thanks

juhoteperi14:08:45

Checkouts is about loading the updated package without restarting Boot

djebbz14:08:14

Is there no way to have a dependency considered only local ?

juhoteperi14:08:42

Maven doesn't really have support for defining repositories/options per package

borkdude15:08:03

Anyone here using crisptrutski/boot-cljs-test? It deletes my cljc files after a cljs test run! 😂

alandipert15:08:46

djebbz one maven concept that might suit your case is 'internal repository'. you can make a local/filesystem maven repo and add it as a repo in your build.boot

djebbz15:08:41

@alandipert How to do that ? I know close to nothing about maven... Thanks in advance

djebbz16:08:16

Ok, I checked Maven docs https://maven.apache.org/guides/introduction/introduction-to-repositories.html, and my understanding is that I can point Boot to some path in my filesystem that is a repository. In my case I want to use my local version of ClojureScript, not sure how to set it up.

juhoteperi16:08:17

Hmh, this will work just the same as just installing Cljs to the default local repository

juhoteperi16:08:34

Just run lein install on Cljs and update the version number on your project

juhoteperi16:08:22

Cljs will automatically create the version number from number of commits, so the new version will probably be one that is not available in Mavencentral anyway, so you are not overriding existing Cljs version

djebbz16:08:04

So, I'll end up having to restart my repl everytime also in this case (because of boot-cljs, as you said before @juhoteperi), right ?

juhoteperi16:08:06

Ah no lein install, you need to run script/build to package Cljs

djebbz16:08:42

indeed, script/build does and mvn clean install in the end.

djebbz16:08:30

I know it's not related to Boot but more to JVM package management in general, but for this kind of things npm (and maybe yarn) is vastly superior. You can npm link to just create symlinks to your local version, and boom!, ready to hack the local version. Takes 10 seconds. Much easier...

djebbz16:08:44

end of the rant

juhoteperi16:08:39

Checkout works fine generally, but Clojure and ClojureScript compiler are special cases, especially if using Lein/Boot, where Cljs is isolated to separate environment, which prevents reloading it

djebbz16:08:02

Is there a reason for this separate environment ?

juhoteperi16:08:29

Else tooling dependencies would mess up your project environment

juhoteperi16:08:25

If you want fast way to edit Cljs code and test changes, you'd need to skip boot-cljs/lein-cljsbuild/figwheel and just call Cljs directly from REPL, with Cljs code in classpath

juhoteperi16:08:27

That will work

juhoteperi16:08:35

But boot-cljs and other enforce the separate environment

djebbz16:08:47

> Else tooling dependencies would mess up your project environment Makes perfect sense indeed

juhoteperi16:08:24

Boot wiki Pods page has few sentences about this: https://github.com/boot-clj/boot/wiki/Pods

djebbz16:08:03

question about "Cljs code in classpath" : can a classpath include a directory from outside the root of the project ? Like "../../path/to/local/clojurescript" ?

juhoteperi16:08:33

In Lein, yes, not sure if Boot allows that

juhoteperi16:08:58

In fact, lein checkouts work by modifying your projects source-paths to include source-paths of the checkout project

juhoteperi16:08:17

Depending on what you want to test with Cljs, it might just be easiest to run lein repl on Cljs project and add our .cljs code there

juhoteperi16:08:23

That is usually what I do

djebbz16:08:47

Maybe using symlinks would work maybe ?

juhoteperi16:08:13

Again, works at least with Lein, I don't remember if I have tried that with Boot

djebbz16:08:30

Should try and report here

djebbz16:08:58

Thanks a lot @juhoteperi and @alandipert, mucho appreciated

qqq18:08:58

in boot, what is a 'pod' ?

richiardiandrea18:08:03

@qqq there is a link just up above

juhoteperi18:08:33

Unfortunately the wiki page doesn't tell much

qqq18:08:46

so basically they're 'isolated envs which contanis dependencies / classpaths' ?

qqq18:08:13

they're sorta "clojured runtime + dependency" sandboxes, the name "pods" makes sense

qqq18:08:10

if I just want "default pod with the dependencies listed in boot" do I use:

(defn ns-tracker-pod []
     (->> '[[ns-tracker "0.3.0"] [org.clojure/tools.namespace "0.2.11"]]
          (assoc (boot/get-env) :dependencies)
          pod/make-pod))
(from boot-garden) or is there a more standard way ?

juhoteperi18:08:34

That one replaces the project dependencies with the listed ones

juhoteperi18:08:06

If you want pod with only the project deps: (pod/make-pod (boot/get-env))

juhoteperi18:08:26

Or update :dependencies conj if you need to add some deps

qqq19:08:42

@juhoteperi : thanks