plasma-umass / doppio

Breaks the browser language barrier (includes a plugin-free JVM).
http://plasma-umass.github.io/doppio-demo
MIT License
2.16k stars 174 forks source link

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

Open cool2man opened 7 years ago

cool2man commented 7 years ago

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 commented 7 years ago

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:

cool2man commented 7 years ago

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 commented 7 years ago

@cool2man I updated the documentation; hope it clarifies.

https://github.com/plasma-umass/doppio/tree/master/docs#adding-native-methods-using-doppioh

cool2man commented 7 years ago

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 commented 7 years ago

@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.