-
Notifications
You must be signed in to change notification settings - Fork 155
Closed
Description
Having a following index.ls file:
for i from 0 to 2
console.log 'Hello', indWhen running it with:
lsc index.lsI get the following error:
Failed at: index.ls
ReferenceError: ind is not defined
at Object.<anonymous> (/tmp/livescript-test/index.ls:5:24)
1| // Generated by LiveScript 1.5.0
2| var i$, i;
3| for (i$ = 0; i$ <= 2; ++i$) {
4| i = i$;
5+ console.log('Hello', ind);
6| }
7|
8|
9|
at Module._compile (module.js:571:32)
at Object.LiveScript.run (/tmp/livescript-test/node_modules/livescript/lib/node.js:31:19)
at compileScript (/tmp/livescript-test/node_modules/livescript/lib/command.js:222:31)
at /tmp/livescript-test/node_modules/livescript/lib/command.js:152:11
at /tmp/livescript-test/node_modules/livescript/lib/command.js:142:7
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:416:3)
The problem is that line number 5 reported in error log for index.ls is incorrect in scope of index.ls file. In this example I get a full compiled version as (probably) the demo is short. But when working with bigger files, I do not get a full compiled version, so it becomes difficult to track errors.
I tried to use sourcemaps by running:
lsc -m embedded index.lsthe result is still the same.
Is there a way to make errors show on correct lines in scope of ls files?
OS: Linux
Node.js: 7.5.0
LiveScript: 1.5.0
Metadata
Metadata
Assignees
Labels
No labels