Fork me on GitHub
#boot
<
2015-11-11
>
pandeiro00:11:28

still can't get ring's wrap-resource to serve things out of the fileset instead of directly from resource-paths

pandeiro00:11:16

i'm remembering back to the discussions about it being a bad thing to serve straight from target as a directory... but i'm not remembering the exact reasons

pandeiro00:11:47

for now it's the only option when i have an on-disk resource that gets modified during the build pipeline

pandeiro00:11:23

if i serve target, the updated version is seen; if i just serve through ring's resource response, the original on-disk version is fetched

pandeiro00:11:56

wonder if you guys who know the internals better can reason about why this would be; it makes no sense to me

wagjo08:11:51

@micha Dunaj should work fine simple_smile It's quite conservative wrt to the binary compatibility so it works with already AOTed code, but I imagine custom AOT would help other forks that have more substantial changes.

drakezhard08:11:34

@pandeiro I think I have the same issue, I have setup a pedestal server with target on the classpath, so that it can read from the output of an Om client task. Far than ideal, but I'm stuck.

martinklepsch10:11:54

@drakezhard: what do you want to achieve?

martinklepsch10:11:13

serve compiled cljs files mostly?

martinklepsch10:11:21

@drakezhard: basically the contents on the fileset are on the classpath already so if you setup your pedestal handler to serve resources from there it should work

martinklepsch10:11:47

@drakezhard: what exactly isn’t working as you would expect it to?

drakezhard10:11:52

I have this task (deftask server "Run a web server" [] ({{namespace}}/start :io.pedestal.http/join? true))

drakezhard10:11:27

The server starts and I have a hiccup template that links to a js resource

drakezhard10:11:55

I guess I don't have my routes properly setup

drakezhard10:11:11

I'll think about it and I'll get back at you

martinklepsch10:11:25

Sure. I unfortunately don’t know much about pedestal but probably some people in #C03S1KBA2 do simple_smile

mccraigmccraig11:11:53

i've mostly been using boot as a black-box via tenzing (thanks @martinklepsch !) without really understanding it's internals... i find i want to remove the js/app.out from my production cljs build (since it doubles upload times on my crappy dsl) ... i tried adding a post-wrap task so that "boot app build" would do this, but to no effect and no error - https://www.refheap.com/ab0688ce019b410d0e91b8887 . am i doing something obviously wrong ?

juhoteperi11:11:27

@mccraigmccraig: You can use built-in sift task to remove files from fileset

juhoteperi11:11:06

@mccraigmccraig: Like all built-in tasks, the documentation is included in Boot: boot sift --help

martinklepsch11:11:31

@juhoteperi: while it’s possible it’s non-obvious to me how to remove specific paths. do you use :include and :invert for that?

martinklepsch11:11:59

Seeing some strange behaviour on CI with 2.4.2 — Downloading dependencies seems to leak memory and ultimately causes the CI container to run out of memory. Issue does not exist with 2.3.0.

joelkuiper12:11:07

any idea on how to fix this?

joelkuiper12:11:08

java.lang.IllegalStateException:

Retrieving boot-reload-0.4.2.jar from 
Retrieving boot-cljs-repl-0.3.0.jar from 
     clojure.lang.ExceptionInfo: relevant-cljs-edn already refers to: #'adzerk.boot-cljs-repl/relevant-cljs-edn in namespace: boot.user
    data: {:file
           "/var/folders/15/ksxs2q354zqgytqvbydtw0q80000gn/T/boot.user3175080558938924148.clj",
           :line 45}
java.lang.IllegalStateException: relevant-cljs-edn already refers to: #'adzerk.boot-cljs-repl/relevant-cljs-edn in namespace: boot.user
                   ...                                        

joelkuiper12:11:16

;; Boot web dependencies
   [deraen/boot-less "0.4.2-SNAPSHOT" :scope "test"]
   [adzerk/boot-cljs "1.7.48-6" :scope "test"]
   [adzerk/boot-cljs-repl "0.3.0" :scope "test"]
   [adzerk/boot-reload "0.4.2" :scope "test"]
   [pandeiro/boot-http "0.6.3-SNAPSHOT" :scope "test"]])

juhoteperi12:11:19

@joelkuiper: Probably be using :refer [cljs] or such instead of :refer :all for the tasks, probably boot-cljs/reload/cljs-repl define the same function and they are not marked as private

joelkuiper12:11:24

@juhoteperi: ah yes, stupid should’ve had more coffee 😛

joelkuiper12:11:35

(require '[adzerk.boot-cljs :refer :all])
(require '[adzerk.boot-cljs-repl :refer [cljs-repl start-repl]])
(require '[adzerk.boot-reload :refer [reload]])

juhoteperi12:11:42

Anyway, the tasks should be fixed to mark those functions private

joelkuiper12:11:38

hmm did not completely fix it

joelkuiper12:11:41

java.io.FileNotFoundException: Could not locate cemerick/piggieback__init.class or cemerick/piggieback.clj on classpath.

juhoteperi12:11:36

@joelkuiper: Does cljs-repl print a warning about adding dependencies to your project+

joelkuiper12:11:37

ah yes, it does now. they didn’t need to be needed, hence the confusion

juhoteperi12:11:04

Yes I changed to logic on 0.3.0 to make the implementation simpler and more robust

joelkuiper12:11:17

Fair simple_smile thanks for the help!

juhoteperi12:11:39

I have an idea how to implement it properly so that user doesn't need to add those dependencies but it will require major refactor of all cljs tasks

joelkuiper12:11:16

ugh, cider-connect in Emacs now gives Wrong number of args (4) passed to: util/auto-flush/fn—738

joelkuiper12:11:22

not when connecting, that’s fine

joelkuiper12:11:26

but when actually opening the page

joelkuiper12:11:30

without the connection it’s fine

joelkuiper12:11:48

noting looks outdated, and no other errors thrown

joelkuiper12:11:10

boot -d boot-deps ancient
Searching for outdated dependencies...
Currently using [boot-deps "RELEASE"] but 0.1.6 is available
Currently using [org.clojure/core.async "0.1.346.0-17112a-alpha"] but 0.2.371 is available
Currently using [org.slf4j/slf4j-log4j12 "1.7.12"] but 1.7.13 is available
Currently using [adzerk/boot-test "1.0.4"] but 1.0.5 is available
Currently using [selmer "0.9.2"] but 0.9.5 is available
Currently using [markdown-clj "0.9.74"] but 0.9.79 is available
Currently using [ring/ring-mock "0.2.0"] but 0.3.0 is available
Currently using [metosin/compojure-api "0.23.1"] but 0.24.0 is available
Currently using [metosin/ring-swagger-ui "2.1.3"] but 2.1.3-2 is available
Currently using [org.clojure/clojurescript "1.7.145"] but 1.7.170 is available
Currently using [reagent-forms "0.5.12"] but 0.5.13 is available
Currently using [cljs-ajax "0.5.0"] but 0.5.1 is available
Currently using [cljsjs/react-with-addons "0.14.0-0"] but 0.14.0-1 is available
Currently using [deraen/boot-less "0.4.2-SNAPSHOT"] but 0.4.2 is available
Currently using [adzerk/boot-cljs "1.7.48-6"] but 1.7.170-3 is available

juhoteperi12:11:09

Do you have cider-nrepl 0.10.0-SNAPSHOT? I think it can cause problems with boot

joelkuiper12:11:06

looks like it’s this issue, some interaction with timbre https://github.com/boot-clj/boot/issues/298

joelkuiper13:11:29

checking if updating boot helps

joelkuiper13:11:04

yep, that fixed it

nha13:11:30

What can I do to add a directory to source-paths for a specific task ?

(deftask run-tests []
  (set-env!
   (update-in (get-env) [:source-paths] conj "test/clj"))
   (println "ENV AFTER " (get-env));; doesn't contain test/clj
  (test))

micha14:11:32

@nha: set-env! takes keyword/value pairs

micha14:11:06

(set-env! :source-paths #(conj % "test/clj"))

micha14:11:51

but i think what you have there should be supported, it totally makes sense to try that

nha14:11:24

Ah I see, thanks

pandeiro20:11:26

Should Closure-Compiler-compatible libs be added to cljsjs or is there a better way to publish/consume them?

martinklepsch20:11:15

@pandeiro: check out openlayers

martinklepsch20:11:41

It's closure compatible and packaged via cljsjs in a dce friendly way

alandipert20:11:11

donut cowboy event

alandipert20:11:14

rare, but possible

alandipert20:11:40

err nvm. that's not what it is

martinklepsch20:11:13

Dead code elimination

pandeiro20:11:09

@martinklepsch: I'm trying to go through the cljsjs queue but I forget what the process is

pandeiro20:11:56

If something LGTM, I merge and then pull master and boot build-jar push-release for that lib?

pandeiro20:11:04

Or do I just do the merging part?

pandeiro20:11:12

Or should I just LGTM stuff I've reviewed?

martinklepsch20:11:59

@pandeiro: boot package build-jar push-release :)

martinklepsch20:11:09

Should document this better

pandeiro20:11:18

ah right, forgot!

martinklepsch20:11:38

A change to contributing.md covering that would be great

pandeiro20:11:45

Maybe a maintainers section in the README itself?

pandeiro20:11:00

but yeah I can do that in contributing.md sure

martinklepsch20:11:50

Whatever you think is best 👍

martinklepsch20:11:15

Read me might be even better

martinklepsch20:11:51

People asked about how to instal locally before

dm320:11:14

@pandeiro: I force pushed the d3 3.5.7-0 update

dm320:11:40

so your comments are gone

pandeiro20:11:42

@dm3 are you able to build / test these locally?

dm320:11:00

yes, we're using that with vega

pandeiro20:11:19

awesome i'll merge soon

dm320:11:21

or through vega

pandeiro21:11:38

@martinklepsch: if a cljsjs PR is incomplete and I want to add something, how would you suggest doing that?

pandeiro21:11:24

I was thinking I could just merge and create a new branch and fix it... not sure though

jgdavey21:11:44

What’s the best way include an extra file into a jar? (something I don’t want on my classpath during dev)

jgdavey21:11:05

In this case, production log config

alandipert21:11:53

@jgdavey: a task that does merge-env! :resource-paths ... in the "constructor" perhaps?

jgdavey21:11:38

That would work, but I believe that would put it on the classpath during the rest of the build task (which spits lots of noise).

jgdavey21:11:00

I’ve never used the boot jar —manifest option

jgdavey21:11:20

Does that take files as values?

alandipert21:11:51

another option is a task after the jar is built

alandipert21:11:56

that patches the jar

jgdavey21:11:20

Interesting...

jgdavey21:11:42

Cool! That’s a good idea.

martinklepsch22:11:36

@pandeiro: I usually apply the changes locally and then amend or add additional commits

pandeiro22:11:33

ok cool; for now i've just responded to a few with comments indicating the changes to be made; and i've added labels

pandeiro22:11:50

i was able to merge and release 3-4 libs too

martinklepsch22:11:58

Have a small alias for curl and git am from a github pr patch file

martinklepsch22:11:28

@pandeiro: awesome! Thanks so much for your help - really appreciate it :)

pandeiro22:11:40

@martinklepsch: np, i will try to do more in the coming days

pandeiro22:11:54

i actually need to add and update things myself, so i'll be in there

martinklepsch22:11:55

There's also a new #cljsjs channel btw :)

pandeiro22:11:24

i'll ping you there about cljsjs from now on simple_smile

martinklepsch22:11:11

Sure :) thanks again:)