[ANN] rescript-vscode 1.4.0 and 1.4.2 released

rescript-vscode v1.4.0 is out in the VSCode Marketplace!

You can install the newest version via the VSCode plugin pane or download the vsix file directly from our release page .

This release brings a substantial amount of bug fixes and new features. A few highlights:

  • Deeper integration with reanalyze, adding exception analysis to the possible analysis you can run directly from the editor. Read more about the Code Analyzer here.
  • Report syntax errors as you type.

Read about all of the changes in the full changelog .

The Vim plugin will be updated soon as well.

This release holds a number of bug fixes and features from new contributors. Thank you all who’ve contributed, as well as all who’ve helped out in testing the extension before release!

25 Likes

We’ve released 1.4.1 1.4.2 with a few fixes to problems discovered in the latest release. More info in the changelog: https://github.com/rescript-lang/rescript-vscode/blob/master/CHANGELOG.md#v142

7 Likes

The extension is still broken for us here at Walnut, the latest working version is 1.3. All features like jump to definitions, and type hovers don’t work. It basically logs: can't find module Logger-@teamwalnut/utils on any file. I saw that there was a regression when it comes to monorepo. We use yarn workspaces so maybe that is related to this regression?

1 Like

If you don’t mind, please file an issue with a minimal reproducible example. And, adding your setup + thoughts as active monorepo users here would also be helpful: RFC: Monorepo support

The behaviour of the extension is clearly defined in the release notes.
If you’re interested in seeing monorepo supported, please do contribute towards having monorepo supported.
For clarity: monorepo support will not happen by itself.
Monorepo users are expected to organise by themselves the work required.

Understood. Since the extension worked in the monorepo in 1.3.0, I felt it was a regression/bug. I’ll try to create a simple repro!

Can you try the most recent vsix from CI and see if that resolves your issue?

@zth Hi, there may be a bug of this extension with version 1.4.2 on windows.
The code formatting is not worked with vscode extension v1.4.2

It works with v1.4.1

It’s still not working. Same issue.
Could it be that we have two bsconfig.json files? (one for each package, and one in the root). The root one has all other packages as pinned dependencies so we can compile the whole monorepo with one command.

We run rescript build -with-deps in the root, and then run rescript build -w in each package for watch mode.

Ok, well, put together a minimal repro, and I think from that you might even be able to do a bisect to find what commit introduced the change. Then we can take it from there with regard to what to do to fix it.

This is the example repo

rescript-vscode 1.4.2
The global settings.json

{
  "[rescript]": {
    "editor.defaultFormatter": "chenglou92.rescript-vscode",
  },
  "rescript": {
      "aliases": [
        "ReScript"
      ],
      "filenames": [],
      "extensions": [
        ".res",
        ".resi"
      ],
      "lineComments": [
        "//"
      ],
      "blockComments": [
        [
          "/*",
          "*/"
        ]
      ],
      "blockStrings": []
    },
}

I haven’t created a repro yet, sorry for that! But I just found out that the pre-release version of the extension started working again. So it seems the bug has been fixed! Thanks!

1 Like