Skip to content
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

[BUG] Unhelpful error message for play C4 C4 #5595

Open
zellyn opened this issue Jun 5, 2024 · 1 comment
Open

[BUG] Unhelpful error message for play C4 C4 #5595

zellyn opened this issue Jun 5, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@zellyn
Copy link

zellyn commented Jun 5, 2024

Describe the bug
In an attempt to play the first few notes of "Twinkle, twinkle little star", I entered:

play C4 C4
play G4 G4

The error message was misleading/unhelpful:

We can't run your program.

The code you entered is not valid Hedy code. There is a mistake on line 1, at position 1. You typed play, but that is not allowed.

screenshot
image

I'm a professional programmer, exploring Hedy after listening to the latest CoRecursive podcast: if this fix would be within the bounds of the existing error message generation, feel free to just point me in the right direction and I'll send a PR. I love what you're doing!

@zellyn zellyn added the bug Something isn't working label Jun 5, 2024
@Felienne
Copy link
Member

Felienne commented Jun 5, 2024

Hi @zellyn!

Thanks for the message and the kind words! Music is a bit new so the errors are not as well developed as they could be. What you see here is a parse error, but what could do to make this better is to add an error production, not sure how familiar you are with compiler/parser technology, this might not be enough info for you?

The idea is to add an extra rule to catch this and to present an error based on that.

Here is a PR that also adds a new error production, maybe that helps as an inspiration: https://github.com/hedyorg/hedy/pull/5177/files#diff-3de13d718733aaa612bf35f9750f41c325f7be6f1df0030b4ad029406ca0276b

If not, do feel free to reach out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants