Fork me on GitHub
#boot
<
2016-07-19
>
alandipert01:07:43

@michael.heuberger: sounds like you want a ring middleware in your application... You could adapt one that rewrites / to index.html

michael.heuberger01:07:46

@alandipert: yep, most likely. can you point me to a working example with latest code?

alandipert01:07:42

@michael.heuberger: Not at the moment but perhaps Google can

michael.heuberger02:07:16

already searched and couldn’t find an useful one which is up to date

seancorfield03:07:27

@michael.heuberger: If every request always serves up the same index.html, how do dynamic requests within the SPA get handled?

michael.heuberger03:07:44

@seancorfield: good question but i think we can sort this out in the client side code with the HTML5 pushState

cpmcdaniel13:07:41

clojure.lang.ExceptionInfo: clojure.lang.PersistentList cannot be cast to java.lang.String data: {:file "/tmp/boot.user5719703267156340457.clj", :line 21}

cpmcdaniel13:07:49

is there anyway to see that tempfile?

cpmcdaniel13:07:00

it’s gone by the time boot exits

micha14:07:56

@cpmcdaniel: also you can add the wait task at the end of the pipeline so boot doesn't exit

cpmcdaniel14:07:01

that doesn’t work

micha14:07:22

how do you mean? boot still exits?

micha14:07:45

that's definitely something else going on then

micha14:07:00

because the wait task with no options should just wait forever

cpmcdaniel14:07:29

there is something wrong with my dependencies

micha14:07:58

that would explain it, it would never get to the pipeline part then

micha14:07:15

so boot -b will let you see what's on line 21

micha14:07:24

boot -b |cat -n

cpmcdaniel15:07:42

ok, I sorted through all that

cpmcdaniel15:07:49

now I have an interesting one for you

micha15:07:55

haha excellent!

cpmcdaniel15:07:06

I’m using the boot watch task to run tests on changes

cpmcdaniel15:07:16

however, it doesn’t like that I am using sqlite

cpmcdaniel15:07:24

Testing lcm.api.action-test java.lang.UnsatisfiedLinkError: Native Library /tmp/sqlite-3.7.151-amd64-libsqlitejdbc.so already loaded in another classloader

cpmcdaniel15:07:28

going to do a bit of googling on this

micha15:07:29

yeah you will need to load native libraries only once

micha15:07:46

the JVM doesn't really have any kind of isolation story for native libs

micha15:07:32

if the sqlite wrapper you're using loads the library when you require the namespace you may need to fix it so that it checks if it's already been loaded

micha15:07:41

and make PR upstream

micha15:07:03

not sure how to do it but the JVM probably provides some way to list loaded libs

cpmcdaniel15:07:22

so in the boot file I will need to require the jdbc driver and do something with it to cause it to load in the “main” classloader?

micha15:07:54

have you determinted that it's the jdbc driver that does the loadLibrary call?

micha15:07:59

*determined

micha15:07:02

if you get to the bottom of it maybe we can wrap this up in some helper functions in boot.pod namespace or something

micha15:07:48

any code that assumes only one clojure runtime will see issues like this if namespaces have JVM-global side effects

micha15:07:11

like if the library assumes that a namespace won't be compiled more than once in a single jvm

cpmcdaniel15:07:08

in this case it is a pure java JDBC driver

cpmcdaniel15:07:24

wait, not pure

cpmcdaniel15:07:40

I meant that Clojure namespace compilation is not the issue

cpmcdaniel15:07:16

so, I imported and loaded the native library in my build.boot

cpmcdaniel15:07:22

but that didn’t solve the problem

cpmcdaniel15:07:33

now the first iteration of the unit tests fails

cpmcdaniel15:07:38

instead of the second

micha15:07:47

right yeah

micha15:07:55

that's what i mean about fixing it upstream

micha15:07:13

you'll get that error if you try to load a dll twice

micha15:07:46

if you modify the code that's calling loadLibrary to catch that exception i think that would probably be the best solution

micha15:07:55

maybe you need to do something with classloaders if the dll you need is loaded by another classloader already, i dunno about that

micha15:07:21

maybe you can just catch the exception though

micha15:07:30

and the rest will just work

mattly19:07:47

btw, on that ^, it's not so much a bug report as a "I started getting this weird error and breakage after updating, without any documentation as to why"

flyboarder20:07:13

has anyone here played with zippers? Im working on a boot-task that inlines files but the zipper is throwing me off

flyboarder22:07:28

💡 i got it

hrathod22:07:57

I think there might be an issue with boot-cljs-repl 0.3.3. Getting uncaught exception invariant violation registercomponent(...) errors, while I am not getting that with 0.3.2.

hrathod23:07:54

Nevermind, that was not the problem. However, I don't know what is.