Fork me on GitHub
#boot
<
2017-07-13
>
tmarble18:07:02

@alandipert have you ever used clojure.spec with boot? if so do you have a build.boot file to point me to?

benbot18:07:56

Is there any way to have boot tasks across multiple files?

jeremys18:07:48

@benbot hey again, you can code your tasks in you own namespaces and require them in your build.boot file.

benbot18:07:53

Do you have to add their path to the :resource-paths? If so, doesn’t that mean they’d be included in jar files that boot would make?

benbot18:07:17

I’m pretty new to clojure land 🙃 sorry if I’m missing something

jeremys18:07:51

Take a look at the set-env! function’s doc https://github.com/boot-clj/boot/wiki/Boot-Environment . You can use this function inside tasks not just at the beginning of the build.boot file. This way you can choose what to add or or remove from the environment depending on the task.

alandipert18:07:46

@tmarble sorry, i have not

tmarble19:07:04

@jeremys you sort of get that by putting tasks in ~/.boot/profile.boot and build.boot for your project (but there is no "include another boot file" directive AFAIK)

mynomoto19:07:58

@tmarble I have https://github.com/mynomoto/adamant that uses clojure.spec with boot.

tmarble19:07:24

@mynomoto fascinating.. trying it now

tmarble19:07:10

which is the same behavior I saw when setting BOOT_CLOJURE_VERSION=1.9.0-alpha17 in my boot.properties

tmarble19:07:15

should I file a bug?

alandipert19:07:37

@tmarble possibly, what happens if you do boot --no-profile build?

tmarble19:07:58

just thought of that

alandipert19:07:09

i mean, feel free to also still file a bug even if that fixes. w/ profile contents if possible

tmarble19:07:00

gah, it's my profile.boot!

tmarble19:07:55

@mynomoto so after fixing my profile.boot i get errors about Could not find artifact com.maitria:specter-edn:jar:0.1.4-SNAPSHOT in clojars (https://repo.clojars.org/) but this has helped debug my problem

tmarble19:07:10

@alandipert fascinating... in my profile.boot I had (this old boilerplate)...

(defn- generate-lein-project-file!
   [& {:keys [keep-project] :or {:keep-project true}}]
  (let [pfile ((resolve ') "project.clj")

and spec complained about the default form thingy.. this resolves it:
(defn- generate-lein-project-file!
  [& {:keys [keep-project]}]
  (let [keep-project (or (nil? keep-project) keep-project)
        pfile ((resolve ') "project.clj")

mynomoto20:07:17

@tmarble yeah, this is experimental, sorry about that. If you change that to version 0.1.3 it should load fine