Skip to content

Releases: ocaml-ppx/ppxlib

0.33.0

22 Jul 09:44
Compare
Choose a tag to compare

CHANGES:

  • Fix a bug where Code_path.main_module_name would not properly remove
    extensions from the filename and therefore return an invalid module name.
    (#512, @NathanReb)

  • Add -unused-type-warnings flag to the driver to allow users to disable
    only the generation of warning 34 silencing structure items when using
    [@@deriving ...] on type declarations. (#511, @mbarbin, @NathanReb)

  • Make -unused-code-warnings flag to the driver also controls the generation
    of warning 34 silencing structure items when using [@@deriving ...] on type
    declarations. (#510, @mbarbin, @NathanReb)

  • Driver: Add -unused-code-warnings=force command-line flag argument. (#490, @mbarbin)

  • new functions Ast_builder.{e,p}list_tail that take an extra tail
    expression/pattern argument parameter compared to Ast_builder.{e,p}list, so
    they can build ASTs like a :: b :: c instead of only [ a; b ].
    (#498, #502, @v-gb, @NathanReb)

  • Fix Longident.parse so it also handles indexing operators such as
    .!(), .%(;..)<-, or Vec.(.%()) (#494, @Octachron)

  • Add a special_function' variant which directly takes a Longident.t
    argument to avoid the issue that Longident.t cover distinct syntaxic classes
    which cannot be easily parsed by a common parser (#496, @Octachron).

  • Keep location ranges consistent when migrating Pexp_function nodes from 5.2+
    to older versions (#504, @jchavarri)

  • Fix -locations-check behaviour so it is no longer required to pass -check
    as well to enable location checks. (#506, @NathanReb)

0.32.1

23 Apr 07:38
Compare
Choose a tag to compare

CHANGES:

  • Add support for OCaml 5.2

  • Insert errors from caught located exceptions in place of the code that
    should have been generated by context-free rules. (#472, @NathanReb)

0.32.0

05 Feb 08:38
Compare
Choose a tag to compare

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.
    (#468, @NathanReb)

  • Fix Longident.parse so it properly handles unparenthesized dotted operators
    such as +. or *.. (#111, @rgrinberg, @NathanReb)

  • raising an exception does no longer cancel the whole context free phase(#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. (#463, @NathanReb)

  • Update Attribute.get to ignore loc_ghost. (#460, @ceastlund)

  • Add API to manipulate attributes that are used as flags (#408, @dianaoigo)

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

  • Replace Caml with Stdlib. (#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 (#447, @Burnleydev1)

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

  • Set appropriate binary mode when writing to stdout especially for Windows
    compatibility. (#466, @jonahbeckford)

0.31.0

21 Sep 13:13
Compare
Choose a tag to compare

CHANGES:

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

  • Driver: Add -unused-code-warnings command-line flag. (#444, @ceastlund)

  • Add ?warning flag to Deriving.Generator.make. (#440, @jacksonzou123 via @ceastlund)

  • Restore the "path_arg" functionality in the V3 API (#431, @ELLIOTTCABLE)

  • Expose migration/copying/etc. functions for all AST types needed by Pprintast (#454, @antalsz)

  • Preserve quoted attributes on antiquotes in metaquot (#441, @ncik-roberts)

  • Attribute namespaces: Fix semantics of reserving multi-component namespaces (#443, @ncik-roberts)

0.30.0

20 Jun 08:57
Compare
Choose a tag to compare

CHANGES:

  • Adopt the OCaml Code of Conduct on the repo (#426, @pitag-ha)

  • Clean up misleading attribute hints when declared for proper context. (#425, @ceastlund)

  • Ast_pattern now has ebool, pbool helper, and a new map.(#402, @Burnleydev1)

  • multiple errors are now reported in metaquot. (#397, @Burnleydev1)

  • Add Attribute.declare_with_attr_loc (#396, @dvulakh)

  • Add "ns" and "res" as reserved namespaces(#388, @davesnx)

  • Make quoter let binding non-recursive (#401, @sim642)

  • Fix failure of 'lift_map_with_context' in traverse by compile-time
    evaluation of 'fst' and 'snd' (#390, @smuenzel)

  • Driver: Bias the mapping from magic to version towards the current version,
    as it is usually the common case and it helps when magic numbers are
    ambiguous (such as on development versions) (#409, @shym)

  • Remove unnecessary test dependencies towards base and stdio (#421, @kit-ty-kate)

  • Update description to reflect that ppxlib contains more than a library
    (#422, @pitag-ha)

  • Add support for OCaml 5.1, excluding OCaml 5.1.0~alpha1 (#428, @shym, @Octachron , @pitag-ha, @panglesd)

  • Driver: Fix -locations-check option for coercions with ground (#428, @Octachron)

0.29.1

14 Feb 17:58
Compare
Choose a tag to compare

CHANGES:

  • Allow users to vendor ppxlib as-is, as well as ppx_sexp_conv in the same project (#386, @kit-ty-kate)

0.29.0

06 Feb 16:30
Compare
Choose a tag to compare

CHANGES:

  • Remove File_path exports. (#381, @ceastlund)

  • Add Ppxlib.Expansion_helpers with name mangling utilities from ppx_deriving (#370, @sim642)

  • For benchmarking purposes, add a new ppxlib-bench package, in which ppx_sexp_conv is vendored. This breaks users who want to vendor both ppxlib and ppx_sexp_conv and is fixed in ppxlib.0.29.1 (#376)

0.28.0

06 Oct 12:21
Compare
Choose a tag to compare

CHANGES:

  • Make esequence right-associative. (#366, @ceastlund)

  • Deprecate unused attributes in Deriving.Generator (#368, @sim642)

  • Remove a pattern match on mutable state in a function argument. (#362, @ceastlund)

  • Add code-path manipulation attributes. (#352, @ceastlund)

  • Update context-free rules to collect expansion errors generated by ppxlib and
    propagate them to top level without failing. (#358 and #361, @ceastlund)

0.25.1

17 Jun 13:31
Compare
Choose a tag to compare

CHANGES:

0.27.0

14 Jun 18:49
Compare
Choose a tag to compare

CHANGES:

  • Update expansion context to leave out value name when multiple are
    defined at once. (#351, @ceastlund)

  • Add support for OCaml 5.0 (#348, @pitag-ha)

  • Add Code_path.enclosing_value (#349, @ceastlund)

  • Add Code_path.enclosing_module (#346, @ceastlund)

  • Expand code generated by ~enclose_intf and ~enclose_impl (#345, @ceastlund)

  • Add type annotations to code generated by metaquot (#344, @ceastlund)

  • Fix typo in description field of dune-project (#343, @ceastlund)

  • Fix Ast_pattern.many (#333, @nojb)

  • Fix quoter and optimize identifier quoting (#327, @sim642)

  • Driver, when run with --check: Allow toplevel_printer attributes (#340, @pitag-ha)

  • Documentation: Add a section on reporting errors by embedding extension nodes
    in the AST (#318, @panglesd)

  • Driver: In the case of ppxlib internal errors, embed those errors instead of
    raising to return a meaningful AST (#329, @panglesd)

  • API: For each function that could raise a located error, add a function that
    return a result instead (#329, @panglesd)