Closed edwintorok closed 10 months ago
This has now been fixed in Dune upstream, although there is another instance of this where an .ml file gets generated and to do that you need build a local binary which has external dependencies.
But that one can be fixed by running dune build @fmt --ignore-promoted-rules
instead.
That last bug should be fixed by https://github.com/ocurrent/ocaml-ci/pull/909
Context
lint-fmt
fails in the OCaml CI when usingdune
'ssite
feature ininstall
stanzas.Step(s) to reproduce
https://ocaml.ci.dev/github/edwintorok/lintcstubs/commit/8db4abc2ae1f8c579940a6a98940a41419a7aca0/variant/%28lint-fmt%29
Expected behaviour
lint-fmt
in ocaml-ci should pass, it passes insetup-ocaml
based action: https://github.com/edwintorok/lintcstubs/actions/runs/6157861712/job/16709496685It should either detect and install the missing package before running the formatting command, or allow the user to manually override this with some
x-
field in opam.Technical details
This is more a limitation of
dune
perhaps, it currently requires packages that are specified ininstall
stanza assite
s to be installed even for actions that wouldn't result in installing the package (such as@fmt
). It may be desirable to fix this in dune, but meanwhile would be good to have some override for this in OCaml-CI.Additional context
For
setup-ocaml
I worked this around by explicitly installinggoblint
beforehand: https://github.com/edwintorok/lintcstubs/blob/main/.github/workflows/workflow.yml#L54-L55