gamesys / moonshine

A lightweight Lua VM for the browser
http://moonshinejs.org
MIT License
501 stars 35 forks source link

Strange failure with lua 5.2 #5

Closed daurnimator closed 10 years ago

daurnimator commented 10 years ago

distilling when luac is from lua 5.2 results in an error from an odd place:

/home/daurnimator/src/moonshine/distillery/distillery.moonshine.js:79
                        if (err) throw err;
                                       ^
Error: Path must be a string without null bytes.
    at nullCheck (fs.js:119:14)
    at Object.fs.open (fs.js:417:8)
    at Object.fs.readFile (fs.js:206:6)
    at Parser.parse (/home/daurnimator/src/moonshine/distillery/distillery.moonshine.js:78:6)
    at /home/daurnimator/src/moonshine/bin/commands/distil.js:178:10
    at /home/daurnimator/src/moonshine/bin/commands/distil.js:161:3
    at ChildProcess.exithandler (child_process.js:635:7)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:735:16)
    at Process.ChildProcess._handle.onexit (child_process.js:802:5)
daurnimator commented 10 years ago

FWIW you should run luac5.1 if thats the version you need

agladysh commented 10 years ago

Executable name is highly dependent on the distribution / package manager, unfortunately.

daurnimator commented 10 years ago

In which case it should be configurable :)

paulcuth commented 10 years ago

You're right; this should be configurable. Moonshine currently only works with 5.1.

paulcuth commented 10 years ago

The error message is fixed in 4f1ec5fa4288aef535576cb68566c8abcd4de30b. The requested configuration option is added in 290b2506bdb21b51cfdd6bc6240f0722c7a91718.