-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Related user(s):
⋅⋅⋅
Related project scope(s):
documentation
Bug description:
The pages
- https://ocaml-sf.org/learn-ocaml/howto-setup-exercise-development-environment.html
- https://ocaml-sf.org/learn-ocaml/howto-deploy-a-learn-ocaml-instance.html
resp. suggest doing
opam switch create . --deps-only --locked
and
opam switch create . --deps-only && opam install opam-installer
Issue 1. as I recently tested on my machine, the switch deps resolution can take a long time, given the ocaml version is not specified (albeit it is kind-of fixed for a given learn-ocaml version, namely 4.12.x)
Issue 2. the fact that these build instructions are in two different places is suboptimal.
Issue 3. is opam-installer really needed ?
Issue 4. some standard developers instructions are missing, e.g. installing merlin, and useful dev config.
⋅⋅⋅
What OS do you use?
GNU/Linux
What OS version/distribution do you use?
Debian
⋅⋅⋅
Additional context:
Issue 1. I suggest the command opam switch create . --package=ocaml-base-compiler.4.12.1 --deps-only --locked, which worked for me™
Issue 2. Maybe put the opam-switch command in only one page (+ back-links)?
Issue 3. I don't know for opam-installer; maybe @AltGr could recall the use cases of this package?
Issue 4. opam install merlin seems natural, but it might cause a whole rebuild after opam install --deps-only --locked.
I tried opam install --solver=aspcud --criteria="-sum(solution,avoid-version),-count(removed),-count(down),-count(changed)" merlin to minimize version changes, and it looked fine. I don't know if there's something simpler to do.
Finally we might recommend (but this is a minor suggestion) in the learn-ocaml dev howto, to define a bash alias such as:
compile() {
( cd ~/git/learn-ocaml/ && eval $(opam env) && set -x && opam install --deps-only --locked . \
&& make test && make && make opaminstall \
&& learn-ocaml build serve --repo=demo-repository )
}See also https://discuss.ocaml.org/t/learn-ocaml-1-0-approaching-call-for-testers/13621 :
opam update
opam source learn-ocaml --dev --dir=learn-ocaml-beta && \
cd learn-ocaml-beta && \
opam switch create . --locked && \
export OPAMSWITCH=$PWD && \
eval $(opam env)
learn-ocaml build serve --repo=REPOSITORY