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

Add ocamlformat as dev dependency #516

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,30 @@ below for details.

### Developing patches

#### Setting up your dev environment

Before starting development on `ppxlib` you should install ppxlib's
dependencies. If you're doing it for the first time you can create
a local switch with all the right dependencies installed by running:
```
opam switch create ./ --with-test --with-dev-setup
```
or if you want to use a pre-existing switch:
```
opam install ./ppxlib.opam --deps-only --with-test --with-dev-setup
```

Note that the `--with-dev-setup` flag is only available from `opam.2.2.0`.
If you are running an older opam and do not wish to update it, you will have
to manually install `ocamlformat`.

#### Submitting patches

Before submitting a PR, please run `dune build @install @runtest @fmt`
on your machine.

In addition to normal dependencies, you'll need to run something like
`opam install cinaps ocamlformat.0.26.1`, but with the version
specified in [`.ocamlformat`](.ocamlformat). [cinaps][cinaps] is used
to keep up-to-date some parts of the code that are auto-generated and
committed in the repository.
[cinaps][cinaps] is used to keep up-to-date some parts of the code that are
auto-generated and committed in the repository.

### Submitting patches and code review

Expand Down
3 changes: 2 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
stdlib-shims
(ocamlfind :with-test)
(re (and :with-test (>= 1.9.0)))
(cinaps (and :with-test (>= v0.12.1))))
(cinaps (and :with-test (>= v0.12.1)))
(ocamlformat (and :with-dev-setup (= 0.26.2))))
(conflicts
(ocaml-migrate-parsetree (< 2.0.0))
(ocaml-base-compiler (= 5.1.0~alpha1))
Expand Down
1 change: 1 addition & 0 deletions ppxlib.opam
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ depends: [
"ocamlfind" {with-test}
"re" {with-test & >= "1.9.0"}
"cinaps" {with-test & >= "v0.12.1"}
"ocamlformat" {with-dev-setup & = "0.26.2"}
"odoc" {with-doc}
]
conflicts: [
Expand Down
Loading