Fork me on GitHub
#boot
<
2015-08-15
>
onetom17:08:27

i was wondering how could i speed up out multi-page site development

onetom17:08:19

while we were doing the hoplon6 migration, we have deleted all of the pages except one and we were testing the results with only that

onetom17:08:55

i was wondering if i could specify some kind of limitation to which pages do i want to render

onetom17:08:36

i thought about sifting in only the relevant sources but since there are some common parts it's not obvious which sources do i need

micha17:08:30

i believe the cljs compiler task has an :id option now

onetom17:08:31

my other idea is – similar to mocha --grep – is to specify a page name regex to hoplon and it would only compile those pages

micha17:08:49

the hoplon compiling is really fast

micha17:08:58

it's the cljs that's the issue i bet

onetom17:08:42

sure, i just thought it's even easier to solve the problem earlier in the pipeline

micha17:08:22

oh, we could do that, too

onetom17:08:27

since the (page) function calls identify those source i want to filter

micha17:08:40

sift would do it, no?

micha17:08:53

oh wait, sift works on output files only i think

juhoteperi17:08:02

Hmh, I should probably try to get the new boot-cljs released soon. I'm thinking there are maybe three things to fix before that.

micha17:08:09

which things?

juhoteperi17:08:28

Cljs version comparison (1.7.100 > 1.7.48), some problem with cljs tests caused by shim ns, and displaying warnings prettily

juhoteperi18:08:32

Ah, and now that :output-dir is not always /out it quite hard to se asset-path option manually

micha18:08:49

i don't fully understand the need to mess with asset-path

juhoteperi18:08:51

We need to either provide good documentation about how to properly do things

juhoteperi18:08:56

or support setting asset-path

juhoteperi18:08:06

I'm thinking it's easier to support asset-path option....

micha18:08:27

i mean i don't have a good idea of the use cases people are interested in

juhoteperi18:08:07

I'm thinking in 90% use cases people have files in public/ prefix and serve that as /.

juhoteperi18:08:44

And in most cases good solution is to compile cljs to js/ and serve that as js/.

micha18:08:18

the "webroot" situation

micha18:08:37

i guess two separate one

micha18:08:47

webroot and scriptroot

juhoteperi18:08:43

There might also be some cases where user needs to use absolute asset-path

juhoteperi18:08:10

Like in dev build with a blog where different pages are using directories.

juhoteperi18:08:37

But perhaps current implementation already works, asset-path is set to sane default and user can override it using :compiler-options

micha18:08:09

i think i have auto-reconnect working in boot-reload btw

juhoteperi18:08:11

It just needs a mention that output-to ends with {{id}}.out instead of just out/

juhoteperi18:08:36

Or maybe we could append last part of output-to to asset-path

juhoteperi18:08:05

Though then we should have boot-cljs asset-path option so we don't mess with how cljs asset-path option works

micha18:08:40

why not just a webroot option?

micha18:08:53

we can prepend that to the :asset-path we give cljs compiler

juhoteperi18:08:41

I guess it would work the same, but the name makes sense

juhoteperi18:08:07

Boot-reload could use the same name

juhoteperi18:08:00

What would scriptroot option do?

micha18:08:06

we could add it to the .cljs.edn really

juhoteperi18:08:18

Yeah it should be per module

micha18:08:22

i think scriptroot is nothing, i was confus

micha18:08:42

yeah so boot-reload would just look at the cljs.edn

juhoteperi18:08:27

Really strange this cljs refresh bug. If I save app.core once, then changes in app.test work fine, but before that changes to app.test don't work.

juhoteperi18:08:07

I added "shim" ns to cljs.jar test and it still works

juhoteperi18:08:22

Both with cljs.build.api/watch and build

juhoteperi18:08:19

And identical cljs compiler options 😕

juhoteperi19:08:25

I wonder how cljs is reading anylysis cache for hello-world.core as that shouldn't be cached yet

juhoteperi19:08:52

And why boot doesn't use analysis cache

micha19:08:32

maybe timestamp related?

juhoteperi19:08:02

Does boot change timestamps for unchanged files?

micha19:08:11

it shouldn't

juhoteperi19:08:15

Cljs writes and reads cache files directly from output-dir

juhoteperi19:08:29

And that dir shouldn't change between builds

juhoteperi19:08:36

With Boot-cljs Cljs reads some files from another dir

juhoteperi19:08:22

Ha, I managed to reproduce the issue with pure Cljs

micha19:08:36

whew! how did you do it?

juhoteperi19:08:12

Moving shim ns to separe folder and passing only that folder to cljs.build.api/build. Then having the real files in classpath.

micha19:08:46

we can add the tmp-src dir to the classpath i think, no problem

juhoteperi19:08:32

I'm not sure if that's the problem

juhoteperi19:08:51

Besides, it should be in classpath already?

juhoteperi19:08:58

At least once cljs task has run?

micha19:08:00

i think it's in a temp dir

micha19:08:14

no because it makes a new one each time

juhoteperi19:08:16

The temp-dir contents are commited as resources

micha19:08:28

yeah but next build those don't exist yet

micha19:08:43

they need to be added again each build

juhoteperi19:08:10

Hmm but I'm not sure if that's the problem.

juhoteperi19:08:31

There could be some bug in Cljs with handling cache file paths

juhoteperi19:08:45

I tried adding the folder with shim ns to classpath and that didn't fix it