How to use

I am trying to rebuild the playground from repo.

  1. I have git cloned repo

  2. In playground/ , I have run make, which creates a new branch and switches to it

  3. I can’t dune build to do lacking dependencies merlin-js.worker, etc

  4. How do I execute so opam knows where to find / build merlin-js.worker ?


I think the makefile contains all the commands you need to run, but you can get into a bit of bother if you run things in the wrong order. You need to run make deps which will install the dependencies of the playground in the playground switch. However, if you ran make first, it created a 5.0.0 compiler switch (no deps installed) and then you can’t run make deps because that will try to recreate the switch and opam will complain so I would just copy and run the command manually i.e.

opam install . --deps-only --switch=playground

Then you should be able to run make build which will invoke dune build in the context of this switch and with the playground directory as the root.

If you were starting from scratch (with no playground switch) you should be able to run make deps && make build.

1 Like