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

or an example of using boot checkout in an actual project?

micha00:12:06

@flyboarder: did you see the docstring?

micha00:12:11

boot checkout -h

flyboarder00:12:30

yeah but it wasnt working for me

flyboarder00:12:54

i run one instance from the dep project folder and the other from parent project folder?

micha00:12:54

suppose project A depends on project B

micha00:12:07

you have boot building the jar and installing it locally for B

micha00:12:27

then in A you use the checkout task to pull that jar as a checkout dependency

flyboarder00:12:44

am I required to pass in the deps I want to checkout?

flyboarder00:12:14

calling (checkout) will not do it for all of them?

micha00:12:35

you have to tell it which deps to chek out

micha00:12:44

otherwise how would it know what to do?

micha00:12:12

B could be built by anything, doesn't have to be boot

flyboarder00:12:20

I guess i assumed it would just do it for all of the listed deps if you didnt specify

micha00:12:21

as long as it installs a jar in maven locally

flyboarder00:12:36

it says it cannot find the dep artifact on clojars?

micha00:12:01

look in ~/.m2/

micha00:12:05

is it there?

micha00:12:26

if not then you're not building the dep jar and installing it locally

flyboarder00:12:07

(checkout :dependencies '[[lounge.toolbar "0.1.0"]])

micha00:12:36

lounge.toolbar doesn't look right

micha00:12:42

probably should be a slash, no?

flyboarder00:12:15

ah yes! im missing the org ns

flyboarder00:12:25

the quoting of the ns symbols keeps getting me caught up

onetom12:12:34

do we have a feel for how close is the v2.5 release? who is using it for daily development? im just asking because adi was throwing some strange errors and my tests ran slower and slower with every run:

Exception in thread "Thread-6" java.io.IOException: Stream closed, compiling:(adi/core/connection.clj:12:1)

martinklepsch12:12:18

@onetom: with 2.5.0-SNAPSHOT or 2.4.2?

onetom12:12:42

2.4.2; thats why im asking because i know some pod leaks have been fixed

martinklepsch13:12:07

I think the pod leak fix is in 2.4.2 already

martinklepsch13:12:33

but the fix for stream closed stuff is in 2.5.0

martinklepsch13:12:13

maybe give 2.5.0-SNAPSHOT a try?

martinklepsch14:12:29

Iโ€™m not sure whatโ€™s blocking 2.5.0, think itโ€™s related to the changes in gpg handling ...

martinklepsch14:12:54

changelog for 2.5.0 is as long as changes for all other versions combined ๐Ÿ˜„

onetom14:12:20

thx! i will give it a whirl tomorrow

onetom14:12:07

on my personal machine i can't even compile it now though, but maybe i just have to sleep on it simple_smile

onetom14:12:49

has anyone tried http2/spdy support for jetty? i was wondering how much faster could the load time be on localhost of an :optimization :none hoplon project

alandipert14:12:49

re: 2.5.0 we want to release but micha wanted to back out the recent gpg changes

alandipert14:12:02

which turned out to be tricky

onetom14:12:27

I tried to chuck jetty9 into boot-http based on the http://sunng.info/blog/blog/2015/07/25/ring-on-http2/ article but im getting this error:

java.lang.IllegalStateException: ALPN not available
        java.lang.IllegalStateException: ALPN must be in the boot classloader
org.eclipse.jetty.alpn.server.ALPNServerConnectionFactory.<init>  ALPNServerConnectionFactory.java:   52
org.eclipse.jetty.alpn.server.ALPNServerConnectionFactory.<init>  ALPNServerConnectionFactory.java:   40
                               ring.adapter.jetty9/create-server                        jetty9.clj:  127
                                   ring.adapter.jetty9/run-jetty                        jetty9.clj:  187
                                                             ...
                                  pandeiro.boot-http.impl/server                          impl.clj:  108

onetom14:12:53

i have no idea what is a bootclasspath but i saw some conversation about that a few days ago

onetom14:12:57

i tried to add -Xbootclasspath/p:org.mortbay.jetty.alpn:alpn-boot to BOOT_JVM_OPTIONS but that doesn't seem to be enough

jaen14:12:12

@onetom you have to download the jar matching you JMV version and then give path to the jar to -Xbootclasspath

jaen14:12:28

You also can do something hacky like this

onetom14:12:34

it's talking about openjdk though... not the oracle one ๐Ÿ˜•

jaen14:12:46

Oracle one works fine as well

jaen15:12:07

I'm using 1.8.0_66 and zero problems.

jaen15:12:31

#!/usr/bin/env bash

if [ -z "$ALPN_JAR_PROVIDED" ]; then
    if [ -z "$ALPN_JAR_PATH" ]; then
        boot_classpath=`boot show -c`;

        IFS=':' read -ra boot_classpath <<< "$boot_classpath";
        for i in "${boot_classpath[@]}"; do
            if [[ `echo "$i" | grep "alpn-boot"` ]]; then
              ALPN_JAR_PATH=$i;
            fi
        done
    fi

    echo "ALPN jar found at: $ALPN_JAR_PATH";
    ALPN_JAR_OPT="-Xbootclasspath/p:$ALPN_JAR_PATH";
else
    echo "ALPN jar already provided"
fi

export PANDA5_SSL_TRUSTSTORE=${PANDA5_SSL_TRUSTSTORE:-"../../certs/server.truststore"}
export PANDA5_SSL_KEYSTORE=${PANDA5_SSL_KEYSTORE:-"../../certs/server.keystore"}

read -d '' BOOT_JVM_OPTIONS<<-EOF
$JAVA_OPTS $ALPN_JAR_OPT -Xmx2g -client -XX:+UseCompressedOops -XX:+TieredCompilation \
-XX:TieredStopAtLevel=1 -Xverify:none -Dclojure.compiler.disable-locals-clearing=true \
-XX:-OmitStackTraceInFastThrow -XX:+CMSClassUnloadingEnabled -XX:+UseG1GC -XX:MaxGCPauseMillis=200 \
-XX:ParallelGCThreads=10 -XX:ConcGCThreads=4 -XX:InitiatingHeapOccupancyPercent=75 \
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=${PANDA5_JDPA_PORT:-5005}
EOF

BOOT_JVM_OPTIONS="$BOOT_JVM_OPTIONS" boot "[email protected]";

jaen15:12:41

^ this is my ./boot script

jaen15:12:49

It's good enough for development

jaen15:12:33

I put the ALPN jar as a :scope "test" dependency and then just get the path from boot

jaen15:12:11

For deployment you'd want to just have the jar somewhere else and pass it to the java command

onetom15:12:50

thx. i also just had it downloaded with boot but didnt think about the :boot "test" bit.

onetom15:12:06

r u using a mac too?

jaen15:12:26

I hate macs with undying passion, sorry xD

jaen15:12:45

But it should work under mac as well, I guess.

jaen15:12:09

From the terminal they're pretty similar

jaen15:12:28

as for :scope "test" that's only for the jar to not end up in the uberjar

jaen15:12:01

It would just be dead load, since you have to have it outside the archive you run to provide it on the boot classpath

onetom15:12:00

based on your avatar u still have a lot of hair... i suspect i lost most of my hair while compiling linux kernels are trying to configure x11 servers with multiple monitors or the poulsbo chipset by excluding some video memory regions to avoid random freezes and allow wake from sleep. i have fraction of the problems on macs compared to that...

jaen15:12:31

> poulsbo

jaen15:12:36

okay, that explains everything

jaen15:12:48

Actually, the avatar is misleading - I'm 25 and while I have long-ish hair on the side, I am totally balding on the top : |

jaen15:12:24

I also had some problems with Linux, but not as big as yours and I really appreciate being able to run xmonad.

onetom15:12:36

see, u have to be careful w linux ;D

onetom15:12:48

true, xmonad rox

dm315:12:00

amethyst kinda works on osx

dm315:12:11

not as stable though

onetom15:12:39

dm3: u mean it crashes? what happens when it crashes?

dm315:12:52

no, it sometimes becomes unresponsive

dm315:12:54

not sure why

dm315:12:16

just hangs for several seconds when you try switching windows

jaen15:12:10

I probably wouldn't be able to live without a tiling wm, especially now that my cat trashed my second screen and I'm force to work on one '

jaen15:12:25

Anyway, if there's any more problems with HTTP2 then feel free to ask

jaen15:12:37

I've gone through that recently, though with Immutant not Jetty

onetom15:12:29

@jaen: since im trying to just use it as a local dev server, can i just run it without encryption? or even without encryption i still need this ALPN thing?

jaen15:12:59

You can't run HTTP2 without encryption

jaen15:12:03

It requires SSL

jaen15:12:51

ALPN is part of HTTP2's extension to SSL for protocol negotiation

jaen15:12:58

If you want to run without HTTP2

jaen15:12:10

Then sure, you need neither of those

onetom15:12:11

ah, i just read https://www.cloudflare.com/http2/what-is-http2/ but not closely enough. it indeed states: > HTTP/2 does not technically require an encrypted connection, but the majority of implementations only support HTTP/2 when used in conjunction with SSL/TLS. > No browsers currently support HTTP/2 over an unencrypted connection.

jaen15:12:53

Yeah, it's not a MUST in the spec, but is implemented as such nonetheless.

onetom15:12:56

how can i get those PANDA_SSL certs?

onetom15:12:09

im afraid there are just too many things which i dont understand in this setup, it's better if i delay experimenting it, since my colleagues would understand it even less

jaen15:12:19

Ah, sorry

jaen15:12:25

That's project-specific for me

jaen15:12:38

You need to generate your own keystores

jaen15:12:42

Let me find the example

onetom15:12:16

the server booted up but im getting a "invalid_preface" as a response if i visit my site with chrome

onetom15:12:30

thx again for the help; i saved your script

jaen15:12:57

The keystores need to be used to create an SSL context; with Immutant you just can pass this as options, not sure how with Jetty adapter

jaen15:12:06

But there's probably something similar

jaen15:12:19

Also, no problem; if anything's still unclear feel free to ping me

jaen15:12:45

Probably the biggest issue is boot not being able to have a similar plugin as lein does for bootclasspath dependencies

jaen15:12:53

You have to wrap it with a script like that

onetom15:12:39

i know the java keytool. i've actually read its source because i tried to port the jarsigner to red so it won't depend on the jvm for apk file generation ๐Ÿ˜‰

jaen15:12:00

Hah, good for you then; I didn't.

onetom15:12:08

u dont want to ;D

jaen15:12:21

Had to read up on how to create the keystore and then a truststore for that self-signed certificate.

jaen15:12:57

But to sum this thing up - you basically only need the ALPN jar in the bootclasspath (which the script does) and SSL set up and HTTP2 should be working.

onetom16:12:14

understood and thanks again. i wont give up!

jaen16:12:11

That's the proper attitude ; d If anything, feel free to ask, though I imagine that's quite enough explanation for you to go on.

bassem17:12:46

hello, i'm a new user of boot. I started using it in a previous project at work. Have been a lein user in the past. I have a question with regards to the workflow ? Is the best practice is to use both lein and boot ?

bassem17:12:09

for example, i like some of the lein plugins, like lein-ancient

bassem17:12:44

how would i use that together with boot ? they seem somewhat orthogonal boot and lein

martinklepsch17:12:54

@bassem: usually you use one of both

martinklepsch17:12:32

in particular for ancient like stuff use boot show --updates (or short boot show -u)

bassem17:12:56

i see, ok great. I must've missed that one.

bassem17:12:16

thx again, i'm finding it very pleasant to use for sure.

bassem17:12:55

trying to migrate all my clojure projects at work to boot at the moment.

micha18:12:24

@bassem: a useful thing if you want to interop between boot and lein is boot show -e

micha18:12:42

you can extract the information about dependencies etc from there

bassem18:12:59

ok great. thx @micha