Releases: ocaml-ppx/ppxlib
0.37.0
CHANGES:
5.4 Support
- Add initial OCaml 5.4 support (#570, @patricoferris, @NathanReb)
Other Changes
-
Add
Longident.to/of_compiler
to astlib to simplify maintenance
of ppx-es that interacts with other parts of the compiler-libs such
as the type checker. (#603, @NathanReb) -
Fix a bug where some infix operators such as
mod
would be printed as
raw identifiers by ourPprintast
. (#601, @NathanReb) -
Fix 5.2 -> 5.3 migration of constants. Those used to always have a
none
location which can lead to unhelpful error messages.
(#569, @NathanReb) -
Add a new context-free rule type that replaces AST nodes that have the registered
attributes attached to them. (#574, @Skepfyr) -
Allow users to derive code from module bindings and module declarations
(#576, @patricoferris) -
Expose
Ppxlib.Location.Error.t = Astlib.Location.Error.t
(#593, @ceastlund) -
Add
@@@ppxlib.inline.end
, deprecate@@@deriving.end
. (#594, @ceastlund) -
Clean the AST of any ppxlib migration attributes whenever printing using
Pretty_print mode and the use_compiler_pp flag. (#598, @patricoferris) -
Add custom printer support to
pp_ast
functions via the?printer
config
parameter. (#526, @pedrobslisboa)
0.36.2
CHANGES:
- Make Ast_builder's default
value_binding
constructor generate the proper
pvb_constraint
from the pattern and expression arguments.
(#589, @NathanReb) - Fix pprintast to output correct syntax from
Ppat_constraint (pat, Ptyp_poly ...)
nodes until they are completely dropped. (#588, @NathanReb)
0.36.1
0.36.0
CHANGES:
-
Change
Location.none
to match the compiler'sLocation.none
as of OCaml
4.08. This fixes a bug inloc_of_attribute
(#540, @ncik-roberts, @patricoferris) -
Bump ppxlib's AST to 5.2.0 (#514, @patricoferris)
-
Add the
[@@@expand_inline]
transformation and support for floating attribute context
free transformations. (#560, @jaymody) -
Add a
-raise-embedded-errors
flag to the driver. Setting this flag raises the first
ocaml.error
embedded in the final AST. -
Export
Ast_pattern.fail
. (#563, @ceastlund) -
Make
Ast_traverse.sexp_of
more concise, and add a test. (#561, @ceastlund)
0.35.0
CHANGES:
-
Allow use of effect syntax in preprocessed files without causing migration
failures. (#552, @hhugo, @NathanReb) -
Remove support for compilers older than 4.08 (#556, @NathanReb)
-
Add a
--use-compiler-pp
flag to the standalone driver. This flag
can be set when the driver outputs source code to make it use the compiler's
Pprintast
instead of ppxlib's.
(#555, @NathanReb)
0.34.0
CHANGES:
5.3 support
-
Add initial OCaml 5.3 support (#487, @NathanReb, @hhugo, @nojb)
-
Initialise OCaml 5.3's lexer with the
keywords
setting fromOCAMLPARAM
or
the new-keywords
driver's CLI option to allow the standalone ppx driver to
process old packages usingeffect
as an identifier
(#535, @dra27, @NathanReb)
Other changes
-
Add
Pprintast.binding
,longident
andpayload
(#542, @mattiasdrp) -
Fix
deriving_inline
round-trip check so that it works with 5.01 <-> 5.02
migrations (#519, @NathanReb) -
Add ppxlib's AST pretty-printing utilities in
Ppxlib.Pp_ast
and
appxlib-pp-ast
executable in a new separateppxlib-tools
package
(#517, #525, #537, @NathanReb) -
Change
-dparsetree
from a sexp output to a pretty printed AST, closer
to what the compiler's-dparsetree
is.
(#530, @NathanReb) -
Add Parsetree documentation comments to
Ast_builder
functions (#518, @patricoferris) -
Support class type declarations in derivers with the new, optional arguments
{str,sig}_class_type_decl
inDeriving.add
(#538, @patricoferris)
0.33.0
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 toAst_builder.{e,p}list
, so
they can build ASTs likea :: b :: c
instead of only[ a; b ]
.
(#498, #502, @v-gb, @NathanReb) -
Fix
Longident.parse
so it also handles indexing operators such as
.!()
,.%(;..)<-
, orVec.(.%())
(#494, @Octachron) -
Add a
special_function'
variant which directly takes aLongident.t
argument to avoid the issue thatLongident.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
0.32.0
CHANGES:
-
Add an optional
embed_errors
argument toContext_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 ignoreloc_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
withStdlib
. (#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
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 toDeriving.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)