The source to WeScheme can be found at github:
https://github.com/dyoo/WeScheme
The user-level documentation for the project is maintained in:
https://github.com/dyoo/wescheme-docs
Build dependencies:
Java 1.6 SDK should be installed, as should Apache Ant. Racket 5.3.1 is also a dependency. All these should be accessible from $PATH. Finally, our current build tools assume a Unix-like environment to run shell commands, including 'unzip' and 'git'.
Note: do NOT use Java 1.7. It has a known incompatibility with the underlying Google Appengine software. (http://stackoverflow.com/questions/11006281/java-7-support-for-google-app-engine-java)
Installing WeScheme for local development
First, check out the WeScheme repository from Github.
$ git clone git://github.com/dyoo/WeScheme.git
Don't forget: we're using git submodules, so also make sure to:
$ git submodule init $ git submodule update
to grab the external dependendies as well. As of this writing, the external dependency is CodeMirror.
You might also need to change wescheme.properties if you are doing any development on the android packager or compilation server. You probably don't need to touch this unless you really know what you're doing.
Run 'build-console-and-editor.rkt'.
THIS STEP IS IMPORTANT!
The script "build-console-and-editor.rkt" must be executed after any changes are made to the javascript source files in war-src/js. The webapp itself uses files in war, which are built by build-console-and-editor. Also, the builder also re-compresses JavaScript files (such as CodeMirror 2) with the Closure Compiler, so you must run this every time you change the JavaScript files.
Running WeScheme locally:
After running build-console-and-editor.rkt, use Apache Ant with the 'runserver' target.
$ ant runserver
This will bring up a locally-running Webserver running off port 8080.
Hacking WeScheme:
The directory structure of WeScheme is a fairly typical Java web app.
Treat war as an output distribution directory. Do not try to modify files in there directly. Rather, the majority of the JavaScript files can be found in:
war-src/js
which are packaged up via Closure into single JavaScript files, one per application page.
console: war/console.jsp, war/js/console-calc.js
Implements the directory listing of a user's programs.
openEditor: war/openEditor/index.jsp, war/js/openEditor-calc.js
Implements main editor window; implements the main WeScheme interface
(REPL, text editor)
view: war/view.jsp, war/js/view-calc.js
run: war/run.jsp
Implements the viewing and running of programs outside of the
editing environment.
The Selenium Test Suite.
We use Selenium (http://seleniumhq.org)
To use the suite:
Note that the tests as currently written are have not yet been coded to respect some of the delays introduced by asynchronous JavaScript, so many of the tests will fail unless the speed of the testing framework is set to slightly slower than the "Fast" speed.
Other random notes from Summer 2012:
Things still to change, from summer 2012: some read errors like 1/0 (first ') ````,,,, not highlighted
(cond [4 5]) -> if: expected a boolean value, but found: 4 Shouldn't say "if" Wording choices like "found" vs. "given" and "but got 4" vs "but found: 4" remove "other arguments were" piece? greens look weird, color space???? (list (define x 5)) -> define: this variable is not defined should read "define: found a definition that is not at the top level" (x) -> x: this variable is not defined should read "this function is not defined"
To turn off color highlighting, change the colors in war-src/js/openEditor/interaction.js to white (i.e. new Color(255, 255, 255)).