Fork me on GitHub
#boot
<
2016-12-13
>
kenbier01:12:26

@micha is there any chance you an cut a 2.6.0 release for boot-bin ?

kenbier01:12:21

we want to upgrade from 2.5.2 and we use boot-bin to download boot in our CI testing

kenbier01:12:52

oh wait, i can just run boot -u i believe

kenbier01:12:22

if i update boot.properties

micha01:12:29

@kenbier the boot.sh file is designed to be compatible with all previous and future versions of boot

micha01:12:43

(2.x.x) versions

kenbier01:12:13

curl -fsSLo $HOME/bin/boot https://github.com/boot-clj/boot-bin/releases/download/2.5.2/boot.sh chmod +x $HOME/bin/boot boot -u # Run once to install JARs dependencies

micha01:12:15

you don't need to update it unless there is a bug in the current version

kenbier01:12:19

so just change this to the latests

kenbier01:12:43

well we’d prefer to use a specific version for each build, to and update manually

micha01:12:49

there is also a "latest" release you can download

kenbier01:12:59

right, thats what i mean

kenbier01:12:09

we could use whats in the README and then run update?

micha01:12:14

the boot.sh is just to launch boot

micha01:12:32

the actual boot code is in boot.jar

micha01:12:32

the version of boot. jar you will use is determined by the BOOT_VERSION environment variable

micha01:12:46

or the boot.properties file

kenbier01:12:59

great, that should work

micha01:12:15

which can be in ~/.boot out in your project directory

micha01:12:36

so you can pin a project to a specific version of boot if you want

micha01:12:19

i mean "or in your project directory" not "out in ..."

micha01:12:39

autocorrect

kenbier01:12:46

sounds good

kenbier01:12:54

:thumbsup:

bhagany01:12:48

my google fu is weak. I can’t seem to make aliased namespaced keywords (like ::p/foo) work in build.boot, it fails with java.lang.RuntimeException: Invalid token, when it tries to pass through clojure.core/read-string. Works just fine from a repl, though. Any tips?

bhagany01:12:01

(I have required and aliased the ns, btw)

micha01:12:35

hmm does read-string not read those?

bhagany02:12:27

well, it does in a repl, which is why I’m confused

bhagany02:12:30

stack trace, if that’s helpful (it’s short):

bhagany02:12:33

java.lang.RuntimeException: Invalid token: ::p/tags
                      ...
 clojure.core/read-string   core.clj: 3663
boot.util/read-string-all   util.clj:  375
          boot.main/-main   main.clj:  170
                      ...
         boot.App.runBoot   App.java:  399
            boot.App.main   App.java:  488
                      ...
                Boot.main  Boot.java:  258

richiardiandrea02:12:12

maybe a clojure mismatch between the repl and boot.version, it has happened to me in the past

bhagany03:12:37

re: keywords, both the repl and BOOT_CLOJURE_VERSION are 1.7.0

ryancole03:12:13

this is going to show my lack of knowledge, but is there a way so that my build.boot does not expose tasks from third party libs? like, i'm using boot-http but i see those tasks when i type boot.

ryancole03:12:41

i want to use these third party tasks, but don't necessarily want my own build.boot to expose those as tasks

alandipert03:12:46

2.7.0 release imminent

alandipert04:12:11

2.7.0 is out!

mpisanko04:12:31

hey guys, i’m a boot noob. have a potentially dumb question: i use boot-cljs (1.7.228-2, boot 2.6.0, cljs 1.9.225, clj 1.9.0-alpha14 - pinned in boot.properties) and compiling cljs works alrite, but in a cljc - I’m getting a problem: ERROR: Unable to resolve symbol. that symbol is def-ed as a standard (def ) (as opposed to reader conditional)

mpisanko04:12:38

just tried with 2.7.0 as well.. same result 😞

mpisanko04:12:05

but love the errors displayed under the stack trace!!

ryancole04:12:20

is the cljc file on your path?

ryancole04:12:58

haha, so weird seeing that here now, too.

mpisanko05:12:11

@ryancole yes, the build.boot specifies:

(set-env!
 :source-paths #{"src/clj" "src/cljs" "src/cljc"}
 :resource-paths #{"html”}

mpisanko05:12:01

and cljc file in question is in there (src/cljc/…)

martinklepsch05:12:32

@ryancole have you tried downgrading to 2.6.0?

alandipert05:12:04

looks like f339a8d9464bfc0e05f9c963744377e91a042c48 is the culprit

alandipert05:12:28

if the fix is small we can push 2.7.1 tmrw, otherwise if you did boot -u you can set back to 2.6.0 by editing ~/.boot/boot.properties, a boot.properties file in your project dir, or by setting BOOT_VERSION env var

lxsameer06:12:01

hey folks, how can i recompile only the changed cljs file using boot-cljs

martinklepsch06:12:27

@lxsameer by default it recompiles these and all files that depend upon the changed files

micha06:12:27

@lxsameer that should be happening automatically

lxsameer06:12:03

so I'm doing it wrong, Because my build script compiles the whole thing

martinklepsch06:12:21

you can disable that cascading effect by using the Clojurescript compiler option :recompile-dependents but that makes things less predictable/deterministic

lxsameer06:12:29

also can I cache the last build to avoid compiling over and over again ?

martinklepsch06:12:42

@lxsameer there's no caching between individual boot invocations

martinklepsch06:12:03

historically this kind of caching has always led to more hard-to-track-down problems that consume more time than the extra minute/30s you wait a few times a day

martinklepsch06:12:03

@lxsameer when you say "compiles the whole thing" do you refer to initial startup or incremental compiles?

lxsameer06:12:14

@martinklepsch both, the initial startup is logically expected, but incremental one isn't expected

martinklepsch06:12:22

@lxsameer what are the times for first/incremental?

mpisanko06:12:24

hey @mitchelkuijpers - did you manage to sort out your issue withy cljc? i’m hitting the same problem..

martinklepsch06:12:04

@lxsameer I meant first run and incremental runs (as in two times)

lxsameer06:12:02

@martinklepsch sorry i can't understand it 🙂,

martinklepsch06:12:32

@lxsameer I mean how long does initial startup take and how long to incremental runs take 🙂

lxsameer07:12:15

@martinklepsch both around 25secs, It's weird because incremental should takes less.

martinklepsch07:12:34

@lxsameer hm that's odd. Is the project public by any chance? Otherwise you may try to supply the :verbose option to the Clojurescript compiler

lxsameer07:12:18

@martinklepsch let me try to investigate this, If I couldn't fix it I'll bother you again 🙂

martinklepsch07:12:23

good luck 😄

Aron09:12:29

i am trying to build a cljsjs package, but obviously, i am running into issues. anyone has a link to boot docs on how such stuff as (sh "npm" "run" "build:browser") should work? I am getting "cannot run program" for anything I try

martinklepsch09:12:08

@ashnur (sh ...) basically just shells out. do you have npm installed?

Aron09:12:31

yes, and it also said it on ls

Aron09:12:42

i tried (sh "ls")

Aron09:12:53

java.io.IOException: Cannot run program "ls" (in directory "/home/ashnur/.boot/cache/tmp/home/ashnur/projects/packages/jsnetworkx/buq/pzdj8x/jsnetworkx-0.3.4"): error=2, No such file or directory

martinklepsch09:12:29

what happens when you do ls /home/ashnur/.boot/cache/tmp/home/ashnur/projects/packages/jsnetworkx/buq/pzdj8x/jsnetworkx-0.3.4

martinklepsch09:12:33

(in a regular terminal)

Aron09:12:18

no such file or directory

Aron09:12:35

the jsnetwork directory is actually JSNetworkX-0.3.4

Aron09:12:40

I think i messed up some config, right?

martinklepsch09:12:57

can you gist your file?

Aron09:12:08

well, right now it's obviously completely wrong and broken but sure: https://gist.github.com/ashnur/5b21d929572bad24b5e26e09f8a27c24

lxsameer09:12:24

what's the best solution to add an other project(lib) from source to the current boot project ? ( I want to develop a library on the side )

martinklepsch09:12:05

@lxsameer take a look at boot's checkouts feature

martinklepsch09:12:22

otherwise you can also just add it to :source-paths but then you'll need to make sure dependencies are met

martinklepsch09:12:19

@ashnur so if the lowercase version doesn't work, have you tried matching the case in this line: https://gist.github.com/ashnur/5b21d929572bad24b5e26e09f8a27c24#file-build-boot-L31

martinklepsch09:12:33

Like JSNetworkX instead of jsnetworkx

Aron09:12:46

i was trying to understand the file atm

Aron09:12:54

but will try it now like that

Aron09:12:19

thanks @martinklepsch that worked, now i have different error 😄

martinklepsch09:12:39

There's also #cljsjs btw 🙂

Aron09:12:41

yeah, it says i need .inc.js file

Aron09:12:44

oh, right

Aron09:12:05

i am there, but this was obviously boot related to me 🙂

martinklepsch09:12:35

moving to #cljsjs

lxsameer09:12:45

@martinklepsch it seems that checkout task is deprecated

martinklepsch10:12:45

@lxsameer there's a :checkouts env parameter now, unfortunately there's very little documentation around it

pesterhazy10:12:07

I just got bitten by the fact that boot-cljs defaults to setting cljs compiler's option :output-wrapper false

martinklepsch10:12:16

@lxsameer if you end up using it, adding it to the end here would be very cool: https://github.com/boot-clj/boot/wiki/Boot-Environment

pesterhazy10:12:28

this is not really a good idea for adv compilation builds

martinklepsch10:12:37

@pesterhazy that's not a boot-cljs default but cljs default afaik

pesterhazy10:12:02

@martinklepsch, true but lein-cljsbuild does turn it on for adv compilation builds

martinklepsch10:12:27

Agree that we should also do it, open issue/PR?

pesterhazy10:12:57

maybe we could at least issue a warning if adv compilation builds run with output-wrapper false ?

pesterhazy10:12:31

or even set the default (although that would be a breaking change, not sure how people feel about this post-Hickey2016)

pesterhazy10:12:09

given that the behavior is documented, I'm guessing you'd be disinclined to change the default @juhoteperi ?

martinklepsch10:12:22

@pesterhazy def. open an issue or PR for discussion, I'm pro breaking this if it might save hours for people running into it. Also what are the situations where this would actually end up being a breaking change?

martinklepsch10:12:35

@pesterhazy I think a warning has high chances of being accepted 🙂

lxsameer10:12:32

@martinklepsch can you please tell me what exactly checkouts does?

martinklepsch10:12:30

@lxsameer I remember now lol 😄 I'll add it to the docs, 1s

martinklepsch11:12:28

Let me know if this clears things up and feel free to expand of course

lxsameer11:12:21

it's all clear

martinklepsch11:12:01

Great @lxsameer. Good it's documented now, this came up multiple times before 🙂

lxsameer11:12:23

It's a useful feature

yogsototh15:12:16

Hi I’m new to boot, and I’m a bit confused. I wanted to generate an uberjar apparently but if I add the (uber) in the pipeline of my build, the jar change name from my-project-version.jar to project.jar also I would like to merge different resources directories in this uberjar

yogsototh15:12:38

I have some difficulties to find any pointers on what I’m doing wrong

martinklepsch15:12:38

@yogsototh you're not doing anything wrong, the uber task imports a lot .pom files which may confuse the jar tasks naming "algorithm". In this case it falls back to just project.jar. The jar task has an option where you can specify the name you want. See boot jar --help for details.

martinklepsch15:12:20

@yogsototh could you expand on the "merge different resource directories" — not sure I understand

yogsototh15:12:25

Thanks! I believe this is just a matter of set-env! resource-path, but mainly, I have different projects using trapperkeeper, and mostly, one of them should serve static files (it’s just a trapperkeeper service) and there might be other services using other trapperkeeper services (typically an API)

yogsototh15:12:58

for now, the resources for the API project is mostly empty, but I would like to keep the file in both project if possible

yogsototh15:12:57

to simplifiy I would like to merge the resources of two projects like: project-1/resources/public/.... and project-2/resources/files...

martinklepsch15:12:02

if you have resources in your :resource-paths then the public directories will get merged with each other I believe

martinklepsch15:12:09

The uber task has a :merge option that you can customize if you need to but I assume your two public directories don't contain identically named files?

yogsototh15:12:39

great! thanks, yes I believe there shouldn’t be any conflict, at least for now 🙂

martinklepsch15:12:27

generally if you intend to use something as a dependency then it might make sense to scope all files by classpath conventions like com/company/project-1/public/ etc. and then use these directories as resource-root. I haven't had to do that in practice but it seems to be the sane way to avoid some dependency overwriting some file in /public/

yogsototh15:12:16

yes I totally will do that. Thanks for your help! I could manage to create the uberjar.

martinklepsch15:12:05

Awesome, much success 🙂

khiem18:12:11

Hi, when using bootlaces, is there a way to bypass the GPG security check when deploying to Clojars?

tolitius20:12:38

in case anyone finds it useful [in 0.1.4-SNAPSHOT]: https://github.com/tolitius/boot-check#handling-errors