Fork me on GitHub
#boot
<
2015-12-12
>
flyboarder00:12:01

I didn’t see a versioning task on the Community Tasks page so… https://github.com/degree9/boot-semver

naomarik15:12:43

for boot-reload how do I change the prefix path? like instead of i would like

naomarik15:12:16

i've tried that -- doesn't solve my prob

naomarik15:12:01

i'll prob just make some sym links

jaen15:12:20

Any example of how you have that set-up? I don't remember something like that coming up in practice.

naomarik15:12:42

i've integrated cljs into an existing rails project

naomarik15:12:00

and having a devcards setup served from my public folder

naomarik15:12:38

so the url is and it tries to fetch GET when it reloads

naomarik15:12:00

so i'll just make a sym link in public to point to cards.out for now...

naomarik15:12:12

although i don't want to 😛

jaen15:12:49

Hm, can't you have the cards.out folder in your public then?

naomarik15:12:10

yeah i have, but was wondering if i could specify a prefix in the boot config so i didn't have to

jaen15:12:54

I think that's just part of boot's multiple output files thing, each build has it's own directory for sources.

jaen15:12:01

I don't think you can override :output-dir, but I can be misremembering.

jaen15:12:55

So I think you have to either symlink or just live with the additional subdirectory

jaen15:12:11

The thing is when you compile with optimisations above :none you end up with one js file anyway

jaen15:12:16

It's all only for development

naomarik15:12:12

yup, just wanted it for dev

colliderwriter15:12:15

I'm trying to create a jar which doesn't have a main. When I "boot pom jar" and then "jar tf" my jar, I don't see any classes in it. There ought to be some, right?

micha15:12:49

how are you configuring your source directories?

micha15:12:05

files in :source-paths won't end up in jars

micha15:12:39

files in :resource-paths are the same as ones in :source-paths, but with the difference that they will end up in packaged artifacts

colliderwriter15:12:22

I see. Do I need both :source-paths and :resource-paths?

micha15:12:45

you can use either or both, as you like

micha15:12:23

i always just use :resource-paths now

naomarik15:12:22

@jaen reload { :asset-path "/subURI"} you'd assume this to do it yea?

naomarik15:12:39

in the task-options! macro

micha15:12:23

the asset-path stuff is problematic

micha15:12:32

there is no simple solution there

micha15:12:43

it infects everything like a virus

micha15:12:13

it's super important that source files be located on the filesystem in a sane way

naomarik15:12:16

so at the moment micha, i should just be content with adding symoblic links to point to my cljs namespace's corresponding .outs/ ?

micha15:12:18

without arbitrary rules

micha15:12:34

well consider java for example

micha15:12:51

or clojure itself is maybe a better example

micha15:12:59

the relationship between filename and namespace name

micha15:12:08

when you do (require 'foo.bar)

micha15:12:33

it's crucial that there is a deterministic way to locate the clojure source file

micha15:12:57

when you admit arbitrary routing into that model things explode in incidental complexity

colliderwriter15:12:19

Thanks @micha, got first try

micha15:12:21

like imagine if clojure had such a thing

micha15:12:38

asset paths where foo.bar clojure source lives in some random place

micha15:12:49

but baz.baf in some other place

micha15:12:06

anything that deals with compiling clojure would need to know this scheme

micha15:12:36

i just think it's better to have a robust model for what an application is

micha15:12:46

and build your application accordingly

micha15:12:56

than to try to add special cases to everything

micha15:12:18

because in the end we can never build powerful tooling if we have tons of special case handling

micha15:12:27

we need a simpler foundation

micha15:12:07

all these special cases are why you see only monolithic one-thing-does-everything type tools

micha15:12:59

i think symlinks are the correct solution in your case

micha15:12:13

if you're retrofitting a cljs application into legacy code

micha15:12:33

keeping your glue out of the tools is a good design

micha15:12:46

because it's a totally separate concern

micha15:12:00

however, you can totally make a boot task that creates the symlinks you need

micha15:12:11

based on the model for your rails project

micha15:12:45

so with some engineering you can make a more or less general purpose task that composes with the existing things

micha15:12:04

but that's only possible if the existing things are simple

naomarik15:12:46

yea in my case i'm just using two namespaces - my app's js and devcards. then have an html file in my public/cljdev folder to access an html file that loads them

naomarik15:12:58

so that won't change

naomarik16:12:52

is it better to keep the cljs.edn file in resources/ or src/cljs/?

naomarik16:12:31

i've noticed both used in different projects

micha16:12:45

i don't think it matters

jgdavey17:12:56

boot pom is failing in a project for me with clojure.lang.PersistentVector cannot be cast to clojure.lang.Named

jgdavey17:12:56

I’ve tried just running boot pom —project foo —version 0.0.0, but it fails with the above error in my project directory. Any ideas on how to track down what might be causing it?

micha17:12:33

which version of boot?

jgdavey17:12:11

`BOOT_CLOJURE_NAME=org.clojure/clojure BOOT_VERSION=2.4.2 BOOT_CLOJURE_VERSION=1.7.0 #App version: 2.4.2`

micha17:12:20

also can you please try boot -BP pom -p foo -v 0.0.0?

micha17:12:43

that will skip loading your profile.boot and build.boot

micha17:12:47

in case the problem is there

jgdavey17:12:26

Okay, that works...

micha17:12:12

ah can you try boot -B pom -p foo -v 0.0.0 now please?

jgdavey17:12:52

I bisected and it seems to be related to a dependency change...

jgdavey17:12:06

One of test.check or tools.reader

micha17:12:20

another helpful thing when getting an exceptiion like that is to do like

micha17:12:25

boot -vv ...

micha17:12:31

that will print full stack traces

jgdavey17:12:50

I did do the verbose thing, but it didn’t illuminate anything interesting (to me at least)

micha17:12:21

i think the problem iyou're seeing isn't boot related

micha17:12:53

so the trace should show something, hopefully

micha17:12:21

bisecting your build.boot would be my next step, if the trace isn't helpful

jgdavey17:12:40

@micha: It’s definitely not boot. Something about my deps

jgdavey17:12:44

Thanks for the help!

micha17:12:14

sure, np!

jgdavey17:12:19

Found it. I had an extra vector wrapping :exclusions in a dependency

micha17:12:59

probably could use a schema for things like that

micha17:12:04

to get better error messages

genRaiy20:12:31

guys … probably something silly but I just dled boot from github and get this

genRaiy20:12:49

$ boot -h
Downloading  in thread "main" java.io.FileNotFoundException: 
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1835)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
	at java.net.URL.openStream(URL.java:1038)
	at boot.Loader.download(Loader.java:175)
	at boot.Loader.install(Loader.java:219)
	at boot.Loader.main(Loader.java:238)

genRaiy20:12:12

do I have something missing or misconfigured?

genRaiy20:12:29

OS/X El Capitan

genRaiy20:12:00

$ java -version
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

genRaiy20:12:34

$ lein -v
Leiningen 2.5.2 on Java 1.8.0_40 Java HotSpot(TM) 64-Bit Server VM

micha20:12:39

yes i see the problem

micha20:12:58

non-stable versions are not supported

micha20:12:38

can you please do this: rm ~/.boot/boot.properties ~/.boot/cache/boot.properties

micha20:12:42

and try again?

micha20:12:13

you don't need to download anything again, just delete those files and rerun boot

genRaiy20:12:41

sorted

$ boot -h
Downloading .
Running for the first time: updating to latest version.
#
#Sat Dec 12 21:54:23 CET 2015
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_VERSION=2.4.2
BOOT_CLOJURE_VERSION=1.7.0

micha20:12:46

i should fix that, i didn't think anyone was still using those older pre-release versions

genRaiy20:12:20

TBH I looked at boot a while ago and had a few issues as you guys were in transition

micha20:12:46

yeah that's part of the reason why those rc versions aren't supported in the loader

micha20:12:18

it should be able to recognize them though and tell you useful error messages

genRaiy20:12:24

I really like the way that you and alan are going with boot so it’s good that the project is in a better place

micha20:12:53

we should have a release in the next few days with many improvements

genRaiy20:12:14

ok, great - I’ll start to put some effort into learning it again … hoplon too!

micha21:12:09

@raymcdermott: drop by if you run into issues

micha21:12:33

my pleasure

micha21:12:45

hm that looks weird

juhoteperi22:12:24

@micha: (merge r (when repo-map (core/configure-repository repo-map))) should maybe be (core/configure-repository (merge r repo-map))

juhoteperi22:12:37

I think it should work without specifying the repo-map option

micha22:12:30

i force pushed a thing that wraps it in a (when repo-map (configure ...

micha22:12:44

i wonder about doing it outside the merge

micha22:12:58

configure-repository should be idempotent

micha23:12:05

so i think you're right

juhoteperi23:12:05

Also, multimethod should probably dispatch on operation, deploy vs. resolve-deps

juhoteperi23:12:12

because the credentials can be different

micha23:12:26

is that really true?

juhoteperi23:12:58

I remember testing it but I don't remember the result :<

micha23:12:54

i think it would make sense maybe in those cases to make yourself a task that updates the creds in the repo

micha23:12:02

you'd have that in your profile or whatever

micha23:12:12

then you could do like boot set-creds push

micha23:12:18

instead of boot push

micha23:12:31

that would not interfere with the repo settings in the project

juhoteperi23:12:09

It depends on how Clojars works, we should really make using Clojars as simple as possible

micha23:12:43

yeah i'm pretty sure clojars doesn't allow a single user to have multiple creds

juhoteperi23:12:21

I'll check what Clojars does if you provide creds for resolve-deps

micha23:12:26

there is a bug currently

micha23:12:39

if you don't set clojars in your :repositories

micha23:12:46

i have the fix it just isn't pushed yet

juhoteperi23:12:14

Hmm, with the multimethod it should be possible to overwrite the default method and provide a library which reads the creds from Lein credentials file

juhoteperi23:12:21

Which is good

micha23:12:07

also i added functions in boot.core to make it easy

micha23:12:30

(gpg-decrypt "creadentials.clj.asc" :as :edn)

micha23:12:24

and also boot will eval ./profile.boot in addition to BOOT_HOME/profile.boot

micha23:12:46

which might be handy for some projects when you need to override the multifn

micha23:12:54

on a per-project basis

micha23:12:37

of course your multifn could use load-file, so maybe that's not a huge win