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

Confusing error message on missing semicolon in type #954

Closed
jtremback opened this issue Aug 13, 2021 · 4 comments · Fixed by #1275
Closed

Confusing error message on missing semicolon in type #954

jtremback opened this issue Aug 13, 2021 · 4 comments · Fixed by #1275
Labels
bug FTC-Snowcat Feature: Fully-functional type checker Snowcat usability UX improvements

Comments

@jtremback
Copy link

jtremback commented Aug 13, 2021

I forgot a semicolon on a type annotation and received this error message:

Typing input error: Unexpected annotation of action: @type

Here is the faulty code:

VARIABLES 
    \* mapping from chain id to its data
    \* @type: Str -> CHAIN;
    chains,

    \* last action performed
    \* @type: ACTION
    action,

    \* string with the outcome of the last operation
    \* @type: Str;
    actionOutcome

IMO this error message was unclear because it did not say anything about the semicolon problem. However, it was good that it mentioned action.

@jtremback jtremback changed the title [CONFUSING ERROR] Confusing error message on missing semicolon Aug 13, 2021
@jtremback jtremback changed the title Confusing error message on missing semicolon Confusing error message on missing semicolon in type Aug 13, 2021
@shonfeder
Copy link
Contributor

Thank you for the report!

This was first reported in #802, but we can leave this as a factored out subissue.

@shonfeder shonfeder added bug FTC-Snowcat Feature: Fully-functional type checker Snowcat labels Aug 13, 2021
@jtremback
Copy link
Author

I see, it is a duplicate

@shonfeder
Copy link
Contributor

Its helpful to have more detail, and also #802 is kind of a meta-issue, cause it lists a bunch of little things. It's helpful to have this factored out into its own item. 👍

@konnov
Copy link
Collaborator

konnov commented Feb 3, 2022

Although this has been fixed we have found that TLA+ Toolbox generates comments that look exactly like malformed annotations with a missing ; in the end. So I guess the only reasonable action here is to ignore such malformed annotations and issue a warning instead of an error. This will bring us back to the degraded usability :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug FTC-Snowcat Feature: Fully-functional type checker Snowcat usability UX improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants