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.22.2) #21421

Closed
wants to merge 3 commits into from
Closed

[new release] ocamlformat and ocamlformat-rpc-lib (0.22.2) #21421

wants to merge 3 commits into from

Conversation

gpetiot
Copy link
Contributor

@gpetiot gpetiot commented May 24, 2022

Auto-formatter for OCaml code

CHANGES:

Removed

Deprecated

Bug fixes

Changes

New features

gpetiot added 2 commits May 24, 2022 17:36
CHANGES:

### Removed

- Profiles `compact` and `sparse` are now removed (ocaml-ppx/ocamlformat#2075, @gpetiot)
- Options `align-cases`, `align-constructors-decl` and `align-variants-decl` are now removed (ocaml-ppx/ocamlformat#2076, @gpetiot)
- Option `disable-outside-detected-project` is now removed (ocaml-ppx/ocamlformat#2077, @gpetiot)

### Deprecated

- Cancel the deprecations of options that are not set by the preset profiles (ocaml-ppx/ocamlformat#2074, @gpetiot)

### Bug fixes

- emacs: Remove temp files in the event of an error (ocaml-ppx/ocamlformat#2003, @gpetiot)
- Fix unstable comment formatting around prefix op (ocaml-ppx/ocamlformat#2046, @gpetiot)

### Changes

- Qtest comments are not re-formatted (ocaml-ppx/ocamlformat#2034, @gpetiot)
- ocamlformat-rpc is now distributed through the ocamlformat package (ocaml-ppx/ocamlformat#2035, @Julow)
- Doc-comments code blocks with a language other than 'ocaml' (set in metadata) are not parsed as OCaml (ocaml-ppx/ocamlformat#2037, @gpetiot)
- More comprehensible error message in case of version mismatch (ocaml-ppx/ocamlformat#2042, @gpetiot)
- The global configuration file (`$XDG_CONFIG_HOME` or `$HOME/.config`) is only applied when no project is detected, `--enable-outside-detected-project` is set, and no applicable `.ocamlformat` file has been found. Global and local configurations are no longer used at the same time. (ocaml-ppx/ocamlformat#2039, @gpetiot)
- Set `ocaml-version` to a fixed version (4.04.0) by default to avoid reproducibility issues and surprising behaviours (ocaml-ppx/ocamlformat#2064, @kit-ty-kate)
- Split option `--numeric=X-Y` into `--range=X-Y` and `--numeric` (flag). For now `--range` can only be used with `--numeric`. (ocaml-ppx/ocamlformat#2073, ocaml-ppx/ocamlformat#2082, @gpetiot)

### New features

- New syntax `(*= ... *)` for verbatim comments (ocaml-ppx/ocamlformat#2028, @gpetiot)
- Preserve the begin-end construction in the AST (ocaml-ppx/ocamlformat#1785, @hhugo, @gpetiot)
- Preserve position of comments located after the semi-colon of the last element of lists/arrays/records (ocaml-ppx/ocamlformat#2032, @gpetiot)
- Option `--print-config` displays a warning when an .ocamlformat file defines redundant options (already defined by a profile) (ocaml-ppx/ocamlformat#2084, @gpetiot)
@mseri
Copy link
Member

mseri commented May 25, 2022

Can you have a look at the test failures?

#=== ERROR while compiling ocamlformat-rpc-lib.0.22.2 =========================#
# context              2.1.2 | linux/x86_64 | ocaml-base-compiler.4.09.1 | pinned(https://github.com/ocaml-ppx/ocamlformat/releases/download/0.22.2/ocamlformat-0.22.2.tbz)
# path                 ~/.opam/4.09/.opam-switch/build/ocamlformat-rpc-lib.0.22.2
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p ocamlformat-rpc-lib -j 31 @install @runtest
# exit-code            1
# env-file             ~/.opam/log/ocamlformat-rpc-lib-38-c062a8.env
# output-file          ~/.opam/log/ocamlformat-rpc-lib-38-c062a8.out
### output ###
# File "vendor/parser-recovery/test/expect/gen/dune", line 8, characters 12-27:
# 8 |  (libraries parser_recovery))
#                 ^^^^^^^^^^^^^^^
# Error: Library "parser_recovery" not found.
# -> required by
#    _build/default/vendor/parser-recovery/test/expect/gen/driver.exe
# -> required by
#    _build/default/vendor/parser-recovery/test/expect/binop.ml.stdout
# -> required by alias vendor/parser-recovery/test/expect/runtest in
#    vendor/parser-recovery/test/expect/dune.inc:3

and


#=== ERROR while compiling ocamlformat.0.22.2 =================================#
# context              2.1.2 | linux/x86_64 | ocaml-base-compiler.4.09.1 | pinned(https://github.com/ocaml-ppx/ocamlformat/releases/download/0.22.2/ocamlformat-0.22.2.tbz)
# path                 ~/.opam/4.09/.opam-switch/build/ocamlformat.0.22.2
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p ocamlformat -j 31 @install @runtest
# exit-code            1
# env-file             ~/.opam/log/ocamlformat-6427-e9e6af.env
# output-file          ~/.opam/log/ocamlformat-6427-e9e6af.out
### output ###
# File "test/rpc/dune", line 3, characters 12-31:
# 3 |  (libraries ocamlformat-rpc-lib unix)
#                 ^^^^^^^^^^^^^^^^^^^
# Error: Library "ocamlformat-rpc-lib" not found.
# Hint: try:
#   dune external-lib-deps --missing --no-config --root . --ignore-promoted-rules --default-target @install --always-show-command-line --promote-install-files --release --only-packages ocamlformat -p ocamlformat --profile release -j 31 @install @runtest
# File "test/rpc/dune", line 17, characters 12-31:
# 17 |  (libraries ocamlformat-rpc-lib unix)
#                  ^^^^^^^^^^^^^^^^^^^
# Error: Library "ocamlformat-rpc-lib" not found.
# Hint: try:
#   dune external-lib-deps --missing --no-config --root . --ignore-promoted-rules --default-target @install --always-show-command-line --promote-install-files --release --only-packages ocamlformat -p ocamlformat --profile release -j 31 @install @runtest
#    test_unit alias test/unit/runtest

Co-authored-by: Marcello Seri <mseri@users.noreply.github.com>
@mseri
Copy link
Member

mseri commented May 25, 2022

For ocamlformat-rpc-lib I suggest to either completely disable the tests, or update/remove/disable the tests of the vendored parser-recovery library: vendor/parser-recovery/test/expect/gen/dune

@gpetiot
Copy link
Contributor Author

gpetiot commented May 25, 2022

Replaced with #21429

@gpetiot gpetiot closed this May 25, 2022
@gpetiot gpetiot deleted the release-ocamlformat-0.22.2 branch May 25, 2022 19:00
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.

2 participants