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

Componentize REPL #70

Open
alfonsogarciacaro opened this issue Nov 6, 2018 · 2 comments
Open

Componentize REPL #70

alfonsogarciacaro opened this issue Nov 6, 2018 · 2 comments

Comments

@alfonsogarciacaro
Copy link
Member

Continuation of fable-compiler/repl-legacy#42

I renamed the repositories. @citymeterio It's probably better if you remove your local copy and clone fable-compiler/repl again.

We should write down a plan to make it easier to embed the REPL in other webs. These are the different parts composing the REPL currently, should all go into the package or only some of them?

  • F# compiler + Fable bundle: This is generated in the Fable CI server (AppVeyor)
  • Worker: prevents locking the UI and contains some helpers to communicate with the Fable bundle
  • Metadata + Fable REPL library: The REPL needs to load several netstandard dlls to compile F# code
  • Monaco integration: Tooltip, go to definition, autocompletion... providers
  • UI
@MangelMaxime
Copy link
Member

* F# compiler + Fable bundle: This is generated in the Fable CI server (AppVeyor)

I think the current way of doing is fine for now. We can already think that the REPL is a client of these features.

* Worker: prevents locking the UI and contains some helpers to communicate with the Fable bundle

We should be able to compile the Worker project and become a client of it ourself.
Its mean replace this line to include the JavaScript lib or something like that and not the fsproj file.

* Metadata + Fable REPL library: The REPL needs to load several netstandard dlls to compile F# code

I think we are doing that part in the worker code no ? If yes, I think we should stick with encouraging the user to user the worker. But we should make it "easy" to extends the dlls loaded and pre-compiled libraries so people can customize their env.

* Monaco integration: Tooltip, go to definition, autocompletion... providers

We should make it an Elmish or React components. That's focus on the current F# tab editor only.

* UI

Not much to do here as the UI is unique per application, for me it's the user code responsible of that.


I would like to complete some features in the REPL before creating the components version because I am cleaning some part of it.

@alfonsogarciacaro
Copy link
Member Author

You're right. We should provide a Worker component that handles all Fable bundle + .dll loading for the user, so they just need to communicate with it through messages (we can provide the Shared.fs file). Generating the .dlls and the precompiled library is a bit complicated, so for now I would make this transparent to the user.

I guess we should also add the version number to the worker file name to prevent browser caching when users update the version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants