Fork me on GitHub
#boot
<
2015-08-22
>
martinklepsch15:08:53

@micha: any chance you have an idea for a quick fix? or also how to fix the jar task?

juhoteperi16:08:32

Has anyone tried advanced compilation with latest boot-cljs?

micha16:08:57

@martinklepsch: i'll have a look

micha16:08:05

@juhoteperi: i have, works fine for me

juhoteperi16:08:22

Strange. None works fine for me but adv breaks.

micha16:08:31

actually maybe i'm not on latest latest

micha16:08:37

one sec i see

micha16:08:55

what's latest version?

martinklepsch16:08:43

clojure.lang.ExceptionInfo: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: No implementation of method: :-compile of protocol: #'cljs.closure/Compilable found for class: nil

martinklepsch16:08:13

@juhoteperi: that’s what you expected? (build worked with -0)

juhoteperi16:08:15

Okay, I’m seeing the same

micha16:08:55

something isn't right, but no exceptions

micha16:08:54

multiple builds problems again

micha16:08:47

it's like that movie The Fly

micha16:08:55

i have a brundlefly page now

micha16:08:02

a weird merging of both things

juhoteperi16:08:45

@micha: What are you using multiple builds for?

micha16:08:56

i have index.js and test.js

micha16:08:10

not using ids

juhoteperi16:08:58

It tries to search for the main namespace in classpath.

juhoteperi16:08:16

And that is created to the temp dir and is not commited yet

micha16:08:40

well played, cljs

juhoteperi16:08:21

I need to probably separate main ns writing from compile-1 so I can run that first for all builds, do the commit and then run all compilations

micha16:08:47

we need to special case this right?

micha16:08:07

like adding to classpath will break :none if we do that across the board

juhoteperi16:08:17

I don’t think it would break none?

micha16:08:31

that would be great

juhoteperi16:08:41

most of the namespaces are already in classpath, it’s just the main ns which is not

micha16:08:05

lol you got rid of my sweet macro

micha16:08:12

assoc-or or whatever

micha16:08:43

luckily i saved it on a post-it note on my refrigerator

micha16:08:49

in case i need it

juhoteperi16:08:12

You should have a utility function lib (everyone should have one)

micha16:08:24

yeah it's tricky though

micha16:08:30

because of dependencies

juhoteperi16:08:44

Yeah for boot tasks

micha16:08:52

i mean like i make a lot of things

micha16:08:19

and if i use my utility library in all of them i need to keep them all to the same version

micha16:08:22

and so on

juhoteperi16:08:07

We have a utility lib we use in app projects. For libraries we copy the necessary parts.

micha16:08:26

yeah i make mostly libraries really

micha16:08:43

all applictions tend to become libraries if they're useful enough

juhoteperi16:08:46

But the utility lib is good place to keep all the useful functions and test them.

micha16:08:53

yeah that's a good point

micha16:08:22

[micha/refrigerator-post-its "0.1.0-SNAPSHOT"] here we come

micha16:08:04

that might be a good use case for something like mranderson

micha16:08:17

but instead of static rewrite magic do it dynamically with eval

juhoteperi16:08:00

We have metosin/potpuri. It's medley in Finnish (weavejester’s utility fn lib is medley).

micha16:08:04

with the version number in the artifact id perhaps

micha16:08:20

(:require [potpuri-0-1-0.core :as pp])

juhoteperi16:08:14

It isn’t as easy to add main ns files to classpath as I thought

juhoteperi16:08:30

I didn’t remember each build has separate tmp-src

juhoteperi16:08:07

It would kill parallelism if we had to change classpath between each build

micha16:08:50

we just need to change the classpath of the pod

micha16:08:59

i.e. create with added :direcotries

juhoteperi16:08:07

that should be easy

micha16:08:13

💥 ™️

micha17:08:13

very nice

micha17:08:54

i like that it can just get things from the classpath

juhoteperi17:08:23

Would be better if it could do everything with classpath 😄

micha17:08:45

we have great tools for setting up classpaths

juhoteperi19:08:06

@micha: Do you know what was the problem with your project? Did you test with fixed version?

micha19:08:43

i haven't tested, 1.7.48-3?

juhoteperi19:08:52

Didn’t make a release yet

micha19:08:03

ok i can pull master

micha19:08:53

is it fixed on your end?

juhoteperi19:08:18

It’s slow but I don’t think it unusually slow

juhoteperi19:08:43

Was there any changes to uberjar building yet? Advanced cljs build is 1min and the whole package task takes 2min

micha19:08:10

uber not yet optimized

micha19:08:16

we havea branch for it though

micha19:08:20

partially implemented

micha19:08:55

the idea is to cache the exploded contents of jars using the modtime of the associated jar file in .m2 to invalidate the cache

micha19:08:12

and storing them in such a way that they can be merged directly into the fileset

micha19:08:17

without copying anything

micha19:08:29

should be really fast

micha19:08:33

once the jar is caches

juhoteperi19:08:15

Cached where? Boot cache dir?

micha19:08:38

remember the persistent cache thing we implemented a while ago?

micha19:08:41

gonna use it now

juhoteperi19:08:52

Is the bottleneck really decompressing the jars?

micha19:08:08

i think so

juhoteperi19:08:20

Interesting.

micha19:08:27

also a change we want to make is to have the jar task remove things it added to the jar from the fileset by default

micha19:08:33

or i mean add an option for that

micha19:08:45

a lot of time is spent writing out to target unnecessarily

micha19:08:10

so we could add an option to the jar task to suppress that, remove files it added to the jar from the fileset

micha19:08:34

move them to source paths probably

micha19:08:07

if you could profile your build that would be awesome too

juhoteperi19:08:13

Will the uber task be separate from jar in future too?

micha19:08:14

maybe you have some insight

micha19:08:19

yeah i think so

micha19:08:34

i think we can make it fast without needing to merge it into all the packaging tasks

micha19:08:43

caching will be a big help i think

juhoteperi19:08:45

I remember there was some speculation that a solution would be to add dependency jar contents directly to jar in jar task

juhoteperi19:08:54

so that fileset wouldn’t need to handle all the files in deps

micha19:08:03

yeah that was one plan

micha19:08:09

not so great though imo

micha19:08:14

but we need to do something

micha19:08:23

i want to see if caching works first though

micha19:08:04

the caching thing will be pretty useful generally too i think

micha19:08:25

(-> fileset (add-resource foo :cached? true) ...)

micha19:08:30

or something like that