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

[new release] ocamlformat and ocamlformat-rpc-lib (0.24.0) #21774

Closed
wants to merge 2 commits into from
Closed

[new release] ocamlformat and ocamlformat-rpc-lib (0.24.0) #21774

wants to merge 2 commits into from

Conversation

gpetiot
Copy link
Contributor

@gpetiot gpetiot commented Jul 11, 2022

Auto-formatter for OCaml code

CHANGES:

New features

CHANGES:

### New features

- Support `odoc-parser.2.0.0` (ocaml-ppx/ocamlformat#2123, @gpetiot)
  * Breaking change: incompatible with earlier versions of `odoc-parser`
  * New inline math elements `{m ...}` available in doc-comments
  * New block math elements `{math ...}` available in doc-comments
"base" {>= "v0.12.0"}
"cmdliner" {>= "1.1.0"}
"dune" {>= "2.8"}
"dune" {with-test & < "3.0"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that still the case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh we can loosen up this one indeed!

@kit-ty-kate
Copy link
Member

Mmh, it seems to still be incompatible, do you know why?

#=== ERROR while compiling ocamlformat.0.24.0 =================================#
# context              2.1.2 | linux/x86_64 | ocaml-base-compiler.4.08.1 | pinned(https://github.com/ocaml-ppx/ocamlformat/releases/download/0.24.0/ocamlformat-0.24.0.tbz)
# path                 ~/.opam/4.08/.opam-switch/build/ocamlformat.0.24.0
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p ocamlformat -j 31 @install @runtest
# exit-code            1
# env-file             ~/.opam/log/ocamlformat-546-62cdfe.env
# output-file          ~/.opam/log/ocamlformat-546-62cdfe.out
### output ###
# File "test/cli/repl_file_errors.t/run.t", line 1, characters 0-0:
# /usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/4e1e10bf7ae57bd1e6d8a0835a6c5dae/default/test/cli/repl_file_errors.t/run.t _build/.sandbox/4e1e10bf7ae57bd1e6d8a0835a6c5dae/default/test/cli/repl_file_errors.t/run.t.corrected
# diff --git a/_build/.sandbox/4e1e10bf7ae57bd1e6d8a0835a6c5dae/default/test/cli/repl_file_errors.t/run.t b/_build/.sandbox/4e1e10bf7ae57bd1e6d8a0835a6c5dae/default/test/cli/repl_file_errors.t/run.t.corrected
# index 28981c4..d2d4e3f 100644
# --- a/_build/.sandbox/4e1e10bf7ae57bd1e6d8a0835a6c5dae/default/test/cli/repl_file_errors.t/run.t
# +++ b/_build/.sandbox/4e1e10bf7ae57bd1e6d8a0835a6c5dae/default/test/cli/repl_file_errors.t/run.t.corrected
# @@ -27,5 +27,5 @@ Make sure the locations of errors in repl files are right.
#    [1]
#  
#    $ ocamlformat --repl-file empty_line_begin.repl
# -  # foo bar ;;
# +  # foo bar;;
#    - : 0
# (cd _build/default/test/unit && ./test_unit.exe)

@gpetiot
Copy link
Contributor Author

gpetiot commented Jul 12, 2022

No it shouldn't depend on the odoc-parser version. It looks like the only thing that changed in the test env is dune being 3.3.1, and I'm not a fan of having tests depending on the dune version. @emillon do you know if dune is the culprit here? (a few things changed for cram tests in 3.0.0)

@emillon
Copy link
Contributor

emillon commented Jul 12, 2022

Not super easy to determine with just this diff, it would be useful to try to pinpoint exactly which release introduces the diff (and determine which ). If that's 2.9.3 -> 3.0.0, one thing that comes to mind is ocaml/dune#4975, in which case the ocamlformat binary you're using in the tests would be the wrong one. Related: this stanza probably needs a (applies_to :whole_subtree) option.

@gpetiot
Copy link
Contributor Author

gpetiot commented Jul 12, 2022

I confirm this is fine with 2.9.3 and broken with 3.0.2., but the (applies_to :whole_subtree) doesn't fix the issue.

@emillon
Copy link
Contributor

emillon commented Jul 13, 2022

fixed in ocaml-ppx/ocamlformat#2124

@gpetiot
Copy link
Contributor Author

gpetiot commented Jul 18, 2022

Replaced by #21830

@gpetiot gpetiot closed this Jul 18, 2022
@gpetiot gpetiot deleted the release-ocamlformat-0.24.0 branch July 18, 2022 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants