gkz / LiveScript

LiveScript is a language which compiles to JavaScript. It has a straightforward mapping to JavaScript and allows you to write expressive code devoid of repetitive boilerplate. While LiveScript adds many features to assist in functional style programming, it also has many improvements for object oriented and imperative programming.
http://livescript.net
MIT License
2.32k stars 155 forks source link

Executing via `lsc -w` renders runtime error unusable #1015

Closed vendethiel closed 6 years ago

vendethiel commented 6 years ago
➜  LiveScript git:(master) ✗ cat ~/err.ls
throw new Error
➜  LiveScript git:(master) ✗ ./bin/lsc -w ~/err.ls
Failed at: ~/err.ls
undefined
vendethiel commented 6 years ago

Without -w:

➜  LiveScript git:(master) ✗./bin/lsc ~/err.ls
Failed at: ~/err.ls
Error
    at Object.<anonymous> (~/err.ls:1:7)
    at Module._compile (module.js:643:30)
    at Module._compile (~/LiveScript/node_modules/source-map-support/source-map-support.js:492:25)
    at Object.LiveScript.run (~/LiveScript/lib/node.js:33:19)
    at compileScript (~/LiveScript/lib/command.js:186:31)
    at ~/LiveScript/lib/command.js:112:11
    at ~/LiveScript/lib/command.js:102:7
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
rhendric commented 6 years ago

It looks like this might have been caused by the fix for #900, but @vendethiel, you said that #900 may not be actually fixed? Should we revert #901 (which I think fixes this) and do something else about #900? Or double down on that change and rewrite it to take o.watch into consideration?

vendethiel commented 6 years ago

Did we try bumping jison to ..18?

vendethiel commented 6 years ago

Do note: this one issue is about runtime errors. #900 is something I hit with compile ones.

rhendric commented 6 years ago

Bumping jison makes sense to me, but I personally haven't tried anything; all I know about these bugs is what's in the bug reports. Maybe @summivox can weigh in? Otherwise, I'd be inclined to do that (remove the .message and bump jison) if it weren't for your report of lingering issues with #900, which makes me worry that I wouldn't notice if there were a regression here.

summivox commented 6 years ago

I haven't been following the development on either projects, but I'd recommend updating dependency.