imba / imba/imba

syntax error in type annotation causes misleading error message

Open
#666 0 comments 0 reactions 0 assignees View on GitHub
bug tooling
Dominant language
JavaScript
Stars
6.5k
Forks
183
Avg merge
4h 10m
Merged PRs (30d)
3

Description

imba version 2.0.0-alpha.205
vscode tooling version 3.1.12

I made a syntax error by leaving out a `"` in a type annotation like this:

```imba
tag Foo
prop fruit\"apple"|"orange = "apple"
```

The error is not highlighted on the line where it happened, other strings much further down my tag show an error.

I tried this in a plain imba file without any tags like this:

```imba
let foo\"a"|"b = "a"
console.log(foo)
```

executing the file didn't report an error but also didn't log anything.

Contributor guide

Open the contributing guide

Research direction

Reproduce the examples in a tag and in a plain Imba file using the reported Imba and VS Code tooling versions. Start with the syntax-error handling and editor diagnostic entry points, then verify that the error is reported at the malformed type annotation and that executing the plain file reports the syntax error instead of silently producing no output.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, vscode
Domain
compilers, developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.