Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

natives/*.js missing in build/release #483

Open
cool2man opened this issue Oct 26, 2016 · 5 comments
Open

natives/*.js missing in build/release #483

cool2man opened this issue Oct 26, 2016 · 5 comments
Labels

Comments

@cool2man
Copy link

After building the project

git clone https://github.com/plasma-umass/doppio.git
cd doppio
npm install
grunt release

I could not find the natives directory inside build/release.
This situation has changed since my last build on an older version (at the begin of September).

Without these js-files, I can't get my solution running inside browser.

@jvilk
Copy link
Member

jvilk commented Oct 26, 2016

I added another way to register native modules with DoppioJVM, and opted to use that method for the built-in natives to remove some startup cost.

You have two options:

  • Use the new API to register a function that, when called, returns the same object you passed to registerNatives before.
  • Use the old API. Re-generate listings.json by running node ./node_modules/browserfs/dist/scripts/make_xhrfs_index.js in the build directory after placing your file in the desired location.

@jvilk jvilk added the question label Oct 26, 2016
@cool2man
Copy link
Author

Sorry, but I do not understand - even both options :-(

For both options I need the *.js files - but they are not be built anymore?!?
My build/release looks like:

coolbook:doppio coolman$ ls -l /Users/coolman/Development/doppio/build/release 
total 5064
lrwxr-xr-x  1 coolman  staff       41 27 Okt 10:27 classes -> /Users/coolman/Development/doppio/classes
-rw-r--r--  1 coolman  staff   397755 27 Okt 10:28 doppio.js
-rw-r--r--  1 coolman  staff  2167449 27 Okt 10:28 doppio.js.map
-rw-r--r--  1 coolman  staff    11652 27 Okt 10:28 listings.json
lrwxr-xr-x  1 coolman  staff       40 27 Okt 10:27 vendor -> /Users/coolman/Development/doppio/vendor

I am missing the folder "natives" with the (native) js-files?
In build/release-dist they still exists (inside folder source/native).

@jvilk
Copy link
Member

jvilk commented Oct 30, 2016

@cool2man
Copy link
Author

cool2man commented Nov 7, 2016

Sorry. I didn't got it. Let us complete reset the question:

I try to use doppio in my own website using this document: https://github.com/plasma-umass/doppio/tree/master/docs

Step 0: works!

Step 1: As I don't have the generated natives/*.js any longer in in build/release, I created my web folder without them.

Step 2: On start of the virtual machine the builtin natives are missing; this results into the error: Error constructing JVM: Failed to resolve java/lang/Thread.

@jvilk
Copy link
Member

jvilk commented Nov 8, 2016

@cool2man In Step 1, make sure you're configuring this setting properly:

    // The first argument is the filename of the listings file
    // The second argument is the relative URL to the folder containing the listings file
    // and the data it indexes.
    // In this example, the listings file and DoppioJVM's data is at
    // <thiswebpage>/doppio/listings.json
    mfs.mount('/sys', new BrowserFS.FileSystem.XmlHttpRequest('listings.json', 'doppio'));

It's very possible that you are not passing the correct path to listings.json.

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

No branches or pull requests

2 participants