vscode-ocaml-platform
vscode-ocaml-platform copied to clipboard
OCaml Onboarding
This PR introduces a new way to onboard users into the OCaml ecosystem. It uses a short interactive tutorial to guide the user through the various steps of setting up OCaml.
- Installing Opam
- Initializing Opam
- Activating an Opam switch
- Installing developer tools (ocaml lsp server, ocamlformat, odoc, utop, dune)
- Verifying that ocaml is correctly setup with utop.
- Finishing and linking to the tutorials for beginners on ocaml.org
cc @voodoos
We should add the survey link in the onboarding. Maybe also in the status bar / command panel in a separate PR ?
It may be better to write the alt text more properly, or to leave it blank at all. We can come up with some ideas about that for accessibility.
Is there a way to automatically check the various steps at the end of command execution ? Ideally we would also not permit users to "install opam" if they already have opam installed...
Is there a way to automatically check the various steps at the end of command execution ? Ideally we would also not permit users to "install opam" if they already have opam installed...
Indeed. I think the best way is to check if opam is installed and just move to the next step or exit the onboarding with a toast explaining opam is already installed
Is there a way to automatically check the various steps at the end of command execution ?
Yes, this is now available.
Hi @PizieDust , this looks awesome! It could significantly improve the experience of people setting up OCaml. Would it be easy to drop a quick screencast of the walkthrough here? I'll review the code next week!
@smorimoto Have you been able to try this out? I'm curious to get your observations
@smorimoto Hi Sora. The merge conflicts are fixed now
Hi @smorimoto ,
I was wondering: Is there anything we haven't noticed that is blocking this from getting merged?
I don't think so, but basically I'm not in a position to decide when we add a new feature though.
but basically I'm not in a position to decide when we add a new feature though.
And who is in the position to decide that? @rgrinberg ?
How confident are we about the stability of this feature? If something goes wrong, would it impact everybody's workflow?
I haven't really looked into the feature itself, so I won't comment on that. But we do want to make sure that this is at least stable for general use before merging.
@pitag-ha if you have some personal experience using this feature. Sharing it here could be strong motivation.
@smorimoto if you have some experience using this feature, I think that gives you all the authority that is needed in this case. All you need to do is give us a review of using this feature from the PoV of a user.
How confident are we about the stability of this feature?
Do you mean the stability of this feature on the vscode side? Or of @PizieDust's implementation?
If something goes wrong, would it impact everybody's workflow?
This feature is a walk-through to set up OCaml: It walks you through installing opam, creating a switch with OCaml, dune, ocaml-lsp-server, ocamlformat, and a few other tools. If something goes wrong while going through the walk-through, people can fall back to what they do now: Use the cli to install OCaml and those tools.
@pitag-ha if you have some personal experience using this feature.
You mean experience using this feature with other languages? I don't have experience with it, no.
I do have quite some experience with people getting started with OCaml and having trouble setting up the different things needed. Hopefully, this feature can make the life easier for people who use VSCode and get started with OCaml.
Do you mean the stability of this feature on the vscode side? Or of @PizieDust's implementation?
The implementation in this PR.
This feature is a walk-through to set up OCaml: It walks you through installing opam, creating a switch with OCaml, dune, ocaml-lsp-server, ocamlformat, and a few other tools. If something goes wrong while going through the walk-through, people can fall back to what they do now: Use the cli to install OCaml and those tools.
Ok good.
You mean experience using this feature with other languages? I don't have experience with it, no.
No, I meant just running a version of the vscode extension with this PR enabled. It's quite hard to write effective tests for vscode plugins, so we have to rely on manual testing to make sure it remains stable.
No, I meant just running a version of the vscode extension with this PR enabled. It's quite hard to write effective tests for vscode plugins, so we have to rely on manual testing to make sure it remains stable.
I haven't done that yet. To run the feature in this PR, you should start from an environment without OCaml installed. In our case that requires running this from a fresh docker container.
I know that @PizieDust used to do that for testing when working on the PR. @PizieDust, can you share your experience?
I think somebody who is not the author of this PR should test it independently.
Tested on Manjaro Linux and everything goes smoothly :+1:
https://github.com/user-attachments/assets/b3cef531-7c88-45f6-b9ed-1c29bd5fa937 Here is a video record of me testing the new walkthrough for the curious. I've cut compilation moments, but it takes me a total of 10 min to install everything on my machine.
Sounds like this PR is ready to be merged. Anybody wants to resolve the conflict?
Sounds like this PR is ready to be merged. Anybody wants to resolve the conflict?
All fixed now