vscode-ocaml-platform icon indicating copy to clipboard operation
vscode-ocaml-platform copied to clipboard

OCaml Onboarding

Open PizieDust opened this issue 9 months ago • 5 comments

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

PizieDust avatar Feb 28 '25 05:02 PizieDust

We should add the survey link in the onboarding. Maybe also in the status bar / command panel in a separate PR ?

voodoos avatar Mar 11 '25 10:03 voodoos

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.

smorimoto avatar Mar 13 '25 10:03 smorimoto

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...

voodoos avatar Mar 21 '25 16:03 voodoos

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

PizieDust avatar Mar 21 '25 16:03 PizieDust

Is there a way to automatically check the various steps at the end of command execution ?

Yes, this is now available.

PizieDust avatar Mar 27 '25 16:03 PizieDust

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!

pitag-ha avatar Jul 25 '25 15:07 pitag-ha

@smorimoto Have you been able to try this out? I'm curious to get your observations

PizieDust avatar Aug 30 '25 14:08 PizieDust

@smorimoto Hi Sora. The merge conflicts are fixed now

PizieDust avatar Sep 11 '25 08:09 PizieDust

Hi @smorimoto ,

I was wondering: Is there anything we haven't noticed that is blocking this from getting merged?

pitag-ha avatar Sep 24 '25 07:09 pitag-ha

I don't think so, but basically I'm not in a position to decide when we add a new feature though.

smorimoto avatar Sep 30 '25 20:09 smorimoto

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 ?

pitag-ha avatar Oct 10 '25 15:10 pitag-ha

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.

rgrinberg avatar Oct 10 '25 15:10 rgrinberg

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.

pitag-ha avatar Oct 10 '25 16:10 pitag-ha

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.

rgrinberg avatar Oct 11 '25 01:10 rgrinberg

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?

pitag-ha avatar Oct 14 '25 14:10 pitag-ha

I think somebody who is not the author of this PR should test it independently.

rgrinberg avatar Oct 15 '25 03:10 rgrinberg

Tested on Manjaro Linux and everything goes smoothly :+1:

Tim-ats-d avatar Nov 04 '25 14:11 Tim-ats-d

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.

Tim-ats-d avatar Nov 05 '25 13:11 Tim-ats-d

Sounds like this PR is ready to be merged. Anybody wants to resolve the conflict?

rgrinberg avatar Nov 05 '25 22:11 rgrinberg

Sounds like this PR is ready to be merged. Anybody wants to resolve the conflict?

All fixed now

PizieDust avatar Nov 05 '25 22:11 PizieDust