KittyCAD / modeling-app

The KittyCAD modeling app.
https://kittycad.io/modeling-app/download
MIT License
422 stars 35 forks source link

errors ought to be annotated to the whole call stack in the gutter not just the immediate callsite #3141

Closed paultag closed 3 months ago

paultag commented 3 months ago

for example, take the following function

fn someFunction = (something) => {
  startSketchOn(something)
}

someFunction('INVALID')

the error is in the invocation of this function -- it would be nice to have an error at both locations in the gutter

jessfraz commented 3 months ago

i kinda thought we did do that but i guess we never had a breaking test for it! https://github.com/KittyCAD/modeling-app/blob/9c9b44870542b6cd83e1e92e026e8c700c38dff8/src/wasm-lib/kcl/src/ast/types.rs#L1393

jessfraz commented 3 months ago

oh i just realized its not the function itself failing but the inners ya we dont have tests for that, we do for like args being off