Releases: ocaml-ppx/ppxlib
0.38.0
CHANGES:
-
Add support for OCaml 5.5 (#622, @patricoferris, @NathanReb)
-
Add support for OCaml 5.4 bivariant type parameters, they can now be used
alongside ppx-es. (#629, @NathanReb) -
Add
Attribute.Floating.declare_with_attr_locand.declare_with_name_loc,
by analogy to the same functions at top level ofAttribute. (#631, @ceastlund) -
Migrate
Ptyp_opennodes using an extension point (#625, @patricoferris) -
Add Ast_builder and Ast_pattern utilities to manipulate encoded
effect patterns (#624, @NathanReb) -
Fix a bug where ppat_effects would be encoded/decoded instead of copied by
the 5.4 <-> 5.3 migrations (#624, @NathanReb) -
Fix infinite loop when duplicate attributes are present, raising
an error instead (#613, @ceastlund, @patricoferris) -
Ignore extensions inside attributes for the unused extension check
(#616, @Skepfyr) -
Fix a bug that inserted
Location.noneintoLongidents when using OCaml
5.4 and above (#619, @patricoferris) -
Add support for OCaml 5.4 labeled tuples, they can now be used alongside
ppx-es. Also adds Ast_builder and Ast_pattern utilities to manipulate them.
(#607, @NathanReb)
0.37.0
CHANGES:
5.4 Support
- Add initial OCaml 5.4 support (#570, @patricoferris, @NathanReb)
Other Changes
-
Add
Longident.to/of_compilerto 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
modwould 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_astfunctions via the?printerconfig
parameter. (#526, @pedrobslisboa)
0.36.2
CHANGES:
- Make Ast_builder's default
value_bindingconstructor generate the proper
pvb_constraintfrom 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.noneto match the compiler'sLocation.noneas 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-errorsflag to the driver. Setting this flag raises the first
ocaml.errorembedded in the final AST. -
Export
Ast_pattern.fail. (#563, @ceastlund) -
Make
Ast_traverse.sexp_ofmore 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-ppflag to the standalone driver. This flag
can be set when the driver outputs source code to make it use the compiler's
Pprintastinstead 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
keywordssetting fromOCAMLPARAMor
the new-keywordsdriver's CLI option to allow the standalone ppx driver to
process old packages usingeffectas an identifier
(#535, @dra27, @NathanReb)
Other changes
-
Add
Pprintast.binding,longidentandpayload(#542, @mattiasdrp) -
Fix
deriving_inlineround-trip check so that it works with 5.01 <-> 5.02
migrations (#519, @NathanReb) -
Add ppxlib's AST pretty-printing utilities in
Ppxlib.Pp_astand
appxlib-pp-astexecutable in a new separateppxlib-toolspackage
(#517, #525, #537, @NathanReb) -
Change
-dparsetreefrom a sexp output to a pretty printed AST, closer
to what the compiler's-dparsetreeis.
(#530, @NathanReb) -
Add Parsetree documentation comments to
Ast_builderfunctions (#518, @patricoferris) -
Support class type declarations in derivers with the new, optional arguments
{str,sig}_class_type_declinDeriving.add(#538, @patricoferris)
0.33.0
CHANGES:
-
Fix a bug where
Code_path.main_module_namewould not properly remove
extensions from the filename and therefore return an invalid module name.
(#512, @NathanReb) -
Add
-unused-type-warningsflag 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-warningsflag 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=forcecommand-line flag argument. (#490, @mbarbin) -
new functions
Ast_builder.{e,p}list_tailthat take an extra tail
expression/pattern argument parameter compared toAst_builder.{e,p}list, so
they can build ASTs likea :: b :: cinstead of only[ a; b ].
(#498, #502, @v-gb, @NathanReb) -
Fix
Longident.parseso 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.tcover distinct syntaxic classes
which cannot be easily parsed by a common parser (#496, @Octachron). -
Keep location ranges consistent when migrating
Pexp_functionnodes from 5.2+
to older versions (#504, @jchavarri) -
Fix
-locations-checkbehaviour 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_errorsargument toContext_free.map_top_downthat
controls how to deal with exceptions thrown by context-free rules.
(#468, @NathanReb) -
Fix
Longident.parseso 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.getto 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
CamlwithStdlib. (#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
stdoutespecially for Windows
compatibility. (#466, @jonahbeckford)