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.32.0) #25179

Merged
merged 1 commit into from
Feb 7, 2024
Merged

Conversation

NathanReb
Copy link
Contributor

Standard infrastructure for ppx rewriters

CHANGES:

CHANGES:

- Add an optional `embed_errors` argument to `Context_free.map_top_down` that
  controls how to deal with exceptions thrown by context-free rules.
  (ocaml-ppx/ppxlib#468, @NathanReb)

- Fix `Longident.parse` so it properly handles unparenthesized dotted operators
  such as `+.` or `*.`. (ocaml-ppx/ppxlib#111, @rgrinberg, @NathanReb)

- raising an exception does no longer cancel the whole context free phase(ocaml-ppx/ppxlib#453, @Burnleydev1)

- Sort embedded errors that are appended to the AST by location so the compiler
  reports the one closer to the beginning of the file first. (ocaml-ppx/ppxlib#463, @NathanReb)

- Update `Attribute.get` to ignore `loc_ghost`. (ocaml-ppx/ppxlib#460, @ceastlund)

- Add API to manipulate attributes that are used as flags (ocaml-ppx/ppxlib#408, @dianaoigo)

- Update changelog to use ISO 8061 date format: YYYY-MM-DD. (ocaml-ppx/ppxlib#445, @ceastlund)

- Replace `Caml` with `Stdlib`. (ocaml-ppx/ppxlib#427, @ceastlund)

- When a transformation raises, the last valid AST is used as input to the upcoming
  transformations. All such errors are collected and appended as
  extension nodes to the final AST (ocaml-ppx/ppxlib#447, @Burnleydev1)

- Fix a small mistake in the man pages: Embededding errors is done by default with
  `-as-pp`, not with `-dump-ast` (ocaml-ppx/ppxlib#464, @pitag-ha)

- Set appropriate binary mode when writing to `stdout` especially for Windows
  compatibility. (ocaml-ppx/ppxlib#466, @jonahbeckford)
@raphael-proust
Copy link
Contributor

@toots the CI has some false negatives on some ogg packages:

ogg.0.6.0 (failed: expected declaration specifiers or '...' before string constant)
ogg.0.7.0 (failed: expected declaration specifiers or '...' before string constant)
ogg.0.7.1 (failed: expected declaration specifiers or '...' before string constant)
ogg.0.7.2 (failed: expected declaration specifiers or '...' before string constant)

And the error is

# File "src/dune", line 9, characters 9-18:
# 9 |   (names ogg_stubs)
#              ^^^^^^^^^
# (cd _build/default/src && /usr/bin/gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 -g -I /home/opam/.opam/4.14/lib/ocaml -o ogg_stubs.o -c ogg_stubs.c)
# ogg_stubs.c:169:13: warning: "callback" is deprecated: use "caml_callback" instead
#   169 | CAMLprim value ocaml_ogg_sync_pageseek(value callback, value oy) {
#       |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
# In file included from ogg_stubs.c:39:
# ogg_stubs.c: In function 'ocaml_ogg_sync_pageseek':
# ogg_stubs.c:170:26: error: expected declaration specifiers or '...' before string constant

Do you want to fix the packages? To mark them as unavailable (a.k.a. broken)?

I don't know exactly what's the breakage there so Idk what fixing it would involve… opam-healthcheck suggests that the packages are broken on 4.14 only which is somewhat strange.

@toots
Copy link
Contributor

toots commented Feb 5, 2024

Yeah, this is due to caml/compatibility.h defining a callback pre-processor constant, which is unfortunate.

A quick patch that seems to work is to add:

#define CAML_NAME_SPACE 1

Before all the OCaml includes.

It's not clear to me when the breaking change was introduced but:

  • It compiles with 5.1.1 again
  • Release 0.7.3's only changelog was to fix compilation

So, it seems that marking those as unavailable would hurt.

@NathanReb
Copy link
Contributor Author

None of the revdeps failure seem to be related to ppxlib so I think this is good to go!

@mseri
Copy link
Member

mseri commented Feb 7, 2024

I agree, looks fine

@mseri mseri merged commit f0a37f5 into ocaml:master Feb 7, 2024
1 of 2 checks passed
nberth pushed a commit to nberth/opam-repository that referenced this pull request Jun 18, 2024
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.

4 participants