Errors in errors: line numbers are going awry #11

Closed
opened 2023-12-14 05:12:45 +00:00 by kredati · 1 comment
kredati commented 2023-12-14 05:12:45 +00:00 (Migrated from github.com)

In Ludus-web (but I think this is a Ludus problem), we're getting some strange line number errors when reporting out panics due to mismatching patterns.

Case: a bare script with range (0, 1, 2, 3).
Expected: No match! on line 1... to Ludus console.
Got: Error in JS console

[Error] Error: No item 813 in vector of length 1
	Xg (@ludus_ludus-js-pure.js:5046:85)
	(anonymous function) (@ludus_ludus-js-pure.js:5223)
	run (@ludus_ludus-js-pure.js:18535:90)
	run_code (+page.svelte:342)

Why are we looking for line 813?

It is at least worth noting that this input consistently produces the search for line 813.

In Ludus-web (but I think this is a Ludus problem), we're getting some strange line number errors when reporting out panics due to mismatching patterns. Case: a bare script with `range (0, 1, 2, 3)`. Expected: No match! on line 1... to Ludus console. Got: Error in JS console ``` [Error] Error: No item 813 in vector of length 1 Xg (@ludus_ludus-js-pure.js:5046:85) (anonymous function) (@ludus_ludus-js-pure.js:5223) run (@ludus_ludus-js-pure.js:18535:90) run_code (+page.svelte:342) ``` Why are we looking for line 813? It is at least worth noting that this input consistently produces the search for line 813.
scott self-assigned this 2023-12-15 21:25:22 +00:00

Fixed: the error was looking for the line number in the AST/token of the function that is called, not the callsite. Fixed, npm version bumped, published to npm as 0.1.0-alpha.7.7.

Fixed: the error was looking for the line number in the AST/token of the function that is called, not the callsite. Fixed, npm version bumped, published to npm as 0.1.0-alpha.7.7.
scott closed this issue 2023-12-18 00:05:19 +00:00
scott removed the
now
label 2023-12-18 00:34:22 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: twc/ludus#11
No description provided.