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] ppxlib (0.31.0) #24497

Merged
merged 2 commits into from
Oct 5, 2023
Merged

Conversation

pitag-ha
Copy link
Member

Standard infrastructure for ppx rewriters

CHANGES:

CHANGES:

- Fix support for OCaml 5.1: migrated code preserves generative
  functor warnings, without creating more. Locations are better
  preserved. (ocaml-ppx/ppxlib#432, @pitag-ha, @panglesd)

- Driver: Add `-unused-code-warnings` command-line flag. (ocaml-ppx/ppxlib#444, @ceastlund)

- Add `?warning` flag to `Deriving.Generator.make`. (ocaml-ppx/ppxlib#440, @jacksonzou123 via @ceastlund)

- Restore the "path_arg" functionality in the V3 API (ocaml-ppx/ppxlib#431, @ELLIOTTCABLE)

- Expose migration/copying/etc. functions for all AST types needed by `Pprintast` (ocaml-ppx/ppxlib#454, @antalsz)

- Preserve quoted attributes on antiquotes in metaquot (ocaml-ppx/ppxlib#441, @ncik-roberts)

- Attribute namespaces: Fix semantics of reserving multi-component namespaces (ocaml-ppx/ppxlib#443, @ncik-roberts)
@dinosaure
Copy link
Contributor

It seems that this release breaks tests about ppx_rapper:

#=== ERROR while compiling ppx_rapper.1.0.1 ===================================#
# context              2.2.0~alpha3~dev | linux/x86_64 | ocaml-base-compiler.4.14.1 | file:///home/opam/opam-repository
# path                 ~/.opam/4.14/.opam-switch/build/ppx_rapper.1.0.1
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p ppx_rapper -j 255 @install @runtest
# exit-code            1
# env-file             ~/.opam/log/ppx_rapper-8-ed7e6c.env
# output-file          ~/.opam/log/ppx_rapper-8-ed7e6c.out
### output ###
# File "dune-project", line 1, characters 11-16:
# 1 | (lang dune 2.0.1)
#                ^^^^^
# Warning: The ".1" part is ignored here.
# This version is parsed as just 2.0.
# File "test/test.expected.ml", line 1, characters 0-0:
# /usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/test.expected.ml _build/default/test/test.actual.ml
# diff --git a/_build/default/test/test.expected.ml b/_build/default/test/test.actual.ml
# index aacc782..976c8da 100644
# --- a/_build/default/test/test.expected.ml
# +++ b/_build/default/test/test.actual.ml
# @@ -219,7 +219,8 @@ let list =
#                Dynparam.empty elems in
#            let query =
#              (let open Caqti_request in find_opt) ~oneshot:true
# -              (let open Caqti_type in tup2 bool packed_list_type)
# +              ((let open Caqti_type in tup2 bool packed_list_type)
# +              [@ocaml.warning "-33"])
#                ((let open Caqti_type in
#                    tup2 int (tup2 string (tup2 bool (option string))))
#                [@ocaml.warning "-33"]) sql in
# @@ -256,8 +257,8 @@ let collect_list =
#                Dynparam.empty elems in
#            let query =
#              (let open Caqti_request in collect) ~oneshot:true
# -              packed_list_type ((let open Caqti_type in string)
# -              [@ocaml.warning "-33"]) sql in
# +              ((packed_list_type)[@ocaml.warning "-33"])
# +              ((let open Caqti_type in string)[@ocaml.warning "-33"]) sql in
#            Db.collect_list query versions in
#    wrapped
#  module Suit : Ppx_rapper_runtime.CUSTOM =

Not sure if it's related or not.

@pitag-ha
Copy link
Member Author

Yes, that's definitely related: ocaml-ppx/ppxlib#441. Thanks for pointing this out, @dinosaure!

What's happening is: Old ppxlib.metaquot used to drop the first [@ocaml.warning "-33"] attribute in https://github.com/roddyyaga/ppx_rapper/blob/master/ppx/ppx_rapper.ml#L159-L164. That's a bug, which is being fixed in this release.

I've now set an upper ppxlib test bound for all affected ppx_rapper versions (notice: only test bound, not hard bound). Do you want me to open a PR to promote the tests and reverse that test bound on dev ppx_rapper? Or would it be ok for you to do that yourself?

For the opam-repo maintainers: I've just had a quick look through the CI here and it doesn't seem to me that other packages are affected in a similar way. If you notice something, please let me know.

@avsm
Copy link
Member

avsm commented Oct 5, 2023

This looks ok to me as well -- merging. You may want to announce this on https://discuss.ocaml.org, where we have a Community category and an announce tag for this purpose.

@avsm avsm merged commit fc7502c into ocaml:master Oct 5, 2023
1 check was pending
@pitag-ha pitag-ha deleted the release-ppxlib-0.31.0 branch October 5, 2023 16:19
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