| 1 |
Test that ocamllsp can be installed while dune is running in watch mode. |
| 2 |
|
| 3 |
$ mkrepo |
| 4 |
$ make_mock_ocamllsp_package |
| 5 |
$ mkpkg ocaml 5.2.0 |
| 6 |
|
| 7 |
$ setup_ocamllsp_workspace |
| 8 |
|
| 9 |
$ cat > dune-project <<EOF |
| 10 |
> (lang dune 3.18) |
| 11 |
> |
| 12 |
> (package |
| 13 |
> (name foo)) |
| 14 |
> EOF |
| 15 |
|
| 16 |
$ make_lockdir |
| 17 |
$ make_lockpkg ocaml <<EOF |
| 18 |
> (version 5.2.0) |
| 19 |
> EOF |
| 20 |
|
| 21 |
$ cat > foo.ml <<EOF |
| 22 |
> let () = print_endline "hi" |
| 23 |
> EOF |
| 24 |
|
| 25 |
$ cat > dune <<EOF |
| 26 |
> (executable (public_name foo)) |
| 27 |
> EOF |
| 28 |
|
| 29 |
$ dune build --watch & |
| 30 |
Success, waiting for filesystem changes... |
| 31 |
Success, waiting for filesystem changes... |
| 32 |
|
| 33 |
$ dune tools exec ocamllsp |
| 34 |
Solution for dev-tools.locks/ocaml-lsp-server: |
| 35 |
- ocaml.5.2.0 |
| 36 |
- ocaml-lsp-server.0.0.1 |
| 37 |
Running 'ocamllsp' |
| 38 |
hello from fake ocamllsp |
| 39 |
|
| 40 |
$ dune shutdown |
| 41 |
$ wait |