Skip to content

Cleanup formatting #799

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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

gretay-js
Copy link
Contributor

Change make fmt to use dune build @fmt --auto-promote.

  • replace all ocamlformat related files in different subdirectories with top-level ones.
  • simplify Makefile rules related to formatting
  • no need to keep the list of file names to format in 3 different places, now it's just in .ocamlformat-enabled
  • no need to keep format settings in sync, they are all in one place
  • use .ocamlformat-ignore to exclude flambda2 parser
  • it formats dune files too
  • vendor "ocaml" to stop it from being formatted.

I'm slightly worried about other consequences of vendoring ocaml: targets that aren't explicitly requested by toplevel dune file won't build or install any more, according to the dune docs), but nothing is missing from the install directory.

@gretay-js
Copy link
Contributor Author

This is now failing because ocamlformat.yml github workflow we have doesn't set up special dune when doing configure. Why do we have it in a separate workflow file?

@gretay-js gretay-js force-pushed the unify-ocamlformat-files branch from 91dbd03 to 428a910 Compare September 1, 2022 12:24
@mshinwell
Copy link
Collaborator

@gretay-js not sure there is any particularly good reason it's in a separate file

@gretay-js
Copy link
Contributor Author

@gretay-js not sure there is any particularly good reason it's in a separate file

ok, maybe I can add it as an extra target in one of the existing builds.
The dependency on special dune can probably be avioded, but it's convenient.

@Gbury
Copy link
Contributor

Gbury commented Apr 3, 2023

@gretay-js we can probably close this one I think ?

@mshinwell
Copy link
Collaborator

@gretay-js ping

@gretay-js
Copy link
Contributor Author

I'll rebase and fix it up.

@Gbury
Copy link
Contributor

Gbury commented Aug 2, 2023

Ping again on that one ?

@gretay-js gretay-js marked this pull request as draft March 28, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants