You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
currently, when working with an OCaml project involving a large number of dependencies, it is difficult to perform tests in a REPL (C-c C-s) with the proper packages loaded.
Granted, one can manually evaluate #load "topfind";; then #require "jwto";; or so for each package, but it quickly becomes cumbersome on realistic projects.
Would it be possible to implement an elisp feature that would pre-compute the list of packages (e.g. from the PKG lines involved in a .merlin file) and propose to run a command like this when doing C-c C-s?
OCaml REPL to run: OCAMLFIND_COMMANDS='ocamlc=ocaml' ocamlfind ocamlc -linkpkg -package jwto
Note: this can be tested in a terminal by running:
$ opam install jwto
$ packages="jwto"
$ OCAMLFIND_COMMANDS='ocamlc=ocaml' ocamlfind ocamlc -linkpkg $(for arg in $packages; do echo "-package $arg"; done)
OCaml version 4.05.0
#show Jwto;;
What do you think?
Maybe this idea should be further refined, but AFAICT one such feature would be really great!
As mentioned in the discussion to which Chris linked, Dune currently
works better if you structure your project into a (set of) libraries
together with an almost empty top-level executable.
So I think it would make sense to start by supporting only the case
where the Dune project is a library rather than an executable.
currently, when working with an OCaml project involving a large number of dependencies, it is difficult to perform tests in a REPL (C-c C-s) with the proper packages loaded.
Granted, one can manually evaluate
#load "topfind";;
then#require "jwto";;
or so for each package, but it quickly becomes cumbersome on realistic projects.Would it be possible to implement an elisp feature that would pre-compute the list of packages (e.g. from the
PKG
lines involved in a.merlin
file) and propose to run a command like this when doing C-c C-s?Note: this can be tested in a terminal by running:
What do you think?
Maybe this idea should be further refined, but AFAICT one such feature would be really great!
Cc @Chris00 @monnier @cpitclaudel @Aleridia FYI
The text was updated successfully, but these errors were encountered: