PoC: emit code actions from the compiler that the editor tooling can use
Very messy PoC, but this is intended to show that we could fairly easily add a specific mode to bsc that the editor tooling and/or build system can enable to get the compiler to emit code action data.
The main advantage here is that we can co-locate the code that produces code actions with the actual type checker and what produces the error messages. Currently, we parse the error log to extract these things. This would make it more robust and easier to maintain, and automatically tied to the current ReScript version.
Example:
To start we could port all actions in https://github.com/rescript-lang/rescript-vscode/blob/fd911045515edd1c82e981e407281ee9f311a8ed/server/src/codeActions.ts and then add more as needed.
Maybe this should incorporate https://github.com/rescript-lang/rescript-compiler/issues/6203 at the same time. This type of functionality opens up for a JSON format anyway.
Superseded by the new work on actions overall.