miden-vm icon indicating copy to clipboard operation
miden-vm copied to clipboard

Compilation failure due to missing name should report the user readable name

Open hackaugusto opened this issue 11 months ago • 4 comments

The call instructions currently only carry the procedure id, and not its name. This makes the error messages very cryptic, for situations like the following:

proc.example
    syscall.wrong_name
end

The error message will be something like:

KernelProcNotFound(ProcedureId([120, 199, 130, 12, 225, 34, 213, 30, 69, 109, 206, 77, 106, 134, 11, 37, 238, 43, 225, 0]))

It should give the wrong_name instead.

hackaugusto avatar Mar 01 '24 18:03 hackaugusto

@bitwalker I think you're working on the VM's compiler, so I won't try to fix this.

hackaugusto avatar Mar 01 '24 18:03 hackaugusto

This is actually one of the things I've fixed haha

bitwalker avatar Mar 01 '24 18:03 bitwalker

@bitwalker great to know :) will save me a lot of time in the future. Thanks!

hackaugusto avatar Mar 01 '24 18:03 hackaugusto

@bitwalker one thing that I forgot. Can we also get the original span? As in, original source file, lineno, and col?

hackaugusto avatar Mar 01 '24 18:03 hackaugusto