Closed AltGr closed 3 years ago
Ref. https://github.com/ocaml/opam/issues/4674
This is I think the most sane solution to the problem mentioned in that issue, as it effectively makes the package build isolated and independent from a running database server; while not adding too much complexity, and keeping the same flexibility for developers.
NB: don't look at the git diff for .ml
s, the source files have just been renamed.
(note: I edited the dune
files directly, but you may want to backport this into drom
space)
tests fail because they try to build without pgocaml_ppx
; one solution could be to add --ignore-promoted-rules
to the CI build to still build using the staged artifacts, another to explicit the dependency of freeton_crawler_lib
to pgocaml_ppx
so that dune doesn't try to build it if unavailable.
This renames
src/freeton_crawler_lib/db.ml
todb.pp.ml
, and similarly fordb_utils
, adjusts thedune
build rules so that theppx
is run by hand and its results staged (asdb.ml
,db_utils.ml
resp.)This removes dependencies towards a running and properly configured pgsql instance during compilation as a package, while keeping the current behaviour when building "by hand" in developer mode.