Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom diagnostics to Editor(monaco) #2710

Open
doc-han opened this issue Nov 25, 2024 · 0 comments
Open

Add custom diagnostics to Editor(monaco) #2710

doc-han opened this issue Nov 25, 2024 · 0 comments

Comments

@doc-han
Copy link

doc-han commented Nov 25, 2024

Is your feature request related to a problem? Please describe.

Currently, our Editor only provides simple completion suggestions and doesn't really catch other issues we're more interested in.
eg. A user writing an expression that contains blocks that don't follow the openfn way

fn(state=> {
...
// do some work
...
return state;
})

console.log("smth") // not accepted!

Our editor doesn't provide enough help. it just keeps silent and then our compiler goes on to fail.

Tell us about your idea - describe the solution you'd like.

The idea is to provide diagnostic report/markers in the Editor to help users write less error-prone code.

Plan

  1. Monaco seems to already inject a parser into the browser via a web worker - check network tab for tsWorker.js(1.1MB)
    This file is served via jsdelivr. Can we patch it, build our version of tsWorker.js, and load it instead of the default monaco one?
  2. Add a parser (eg. babel-parser, acorn, ...) - which would add approx another 1.1MB to our bundle size. or even lazy loaded(still not fun).

Additional context

...

@github-project-automation github-project-automation bot moved this to New Issues in v2 Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: New Issues
Development

No branches or pull requests

1 participant