Skip to content
This repository has been archived by the owner on Jan 29, 2025. It is now read-only.

Allow clj-v8 to be bundled in an uberjar #7

Merged
merged 2 commits into from
Jan 1, 2014

Conversation

magnars
Copy link
Contributor

@magnars magnars commented Nov 23, 2013

  • clj-v8 fails in an uberjar, since it relies on its files to be
    accessible on the file system.
  • this is because JNI and JNA relies on the native binaries to be on the
    file system.
  • so in order to be bundled in an uberjar, we have to copy the files out
    to a temporary location when loading the native library.

The entire investigation can be read for your amusement or horror in CircleCI-Archived/stefon#9.

I have not been able to run your tests - since that too results in a UnsatisfiedLinkError (see #6), but I have packaged this version in our uberjar, and that works.

- clj-v8 fails in an uberjar, since it relies on its files to be
  accessible on the file system.

- this is because JNI and JNA relies on the native binaries to be on the
  file system.

- so in order to be bundled in an uberjar, we have to copy the files out
  to a temporary location when loading the native library.
magnars added a commit to magnars/optimus that referenced this pull request Nov 23, 2013
- clj-v8 fails in an uberjar, since it relies on its files to be
  accessible on the file system.

- this is because JNI and JNA relies on the native binaries to be on the
  file system.

- so in order to be bundled in an uberjar, we have to copy the files out
  to a temporary location when loading the native library.

See CircleCI-Archived/clj-v8#7
@pbiggar
Copy link
Contributor

pbiggar commented Nov 25, 2013

Responding in CircleCI-Archived/stefon#9 to keep discussion in the same place.

@magnars
Copy link
Contributor Author

magnars commented Nov 26, 2013

We've been using this in production (in uberjars on Ubuntu), and on development machines, both OSX and Linux, for a few days. Just as a heads up. :-)

@magnars
Copy link
Contributor Author

magnars commented Dec 2, 2013

Still working nicely. Have you tried running the tests?

@magnars
Copy link
Contributor Author

magnars commented Dec 4, 2013

This has now been tested further on some 32 bit linux machines as well. Had to add some archetypes to the native binary lookup. But now that works too.

@magnars
Copy link
Contributor Author

magnars commented Dec 22, 2013

What's up with the lack of response? I see it's been a year since any development has been done. When I said in #clojure on freenode that I was using clj-v8, someone said "Isn't that project dead?" ... Is it?

@pbiggar
Copy link
Contributor

pbiggar commented Dec 22, 2013

Sorry for the lack of response. I've been ultra busy for the last few weeks, but there wasnt anyone at Circle who knew clj-v8 (or stefon) deeply enough to pick it up.

The project isn't dead at all. It's feature complete for the stefon use-case, and no-one has requested/contributed other use cases (and I don't have any other ones).

RE this PR, I think it's valuable, just needed the time to look more closely at it.

@magnars
Copy link
Contributor Author

magnars commented Dec 22, 2013

Hi Paul,

Thanks for the response. I know the stress of being swamped with work. I'm
glad to hear clj-v8 isn't dead. :-)

Hope you get some time off for the holidays, and hope to hear from you
after that.

  • Magnar

On Sun, Dec 22, 2013 at 11:02 PM, Paul Biggar [email protected]:

Sorry for the lack of delay. I've been ultra busy for the last few weeks,
but there wasnt anyone at Circle who knew clj-v8 (or stefon) deeply enough
to pick it up.

The project isn't dead at all. It's feature complete for the stefon
use-case, and no-one has requested/contributed other use cases (and I don't
have any other ones).

RE this PR, I think it's valuable, just needed the time to look more
closely at it.


Reply to this email directly or view it on GitHubhttps://github.com//pull/7#issuecomment-31097099
.

pbiggar added a commit that referenced this pull request Jan 1, 2014
Allow clj-v8 to be bundled in an uberjar
@pbiggar pbiggar merged commit efff945 into CircleCI-Archived:master Jan 1, 2014
@pbiggar
Copy link
Contributor

pbiggar commented Jan 1, 2014

Apologies for the delay, this looks good.

@magnars magnars deleted the run-in-uberjars branch January 2, 2014 07:28
@magnars
Copy link
Contributor Author

magnars commented Jan 2, 2014

Thanks for the merge!

How do you do releases?

@pbiggar
Copy link
Contributor

pbiggar commented Jan 4, 2014

If you want to make a PR with the updates for the release, I can do the push to clojars.

@magnars
Copy link
Contributor Author

magnars commented Jan 4, 2014

I can do that. But do you mean there's something else to do than bump the version? I see that clj-v8-native is on version 0.1.4, but clj-v8 doesn't use it - it's still on 0.1.3. Any thoughts on that?

@pbiggar
Copy link
Contributor

pbiggar commented Jan 4, 2014

Adding a changelog to the README, and updating the version numbers were what I was thinking.

@magnars
Copy link
Contributor Author

magnars commented Jan 4, 2014

0.1.4 or 0.1.3 for native?

@pbiggar
Copy link
Contributor

pbiggar commented Jan 4, 2014

0.1.4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants