Fork me on GitHub
#boot
<
2015-11-09
>
martinklepsch00:11:02

@micha: ^ this seems to be the cause (bisected it). Got to sleep now, later! simple_smile

micha00:11:50

your commit must have overwritten something

micha00:11:56

i mean master works ok

martinklepsch00:11:48

@micha: yeah that’s indeed strange but if you look at the diff for the branch there is very little change: https://github.com/boot-clj/boot/compare/master...7f566df < before reversing https://github.com/boot-clj/boot/compare/boot-builds-boot2 < after reversing

martinklepsch00:11:52

also to add more confusion: all of this is built with 2.4.2 i.e. the code that does the newPod changes can impossibly be used by boot during compilation

micha00:11:15

you need to do some fancy footwork there

micha00:11:20

like install a fake version

martinklepsch00:11:42

how do you mean install fake version?

micha00:11:53

your build.boot doesn't call makePod though does it?

martinklepsch00:11:01

calls it via aot task

micha00:11:19

that seems like a problem

micha00:11:27

why would we call that during aot?

martinklepsch00:11:55

there’s a compile pod …(?)

micha00:11:10

i don't thnk that's right

micha00:11:24

like boot 2.4.2 works

micha00:11:50

we can't aot boot in boot

micha00:11:54

i forgot about that

martinklepsch00:11:10

but why does it work before the reverted change?

micha00:11:19

i don't think it really does

micha00:11:33

i think it was producing incorrect compiled bytecode

micha00:11:05

if a namespace is already loaded when you call compile to aot, i think it uses the one that's loaded

martinklepsch00:11:06

the jars definitely worked as far as I can tell

micha00:11:18

well only because we hadn't changed anything

micha00:11:36

so the version of the namespace you were aot'ing was the same as the one in the source

martinklepsch00:11:39

oh right, now that makes sense

martinklepsch00:11:55

essential conclusion is we don’t aot boot pod stuff? could we make pods that don’t have boot.pod loaded?

martinklepsch00:11:23

and boot.App as well perhaps

micha00:11:30

maybe i'm wrong about the aot situation

micha00:11:38

but i don't think we want to do that

micha00:11:48

i mean make special pods with no pod stuff in them etc

micha00:11:03

there would be no advantage to that over what we have now

micha00:11:17

lol building a build tool to build the build tool

martinklepsch00:11:56

I need to sleep. Let me know what you think is best to fix this/move forward.

micha00:11:06

ok i'll think about it

ska11:11:56

Hi. I just tried to run a bootified clojure script which uses a shebang like

#!./boot
instead of
/usr/bin/env boot
and this fails with an error message saying that the script-name is not a task. Does boot behave differently?

micha12:11:05

@ska: using a shebang with #!./boot isn't supported

micha12:11:15

what's the use case for that?

ska12:11:17

OK, thanks

ska12:11:10

Easily shipping something to be run somewhere else. Just check in the boot Loader as

boot
and then after a checkout of only two files (boot + the .clj file) one would be able to run it.

micha12:11:39

i don't think that would do what you want

micha12:11:10

it would only work when the use was in the same directory as boot

ska12:11:06

Yes, sure. It is for a really quick prototypish thing that I want to run on a temporary EC2 machine on which I don't want to install any stuff...

ska12:11:42

Anyway, I got the uberjar compilation already set up, and the remote REPL session, too. simple_smile

micha12:11:28

@dave made a thing yesterday that you might find useful

micha12:11:37

that might be equivalent to the shebang in your case?

ska12:11:40

Shouldn't it honor JAVA_HOME?

micha12:11:09

it uses java from the path

micha12:11:30

but you can set the BOOT_JAVA_COMMAND

ska12:11:48

Yeah, I know. Just as boot itself does. Compare that to the effort, gradlew makes to set up the environment. 😉

martinklepsch12:11:35

@micha regarding the aot thing: it's not about aot but having the boot.pod ns on the classpath when the compile pod is being created. It overrides the namespace as it is shipped by the invoked boot.

micha12:11:41

what does gradlew do?

ska12:11:45

... 164 lines until the exec call to JAVA_CMD

ska12:11:45

Basically setting up CLASSPATH and JAVA_CMD with support for darwin, mingw and cygwin

micha12:11:56

@martinklepsch: yeah, i think we want to eventually not do AOT when we build the boot jars

micha12:11:17

and do the AOT at runtime with caching

ska12:11:21

Anyway, thanks for the pointers. I will continue with my current setup. All is fine.

micha12:11:30

maybe gradlew is a good place to look for windows support stuff

micha12:11:53

but since i don't use windows it's difficult to really know

martinklepsch13:11:28

@micha: while the issue occurs during AOT it’s really not AOT specific. any task that redefines namespaces to use updated functions from boot/base will fail when ran with a version of boot/base that doesn’t have those updated functions

martinklepsch13:11:28

I guess there’s no way we can replace an already loaded version of boot.App with one we take from a dependency added via set-env! right?

micha13:11:54

@martinklepsch: i don't think there is a way to do it without a lot of fanciness

micha13:11:14

but i think the real problem is with aot itself

micha13:11:22

i mean i don't think we want to aot boot

micha13:11:28

not when we package it anyway

micha13:11:41

i think it should aot itself the first time you run it

micha13:11:55

and cache the compiled class files in BOOT_HOME somewhere

micha13:11:05

this way we don't need to worry about binary compatibility issues

micha13:11:26

so we'd package only the clj source files in the jars

micha13:11:16

boot.App we can build with jaavc or something

adamfrey15:11:45

I’m having trouble using (sift :move …) to move a file that is nested many directories deep to a root directory. It’s just renaming the file at the deep directory level.

pandeiro15:11:47

@juhoteperi: could boot-reload automatically resolve the websocket host name from the current (.-location js/window) to enable remote reloading without having to hard-code an IP?

micha15:11:30

@adamfrey: can you paste your usage please?

adamfrey15:11:30

(sift :move
         {#"4.4.0/css/(.*)" "csss/$1”})

adamfrey15:11:13

here’s the fileset object before sifting

META-INF
└── resources
    └── webjars
        └── font-awesome
            └── 4.4.0
                └── css
                    └── font-awesome.min.css

micha15:11:39

and after?

adamfrey15:11:59

META-INF
└── resources
    └── webjars
        └── font-awesome
            └── csss
                └── font-awesome.min.css

juhoteperi15:11:31

@pandeiro: No need for host name as boot-reload by default uses relative url to open WS connection

micha15:11:42

@adamfrey: that looks correct to me

adamfrey15:11:44

@micha: which is not completely suprising, but how do I get it back to the root

adamfrey15:11:00

to /csss/file.css

micha15:11:09

it's doing

(cloojure.string/replace "META-INF/resources/webjars/font-awesome/4.4.0/css/font-awesome-min.css" #"4.4.0/css/(.*)" "csss/$1")

micha15:11:33

anchor the regex is what i'd recommend

adamfrey15:11:35

right, so I just need to specify the whole path instead of just part of it

micha15:11:47

it just needs to be greedy

micha15:11:01

so a .* in the front perhaps

adamfrey15:11:47

oh ok. It’s working now. Thanks for the the internal code sample, that demystifies it for me

micha15:11:47

#".*4.4.0/css/(.*)" should do it

esp116:11:09

i’m trying to build a boot task to prerender js (i’m basically egregiously copying the boot-hoplon prerender task). i have some html files that i have added to (set-env! {:resource-paths #{…}}), but i noticed that the cljs task is not copying them into the same dir as the js output, which causes phantomjs to fail as it can’t find the js files referenced in the html.

martinklepsch16:11:21

@esp1: do you have a cljs.edn?

esp116:11:59

no… what does that do?

martinklepsch16:11:13

@esp1: the files in resource paths will just be moved to the fileset relative to the dirs they’re in

esp116:11:58

i’m looking over the boot-cljs docs now… it seems like it is for configuring the cljs compilation, but in my case i’m just trying to force the html files to be copied into the same dir as the js output of the cljs task. i did notice that the hoplon task is creating blah.html.cljs.edn files, but i’m trying to figure out what that’s for

martinklepsch16:11:38

@esp1: you just need to move files into the right place in your directory structure

martinklepsch16:11:51

@esp1: is your project on github by any chance?

esp116:11:40

the html files in the resource paths do get moved to the output directory just fine, and they wind up in the right place, but the phantomjs task is referencing them from the .boot/cache/tmp dirs, and at that point the html files are not present alongside the js

esp116:11:21

@martinklepsch: no, it’s not on github right now. i could try to publish it but it’s kind of a mess atm

martinklepsch16:11:09

if you try to run it directly from the fileset referencing files by their relative paths might not work as you would expect

esp117:11:44

i’m using absolute paths

esp117:11:02

let me try to publish an example to make it clearer

esp117:11:47

actually, has anyone built a prerender boot task for anything other than hoplon? that’s ultimately what i’m trying to do

pandeiro17:11:30

@esp1: couldn't phantom load via http:// instead of file:// ?

esp117:11:47

@pandeiro: yes, but i’m trying to do the prerender as part of a boot pipeline and have it spit out the prerendered html at the end, just like the hoplon prerender task

pandeiro17:11:07

(comp (watch) (serve :port 8080) (cljs) (execute-phantom-script :port 8080)) <- something like this would be my approach

pandeiro17:11:36

i don't know if it will help at all but i did a little project that uses boot to prerender server-side

pandeiro17:11:26

i don't think it's a drop-in solution but there may be code there in the defcljs macro or thereabouts that could help

esp117:11:00

@pandeiro: i will take a look, thanks!

esp117:11:56

ooh i think i just found the issue

esp117:11:26

if i add an html file in a resource directory via (set-env! {:resource-paths #{“resource-dir"}}), then it does *not* get added to the same .boot/cache/tmp dir as the js output of the cljs task. However if I create a (tmp-dir!), add the html file to it and then add the tmp-dir to the fileset via add-resource, then it shows up alongside the js when the cljs task is run.

esp117:11:24

so it seems like paths added via the env and via add-resource are handled differently...

pandeiro17:11:47

@esp1 Yeah makes sense to me

pandeiro17:11:17

I've had some problems with something related recently actually (https://github.com/pandeiro/boot-http/issues/29)

juhoteperi17:11:04

I did update https://github.com/boot-clj/boot/wiki/Deploying-with-Boot minimally to match the new GPG stuff

juhoteperi17:11:35

Could use improvmenets, and the new GPG implementation could use lots of testing

martinklepsch17:11:46

@juhoteperi: what exactly would be good to test there, if I just continue using env variables for my clojars credentials does this use “the new code”?

juhoteperi18:11:49

@martinklepsch: Using bootlaces and env variables still uses the new signing implementation, but it doesn't use new credentials stuff

martinklepsch18:11:25

for new credentials stuff I use the $BOOT_HOME/credentials.clj.gpg approach?

martinklepsch18:11:18

$BOOT_GPG_BINARY mentioned on the wiki page seems to be just $BOOT_GPG

martinklepsch18:11:30

Reason was that the chosen :repo (via push task) wasn’t in (get-env :repositories)

martinklepsch18:11:03

When supplying :gpg-sign true I get messages like "You need a passphrase to unlock the secret key for.. ” but no prompt to enter such password — is that a bug?

martinklepsch18:11:03

Also how can I detect if a clojars artifact is properly signed?

juhoteperi19:11:53

snapshots are not signed

juhoteperi19:11:41

sounds like a bug, but could also be caused by your gpg settings

juhoteperi19:11:01

if you run just gpg --sign random-file from terminal, does it ask for password?

martinklepsch20:11:28

huh it prints the same message but signing seems to work

martinklepsch20:11:57

also decrypting seems to work fine, maybe this message is just how my gpg command behaves