edgecase / dieter

Asset pipeline ring middleware
134 stars 22 forks source link

load v8 at the last possible moment #60

Closed kbaribeau closed 5 years ago

kbaribeau commented 10 years ago

For me, this fixes #48. I am not on windows though, does anyone else want to try?

Since v8 is not always available, don't load it when the file is loaded, wait until someone calls into us with {:engine :v8} set.

bostonaholic commented 10 years ago

+1

jxa commented 10 years ago

Thanks!

kbaribeau commented 10 years ago

Np, thanks for merging!

jxa commented 10 years ago

Actually I need to revert the merge. After running the tests I find that the code should probably be

(require 'dieter.v8) ;v8 is not always available, load it at the last possible
(let [ws   (ns-resolve 'dieter.v8 'with-scope)
      call (ns-resolve 'dieter.v8 'call)]

But I can't verify at the moment because I get a segfault when it tries to load up v8 :(

When I get that straightened out I can merge this PR and your other one (which also is based upon this commit)

kbaribeau commented 10 years ago

Shucks, I could have sworn that I made branches with independent commits. I have a working v8 on this machine though, will look into it.

kbaribeau commented 10 years ago

Hey, so I pushed up a new version of my branch, but now I'm seeing a native error from v8 when running the tests. I've posted the log in a gist here: https://gist.github.com/kbaribeau/9027116

I'm not sure why calling into dieter.v8 using ns-resolve would be different from calling into it directly; and this log of the error is difficult to read for me.

I'll see if I can dig into a bit, but I'm also hoping that someone more familiar with v8 and java's native interop might have an immediate insight.

kbaribeau commented 5 years ago

Closing this since I haven't looked at it or needed it in years, and it keeps showing up in my list of open PRs.