bsansouci / reprocessing-example

79 stars 29 forks source link

Fixes vscode crashing on hot reload #9

Closed vkammerer closed 6 years ago

vkammerer commented 6 years ago

Hello and thank you for the great library,

I'm using Visual Studio Code and I encountered the same bug as described in https://github.com/Schmavery/reprocessing/issues/68, and I found that the issue comes from using bsb and not merlin as a diagnostic tool for the code editor.

This option is available to VSC users via the setting "reason.diagnostics.tools": ["bsb"] and many people turn it on as it is encouraged by the extension authors.

This causes the globally installed bsb binary (from the main bs-platform npm package) to run on every file save, which is unwanted is this case.

This PR redefines the binary to use and fixes the issue.

This file should be added to any project that overwrites the default bs-platform package with

  "devDependencies": {
    "bs-platform": "bsansouci/bsb-native#2.1.1"
  }

... so it may need to be added to other repos?

bsansouci commented 6 years ago

This is a terrible issue. Thanks for finding a fix. Ideally we'd make the VCS extension prioritize the local bob rather than the global one.