Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint-fmt fails on package using dune's "site" feature #871

Closed
edwintorok opened this issue Sep 12, 2023 · 2 comments
Closed

lint-fmt fails on package using dune's "site" feature #871

edwintorok opened this issue Sep 12, 2023 · 2 comments
Labels
type/bug Something isn't working

Comments

@edwintorok
Copy link
Contributor

edwintorok commented Sep 12, 2023

Context

lint-fmt fails in the OCaml CI when using dune's site feature in install 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 in setup-ocaml based action: https://github.com/edwintorok/lintcstubs/actions/runs/6157861712/job/16709496685

It 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 in install stanza as sites 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 installing goblint beforehand:
https://github.com/edwintorok/lintcstubs/blob/main/.github/workflows/workflow.yml#L54-L55

@edwintorok edwintorok added the type/bug Something isn't working label Sep 12, 2023
@edwintorok
Copy link
Contributor Author

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.

@edwintorok
Copy link
Contributor Author

That last bug should be fixed by #909

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant