imba / vscode-imba

Imba language support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=scrimba.vsimba
10 stars 5 forks source link

I'm getting a few errors in VS Code that don't appear to actually be errors. #85

Open BigZaphod opened 3 years ago

BigZaphod commented 3 years ago

So far I've encountered at least two places where seemingly correct and working syntax is show as an error in Visual Studio Code.

I have this extension installed (hopefully it's the right one): Name: Imba Id: scrimba.vsimba Description: Language support for Imba 2 Version: 2.5.3 Publisher: Scrimba VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=scrimba.vsimba

One error I'm seeing is whenever I try to use import on an asset. As far as I can tell from the documentation, this is supposed to work (and, indeed, it does actually work), but the extension doesn't think so:

image

The error is reported as: "Cannot find module './app/index.html' or its corresponding type declarations."

Another error is with object spreading. I very nearly filed a bug on Imba about it not being supported when I realized the code actually was working - it was only VS Code that was complaining:

image

This error is reported as: "Unexpected 'IDENTIFIER'"

I very nearly filed Imba bugs about these and it seriously hampered my learning of the language (we're talking hours total at this point) all because of misidentified errors in the extension.

somebee commented 3 years ago

I'm so sorry for your wasted time. I'm working on an updated version of the tooling that should get rid of a bunch of these. Will report back when it is published.

BigZaphod commented 3 years ago

No worries - I know this is still a pretty young project!

I ran into another odd one, but I can't seem to reproduce it outside of one specific file in this specific function, but it looks like this:

image

Note that the highlighted line has a tiny little squiggle under the nested for and for some reason, the colors of the x and y variables there are different. The error in the console is: unmatched ).

I've tried adding and removing parenthesis in and around these functions, but nothing seems to make the error go away. It runs fine, though!