-
-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Give a better error message when a variable is missing in a trace #1113
Comments
KtorZ
added a commit
that referenced
this issue
Mar 1, 2025
Somehow, we allow traces with no continuation after and currently default to a Todo. That todo is completely invisible from a user standpoint and return a generic `a`. So it is pretty easy for someone to think their program is okay, compiles, and have no issues, while simply crashing at runtime because of an invisible todo. Hence, I've changed that to default to `Void` instead, which is more sensible as a default for an empty trace. Also, I've made the parser fail with one puts a colon for label, but doesn't add any value to display. Fixes #1113. Signed-off-by: KtorZ <[email protected]>
KtorZ
added a commit
that referenced
this issue
Mar 1, 2025
Somehow, we allow traces with no continuation after and currently default to a Todo. That todo is completely invisible from a user standpoint and return a generic `a`. So it is pretty easy for someone to think their program is okay, compiles, and have no issues, while simply crashing at runtime because of an invisible todo. Hence, I've changed that to default to `Void` instead, which is more sensible as a default for an empty trace. Also, I've made the parser fail with one puts a colon for label, but doesn't add any value to display. Fixes #1113. Signed-off-by: KtorZ <[email protected]>
Merged
KtorZ
added a commit
that referenced
this issue
Mar 2, 2025
Somehow, we allow traces with no continuation after and currently default to a Todo. That todo is completely invisible from a user standpoint and return a generic `a`. So it is pretty easy for someone to think their program is okay, compiles, and have no issues, while simply crashing at runtime because of an invisible todo. Hence, I've changed that to default to `Void` instead, which is more sensible as a default for an empty trace. Also, I've made the parser fail with one puts a colon for label, but doesn't add any value to display. Fixes #1113. Signed-off-by: KtorZ <[email protected]>
KtorZ
added a commit
that referenced
this issue
Mar 2, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What Git revision are you using?
v1.1.13+900bf91
What operating system are you using, and which version?
Describe what the problem is?
If i make the mistake not to add the variable after the : in a trace
trace @"my trace":
aiken check doesn't fail but aiken build give this non obvious error message :
aiken::fatal::error Whoops! You found a bug in the Aiken compiler. [----] crates/aiken-lang/src/gen_uplc.rs:310:21 Reached assignment with no dangling expressions
What should be the expected behavior?
Either aiken check or aiken build should fail with a better error message
The text was updated successfully, but these errors were encountered: