issuu / ocaml-protoc-plugin

ocaml-protoc-plugin
https://issuu.github.io/ocaml-protoc-plugin/
Other
48 stars 19 forks source link

Build fails because of undeclared dependencies #22

Closed Leonidas-from-XIV closed 3 years ago

Leonidas-from-XIV commented 3 years ago

When using a clean switch it tries to build the examples as part of dune's default target, which fails because the package doesn't depend on ppx_expect nor ppx_deriving:

File "examples/echo_deriving/dune", line 6, characters 7-17:
6 |   (pps ppx_expect ppx_deriving.show ppx_deriving.eq ppx_deriving.ord))
           ^^^^^^^^^^
Error: Library "ppx_expect" not found.
Hint: try:
  dune external-lib-deps --missing @@default
File "examples/echo_deriving/google_types_deriving/dune", line 6, characters 7-17:
6 |   (pps ppx_expect ppx_deriving.show ppx_deriving.eq ppx_deriving.ord))
           ^^^^^^^^^^
Error: Library "ppx_expect" not found.
Hint: try:
  dune external-lib-deps --missing @@default
File "test/dune", line 6, characters 7-17:
6 |   (pps ppx_expect ppx_deriving.show ppx_deriving.eq)))
           ^^^^^^^^^^
Error: Library "ppx_expect" not found.
Hint: try:
  dune external-lib-deps --missing @@default
Done: 500/814 (jobs: 1)make: *** [build] Error 1

A solution would be to change the build target to something like @examples and then only build @examples as part of CI (where the dependencies are installed manually).

andersfugmann commented 3 years ago

The examples are build as part of runtest, and ppx_expect is marked {with-test}. Ill change the default build target to only build @install.