Closed jvilk closed 11 years ago
I'll probably have to update this once we've been Bowerified, but it's a start!
Updated with more items.
Files that still need work:
src/util
(buffers)src/testing
(everything async)src/natives
(everything async)src/runtime
(for multinewarray)src/opcodes
(for multinewarray)Is it counterproductive for me to be writing a load of new stuff in CoffeeScript right now? I know the conversion process is pretty simple since TypeScript is a strict JS superset so you can just compile and change the extension, but generated CoffeeScript can be kinda ugly (especially loops and stuff) and it seems like if TypeScript is the future of this project I may as well start using it now, since I'll have to in the long run.
It's up to you. Your options are:
The porting process really isn't too bad, though it does involve manually un-crappifying the coffee-compiled output.
@lavelle : If you keep plugging away in CoffeeScript. I'll convert your code for you. :thumbsup:
But if you want to be proactive about the switch, you'll probably want to wait until we fix the browser build process for TypeScript. Right now, it's broken.
Okay, thanks. I'll stick with CoffeeScript for now and switch as soon as TypeScript is finished and becomes Doppio's official language.
Adding the few things we've added to master to the checklist. I think it's time for a final push to get this dude building properly.
Using RequireJS, I have a dev build of typed-doppio 'booting up' (preloading files) in the browser. It's not completely working (for some reason, running ls
in the root directory never triggers the callback...), but it's progress!
Here's some build instructions:
tsc --module amd --outDir build/dev browser/frontend.ts
cat
-ing the CSS file, generating mini-rt
and listings.json
, etc.)It's pretty simple compared to our current shenanigans. And we no longer have to track dependencies (!) in the Makefile
or index.mustache
. :smile:
This also suggests that we will be able to use RequireJS's 'optimizer' to make a single module for all of Doppio, and that we can simply build release from the development output. For example (Make pseudo-code):
release: dev
// Recursively run make so it'll see the new files.
make _release
_release: build/release/*/*.js
// Run RequireJS's optimizer.
// Run Uglify on the module.
// Remove staging directory.
build/release/*/*.js: build/dev/*/*.js
// Run through Jez's ice-cream, dump into a staging directory.
There are still some issues, though:
require
. There has to be some way to make it not do that.require
calls using an annotation. See my recent changes for details. But maybe making these explicit is a 'good thing'?...but we're close. :smile:
Oh. I see. read_dir
is broken... shakes fist at @perimosocordiae
I fixed a few things, but I'll need to do some debugging later as it's still returning nothing: https://github.com/int3/doppio/commit/acb9b3ba2c64e43e62847395b43ff979da7d757f
The dev build is on-par with master Doppio (ignoring Ace editor issues). I'm trying to get a release build working using RequireJS's compiler. When I get this working, we'll have an easy automated method of generating a release build and the library using that compiler. But for now, it's choking on loading the JavaScript dependencies in the release configuration (e.g. underscore).
(Note that I still need to update the Makefile; that's the last thing I plan to do)
OK. So, apparently the release build issues were caused by me not placing the amd-dependency
annotations at the top of the source files. Once that was done, it... worked!
todo:
node ../../node_modules/.bin/ice-cream $file_produced_from_r.js --remove trace --remove vtrace --remove debug > $outputfile
)dev
Makefile target.library
Makefile target.release
Makefile target.Alright! Release/dev/library builds properly work (can someone sanity check me?). We just need to port over comments!
Here's the comments checklist:
I believe we are ready. There's nothing more to backport, release
/release-cli
/dev
/dev-cli
all build properly and pass tests in the same way as master, and I've verified that building from a cleanly cloned repo works.
I just hit the switch! We're typed now. :smile:
We have a working TypeScript port of Doppio, but we need to backport a number of items to it.
Here's a comparison view to see all of the lines of code we need to backport: https://github.com/int3/doppio/compare/30c1e99ef1cba1cbbd338043d5881b9f709e1393...master
Here's a list (in order of when it was added to Doppio):
jvm.dump_state
in the browser. https://github.com/int3/doppio/commit/30e1014b918fe71e159a1c73698d76bcbf8b38a6run_bytecode
https://github.com/int3/doppio/commit/d94c3c328971d73258a27b9de21fcaa3de0af64f https://github.com/int3/doppio/commit/34a5630e56cca8904352b494b40bb867a380cc52setup.sh
changes.