This release of UTop 2.14.0 brings support for the upcoming version of the compiler, OCaml 5.2.
See full changelog
- Add support for OCaml 5.2 (#470, fixes #466, @leostera, @ManasJayanth, @huwaireb)
Read the latest releases and updates from the OCaml compiler, OCaml infrastructure and the OCaml Platform Tools.
This release of UTop 2.14.0 brings support for the upcoming version of the compiler, OCaml 5.2.
We're thrilled to announce the release of Merlin 4.14, a significant update that introduces a suite of enhancements and fixes to improve your OCaml editor experience.
In addition to the improvements and bug fixes in this release, Merlin 4.14 is the first version to support the upcoming OCaml 5.2 compiler.
Some highlights in this release include:
Happy coding!
FLG -pp ppx.exe -as-pp/-dump-ast
use of invalid shell redirection when
direct process launch on Windows. (#1723, fixes #1722)ocamlmerlin
responses to detect server crashes (#1716)module-type
(#1728, partially fixes #1656)We're happy to announce that Dune 3.14.0 is now available. This feature has many fixes and new features that you can find in the changelog.
There are a few new features that we would like to specially highlight.
(dynamic_include)
It is common for some parts of a build to be dynamic: for example a source file can be generated, or some parts of the configuration like C flags can be generated from a Dune rule. But until now it was not possible to generate rules dynamically.
For example, one might want to do it is to set up one rule per input file. This is a common pattern in test suites and is easy to do with Make. But Dune does not have a concept of parameterized rules, so it is necessary to set up one rule per input file.
The pattern to do this with Dune is to:
dune.inc
file using this generator;(include dune.inc)
in the main dune
file,However, this requires checking in the generated dune.inc
file in the
repository. Another drawback is that when modifying the list of input files, it
is necessary to run tests twice: one to update dune.inc
, one to run the new
test.
This release of Dune adds a new (dynamic_include)
stanza that lifts these
restrictions: dune.inc
does not have to be part of the source tree, it can be
generated transparently. This comes with some restrictions: some stanzas can
not be generated, in particular the ones that define public libraries. And due
to how rule loading works, the generated stanza needs to be defined in a
different directory.
Still, this should be useful for many users that rely on the generate-include-commit pattern described above.
Sherlodoc is a search engine for OCaml documentation, which supports search by
name, documentation and fuzzy type search (similar to Hoogle in the Haskell
world). It can be obtained from opam using opam install sherlodoc
.
When it is available, Dune commands that produce HTML documentation, such as
dune build @doc
and dune build @doc-new
, will include a search bar in the
generated output.
Introduce a (dynamic_include ..)
stanza. This is like (include foo)
but
allows foo
to be the target of a rule. Currently, there are some
limitations on the stanzas that can be generated. For example, public
executables, libraries are currently forbidden. (#9913, @rgrinberg)
Introduce $ dune promotion list
to print the list of available promotions.
(#9705, @moyodiallo)
If Sherlodoc is installed, add a search bar in generated HTML docs (#9772, @EmileTrotignon)
Add only_sources
field to copy_files
stanza (#9827, fixes #9709,
@jchavarri)
The (foreign_library)
stanza now supports the (enabled_if)
field. (#9914,
@nojb)
Fix $ dune install -p
incorrectly recognizing packages that are supposed to
be filtered (#9879, fixes #4814, @rgrinberg)
subst: correctly handle opam files in opam/ subdirectory (#9895, fixes #9862, @emillon)
Odoc private rules are not set up if a library is not available due to
enabled_if
(#9897, @rgrinberg and @jchavarri)
When dune language 3.14 is enabled, resolve the binary in (run %{bin:..} ..)
from where the binary is built. (#9708, @rgrinberg)
boot: remove single-command bootstrap. This was an alternative bootstrap strategy that was used in certain conditions. Removal makes the bootstrap a bit slower on Linux when only a single core is available, but bootstrap is now reproducible in all cases. (#9735, fixes #9507, @emillon)
The ppxlib dev team is happy to announce the release of ppxlib.0.32.0.
The main feature of this release, implemented by @burnleydev1 during their Outreachy internship, is a huge improvement of the handling of located exceptions raised by ppx-es. Whenever a rewrite of the AST throws such an exception, the ppxlib driver catches it and resumes the rewriting using the latest valid AST it knows of. All caught exceptions are appended to the final AST as [%%ocaml.error ..]
nodes. This means the driver returns a valid AST instead of one composed of a single error node corresponding to the first raised exception.
This leads to a much better experience for ppx users as merlin now has a valid AST to work with when this happens, allowing it to properly function, reporting all errors, from ppx-es or otherwise.
Note that despite this change we still recommend ppx authors to embed errors in the rewritten AST rather than throw exceptions.
The release also comes with a few bug fixes on longident parsing or windows compatibility and a new simplified API for ppx authors using attributes as flags (i.e. attributes without payloads such as [@ignore]
for instance).
We'd like to thank our external contributors for this release:
We'd also like to thank the OCaml Software Foundation who has been funding my work on this release.
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)
We just released version 3.13.1 with some bugfixes.
Fix performance regression for incremental builds (#9769, fixes #9738, @rgrinberg)
Fix dune ocaml top-module
to correctly handle absolute paths. (#8249, fixes
#7370, @Alizter)
subst: ignore broken symlinks when looking at source files (#9810, fixes #9593, @emillon)
subst: do not fail on 32-bit systems when large files are encountered. Just log a warning in this case. (#9811, fixes #9538, @emillon)
boot: sort directory entries in readdir. This makes the dune binary reproducible in terms of filesystem order. (#9861, fixes #9794, @emillon)
The release of odoc
2.4.0 last month introduced a regression that caused Dune rules to fail in some cases. This release of odoc
2.4.1 fixes this issue.
We're happy to announce that Dune 3.13.0 is now available. This feature is packed with fixes and new features that you can find in the changelog.
There are a few new features that we would like to specially highlight.
When menhir
is used to generate code from .mly
files, there are sometimes
issues with the grammar itself, such as shift-reduce conflicts.
Menhir has an option to generate a "conflicts" file using its --explain
flag,
but until now this was not exposed by Dune. Starting from this version, this
file will be generated automatically to help developers debug their grammars.
Dune's global cache is a way to save the result of intermediate build results, even across projects. Previously, it would only work with file targets. With this change, it now supports Dune's experimental directory targets.
In several places in the Dune language, it is possible to pass a list of
modules. For example in a (library)
stanza, if for some reason the default of
picking all the source files in the current directory is not the right thing to
do, it is possible to pass (module A B C)
to only attach these modules to the
library.
An important limitation has been that the list of modules needed to be static:
written as is in the dune
file. This limitation has now been lifted and it is
possible to use (:include)
or %{read-lines:file}
in this field and similar
ones.
LexiFi's use case is a system of static plug-ins: a program is extended by selecting which modules are linked to the application core. This list of modules can now be emitted by a generator that reads a configuration file.
Previously, this required using OCaml syntax for the dune
file, which has
several issues, including incompatibility with features like
(include_subdirs)
and poor performance because Dune does not know the
dependencies of the generator and needs to re-run the build more times than
necessary.
Add command dune cache clear
to completely delete all traces of the Dune
cache. (#8975, @nojb)
Allow to disable Coq 0.8 deprecation warning (#9439, @ejgallego)
Allow OCAMLFIND_TOOLCHAIN
to be set per context in the workspace file
through the env
stanza. (#9449, @rgrinberg)
Menhir: generate .conflicts
file by default. Add new field to the
(menhir)
stanza to control the generation of this file: (explain <blang expression>)
. Introduce (menhir (flags ...) (explain ...))
field in the
(env)
stanza, delete (menhir_flags)
field. All changes are guarded under
a new version of the Menhir extension, 3.0. (#9512, @nojb)
Directory targets can now be cached. (#9535, @rleshchinskiy)
It is now possible to use special forms such as (:include)
and variables
%{read-lines:}
in (modules)
and similar fields. Note that the
dependencies introduced in this way (i.e., the files being read) must live in a
different directory than the stanza making use of them. (#9578, @nojb)
Remove warning 30 from default set for projects where dune lang
is at least
3.13 (#9568, @gasche)
Add coqdoc_flags
field to coq
field of env
stanza, allowing the setting
of workspace-wide defaults for coqdoc_flags
. (#9280, fixes #9139, @Alizter)
ctypes: fix an error where (ctypes)
with no (function_description)
would
cause an error trying refer to a nonexistent _stubs.a
dependency (#9302,
fix #9300, @emillon)
(depends)
and related fields in dune-project
are well-formed. (#9472, fixes #9270, @ElectreAAS)Do not ignore (formatting ..)
settings in context or workspace files
(#8447, @rgrinberg)
Fixed a bug where Dune was incorrectly parsing the output of coqdep when it was escaped, as is the case on Windows. (#9231, fixes #9218, @Alizter)
Copying mode for sandboxes will now follow symbolic links (#9282, @rgrinberg)
Forbid the empty (binaries ..)
field in the env
stanza in the workspace
file unless language version is at least 3.2. (#9309, @rgrinberg)
[Coq] Fix bug in computation of flags when composed with boot theories. (#9347, fixes #7909, @ejgallego)
Fixed a bug where the (select)
field of the (libraries)
field of the
(test)
stanza wasn't working properly. (#9387, fixes #9365, @Alizter)
Fix handling of the PATH
argument to dune init proj NAME PATH
. An
intermediate directory called NAME
is no longer created if PATH
is
supplied, so dune init proj my_project .
will now initialize a project in
the current working directory. (#9447, fixes #9209, @shonfeder)
Experimental doc rules: Correctly handle the case when a package depends upon its own sublibraries (#9461, fixes #9456, @jonludlam)
Resolve various public binaries to their build location, rather than to where
they're copied in the _build/install
directory (#9496, fixes #7908,
@rgrinberg).
Correctly ignore warning flags in vendored projects (#9515, @rgrinberg)
Use watch exclusions in watch mode on MacOS (#9643, fixes #9517, @PoorlyDefinedBehaviour)
Fix Merlin configuration for (include_subdirs qualified)
modules (#9659,
fixes #8297, @rgrinberg)
Fix handling of enabled_if
in binary install stanzas. Previously, we'd
ignore the result of enabled_if
when evaluating %{bin:..}
(#9707,
@rgrinberg)
We just released version 3.12.2 with 2 bugfixes.
Fix version check in runtest_alias
for cram
stanza (#9454, @emillon)
Fix stack overflow when a (run)
action can not be parsed. (#9530, fixes
#9529, @gridbugs)
In the last three months after the release of OCaml 5.1.0, three significant regressions have been discovered in OCaml 5.1.0. Those regressions concern the packaging of executables, the typechecking of OCaml programs, and the performance of numerical codes.
Since those regressions affect many users and could have lasting effects, we have published patch release OCaml 5.1.1 fixing those issues.
As a major exception to our policy for patch releases, OCaml 5.1.1 will contain
one breaking change in the standard library: the Compression
flag has been
removed from the Marshal
module.
This drastic measure was taken because supporting ZSTD compression in the standard library made ZSTD a dependency of all OCaml executables. Since the compiler should not impose its dependency on end users, the support for compressed marshaling has been moved to a compiler internal library in 5.1.1.
Accounting for the still-experimental nature of the Multicore runtime, this patch release 5.1.1 also contains safe fixes for subtle concurrency issues in the OCaml runtime.
The full list of changes is available below for more details.
The base compiler can be installed as an opam switch with the following commands:
opam update
opam switch create 5.1.1
The source code for the release is also directly available on:
Marshal.Compression
flag to the
Marshal.to_*
functions introduced in 5.1 by #12006, as it cannot
be implemented without risking to link -lzstd
with all
ocamlopt
-generated executables. The compilers are still able to use
ZSTD compression for compilation artefacts.
(Xavier Leroy and David Allsopp, report by Kate Deplaix, review by
Nicolås Ojeda Bär, Kate Deplaix, and Damien Doligez).#11800, #12707: Fix an assertion race condition in install_backup_thread
(Jan Midtgaard, review by Gabriel Scherer)
#12486, #12535: Fix delivery of unhandled effect exceptions on AMD64 with
--enable-frame-pointers
(Miod Vallat, report by Jan Midtgaard, review by Gabriel Scherer)
#12712, #12742: Fix an assertion boundary case in caml_reset_young_limit
(Jan Midtgaard, review by Guillaume Munch-Maccagnoni)
#12713, #12715: Disable common subexpression elimination for atomic loads (Gabriel Scherer and Vincent Laviron, review by Vincent Laviron, KC Sivaramakrishnan and Xavier Leroy, report by Vesa Karvonen and Carine Morel)
#12318: GC: simplify the meaning of custom_minor_max_size:
blocks with
out-of-heap memory above this limit are now allocated directly in
the major heap.
(Damien Doligez, report by Stephen Dolan, review by Gabriel Scherer)
#12439: Finalise and collect dead custom blocks during minor collection (Damien Doligez, review by Xavier Leroy, Gabriel Scherer and KC Sivaramakrishnan)
#12590, #12595: Move caml_collect_gc_stats_sample
in
caml_empty_minor_heap_promote
before barrier arrival.
(B. Szilvasy, review by Gabriel Scherer)
#12491, #12493, #12500, #12754: Do not change GC pace when creating subarrays of bigarrays (Xavier Leroy, report by Ido Yariv, analysis by Gabriel Scherer, review by Gabriel Scherer and Fabrice Buoro)
#12581, #12609: Fix error on uses of packed modules outside their pack to correctly handle nested packs (Vincent Laviron, report by Javier ChĂĄvarri, review by Pierre Chambart)
#12623: Fix the computation of variance composition (Florian Angeletti, report by Vesa Karvonen, review by Gabriel Scherer)
#12645, #12649: Fix error messages for cyclic type definitions in presence of
the -short-paths
flag.
(Florian Angeletti, report by Vesa Karvonen, review by Gabriel Scherer)
#12757: Fix ocamlnat
(native toplevel) by registering frametables correctly
(Stephen Dolan, Nick Barnes and Mark Shinwell,
review by Vincent Laviron and SĂŠbastien Hinderer)
#12791: extern
is applied to definitions of caml_builtin_cprim
and caml_names_of_builtin_cprim
when linking bytecode -custom
executables with a C++ linker.
(Shayne Fletcher, review by Antonin DĂŠcimo and Xavier Leroy)
We are pleased to announce the release of OCaml LSP 1.17.0. This version comes packed with fixes and new features.
Notable features that come in this release include:
in
keyword completing to other terms in the editor, we've added auto-completion for this keyword in OCaml LSP. Typing in
will now only suggest auto completion for the in
keyword.--fallback-read-dot-merlin
flag is on. (#1173)in
(#1217)The odoc team is delighted to announce the release of odoc 2.4.0. It mainly contains support for search engines. There are of course bugfixes and smaller new features.
Odoc now support searching in the documentation ! The search is made to run in the browser, so that you do not need a server to enable search: you can have search on your documentation hosted on github pages or even locally on your machine.
No search engine is shipped with, you need to provide one, but all the facilities to make use of one are present. We adapted @art-w 's sherlodoc for seamless integration with odoc, alongside with new features. It is not yet released on opam, but we hope it will be soon.
You can already test sherlodoc and play with it on your own projects, there are instructions in its readme. Sherlodoc has fuzzy typed-based search like hoogle in the haskell world, and is made to work best for OCaml (unlike a general purpose search engine like elastic search).
Check the results on odoc's own online documentation : ocaml.github.io/odoc.
While we are dedicated to developing the best tooling to generate and serve documentation on OCaml.org, creating a well-documented library ecosystem can only be a collective effort. Package authors: weâre working hard to give you great tools, but weâll need all your help to create an ecosystem of well-documented libraries for OCaml!
If you find that writing documentation for your library isnât as straightforward as you would like, please do share your feedback with us.
We're happy to announce the release of Merlin 4.13. This release comes with a number of bug fixes to the Merlin binary.
It also introduces a new -cache-lifespan
flag that can be used to set cache invalidation periods. This flag allows for fine-tuning of cache invalidation periods, enabling users to customize Merlin's internal configurations for optimal performance in various project contexts.
Additionally, this release includes several improvements in editor modes. For more details, we encourage you to delve into the full changelog.
-cache-lifespan
flag, that sets cache invalidation period. (#1698,
#1705)About six months ago, opam-repo-ci
(opam.ci.ocaml.org) suffered from a lack of system memory (issue 220) which caused it to be moved to the machine hosting ocaml-ci
(ocaml.ci.dev).
Subsequently, that machine suffered from BTRFS volume corruption (issue 51). Therefore, we moved both services to a larger new server. The data was efficiently migrated using BTRFS tools: btrfs send | btrfs receive
.
Since the move, we have seen issues with BTRFS metadata. Plus, we have suffered from a build-up of subvolumes, as reported by other users: Docker gradually exhausts disk space on BTRFS.
Unfortunately, both services went down on Friday evening (issue 85). Analysis showed over 500 BTRFS subvolumes, a shortage of metadata space, and insufficient space to perform a BTRFS rebalance.
Returning to the original configuration of splitting the ci.dev
and OCaml.org services, they have been moved onto new and separate hardware. The underlying filesystem is now a RAID1-backed ext4, formatted with -i 8192
in order to ensure the availability of sufficient inodes. Docker uses Overlayfs. RSYNC was used to copy the databases and logs from the old server. This change should add resilience and has doubled the capacity for storing history logs.
We're pleased to announce the release of Dune 3.12!
Note that due to a mistake during the release process, version 3.12.0
was not
published to opam and should not be used.
This version contains many fixes but we would like to highlight the following features:
dune ocaml doc
is a new command that will build the docs of your package,
and open them in a web browser directly.dune build @doc-new
. Note that this is still experimental.Introduce $ dune ocaml doc
to open and browse documentation. (#7262, fixes
#6831, @EmileTrotignon)
dune cache trim
now accepts binary byte units: KiB
, MiB
, etc. (#8618,
@Alizter)
Introduce the runtest_alias
field to the cram
stanza. This allows
removing default runtest
alias from tests. (@rgrinberg, #8887)
Display cache location in Dune log (#8974, @nojb)
Dune can now be built and installed on Haiku (#8795, fix #8551, @Alizter)
Mark installed directories in dune-package
files. This fixes (package)
dependencies against packages that contain such directories. (#8953, fixes
#8915, @emillon)
Introduce new experimental odoc rules (#8803, @jonjudlam)
dune-build-info: when version=""
is found in a META
file, we now return
None
as a version string (#9177, @emillon)
No longer force colors for OCaml 4.03 and 4.04 (#8778, @rgrinberg)
Dependencies in the copying sandbox are now writeable (#8920, @rgrinberg)
Rules that only use internal dune actions (write-file
, echo
, etc.) can
now be sandboxed. (#9041, fixes #8854, @rgrinberg)
Add test_
prefix to default test name in dune init project
(#9257,
fixes #9131, @9sako6)
Do not ignore libraries named bigarray
when they are defined in conjunction
with OCaml 5.0 (#8902, fixes #8901, @rgrinberg)
Correctly ignore bigarray
on recent versions of OCaml (#9076, @rgrinberg)
Absent packages shouldn't prevent all rules from being loaded (#8948, fixes #8630, @rgrinberg)
Correctly determine the stanza of menhir modules when (include_subdirs qualified)
is enabled (@rgrinberg, #8949, fixes #7610)
Re-run actions whenever (expand_aliases_in_sandbox)
changes (#8990,
@rgrinberg)
Do not re-run rules when their location changes (#9052, @rgrinberg)
[coq rules] Be more tolerant when coqc --print-version / --config don't work
properly, and fallback to a reasonable default. This fixes problems when
building Coq projects with (stdlib no)
and likely other cases. (#8966, fix
#8958, @Alizter, reported by Lasse Blaauwbroek)
Dune will now run at a lower framerate of 15 fps rather than 60 when
INSIDE_EMACS
. (#8812, @Alizter)
OBuilder workers for both Intel and Apple Silicon have been updated from macOS Ventura to macOS Sonoma 14.1.1.
From today, ocaml-ci and opam-repo-ci will test against Sonoma rather than Ventura.
Weâre pleased to announce the release of opam-publish
2.3.0.
This release, apart from a couple of light improvements, mainly consists of the following new option:
opam-publish
with the --no-confirmation
argument for use in automated pipeline. Use this option with extreme caution if you do use it.The full changelog is available below.
Enjoy, The opam team
--no-confirmation
argument for use in automated pipeline [#158 @AltGr - fix #132]Following the release of odoc
2.3.0, we're releasing a patch release with odoc
2.3.1 that fixes support for OCaml 5.1.
After giving space for feedback and objections by the community,
we have deprecated ocaml-migrate-parsetree
(aka OMP). It is superseded by Ppxlib.
There are four major differences between OMP and Ppxlib, which all go hand in hand.
The first major difference is in the library and therefore impacts how to write PPXs. With OMP, each PPX author had to choose a parsetree version to define their PPX against. There was no version agreement between different PPXs. With Ppxlib, each PPX author uses the same parsetree version.
The second major difference is about compatibility with new compiler syntax. While with OMP, each PPX was on its own parsetree version, Ppxlib keeps them all on the version of the latest stably released compiler. That makes using any PPX compatible with using the latest compiler syntax features!
The third major difference is in the philosophy of PPXs. With OMP, all PPX transformations were global transformations, i.e., transformations of the whole parsetree. Ppxlib has introduced the concept of "context-free" transformations, i.e., transformations that transform only one parsetree node. By restricting their scope of action, context-free PPXs are a lot more predictable and less dangerous! Also, Ppxlib merges all context-free PPXs into one parsetree pass, defining clear semantics of PPX composition.
The fourth major difference is in the driver, i.e., the binary that drives the application of all used PPXs in a project. The Ppxlib driver is significantly more performant than the OMP driver used to be. That's partly because it does a lot fewer parsetree migrations and partly thanks to merging all context-free PPXs into one parsetree pass.
As a consequence of the deprecation, OMP will be incompatible with any new compiler version. The first incompatible compiler version is OCaml 5.1.
Thanks a lot to everyone involved in OCaml's transition from OMP to Ppxlib, for example by porting their PPX!
Following the release of Dune 3.11.0 a few days ago, we've just released version 3.11.1 with a couple of bug fixes:
dune rpc status
command that was incorrectly showing that there were
no RPC servers running on Windows.(inline_tests)
.Fix dune rpc
commands on Windows (#8806, fixes #8799, @nojb)
Fix inline_tests
when the partition list is empty (#8849, fixes #8848, @hhugo)
We're happy to announce the release of Ppxlib
0.31.0. Shortly after OCaml 5.1.0 has been released,
this Ppxlib
release fixes a bug in the support of OCaml 5.1.0. Before that bug fix, the warnings about a generative/applicative mismatch between a functor creation and its application introduced by OCaml 5.1.0 were also triggered when that mismatch didn't exist.
Furthermore, the release contains a couple of bug fixes in the context of attributes.
We're also excited about two main enhancements. One allows authors of extension node rewriters to add a path argument to the extension node. That's excellent for hygiene since it allows the PPX to be explicit about modules rather than depending on its scope.
The other main enhancement allows an opt-in for compiler warnings about unused code generated by derivers (warnings w32 and w60). That opting in needs to happen on both sides of the deriver, the writer side and the user side. Opting in to those code warnings will help to clean up unused code, leading to performance improvements in compilation and editor support.
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)
We're pleased to announce the release of Dune 3.11!
Here are some highlights from this release.
The biggest highlight in this release is the introduction of the new Terminal User Interface (TUI) display mode.
You can now run dune build --display tui
to open a TUI. We recommend using it in conjunction with Dune watch
mode (dune build -w --display tui
).
From the TUI, you will be able to navigate messages from Dune build, scroll through them, or click to minimize them. Press ?
to show the help screen.
Another exciting feature in this release is the new (source_trees ..)
field added to the (install ..)
stanzas to add every files in a directory to the installation. For instance, to add your manual to the installation, you can use:
(install
(section doc)
(source_trees manual))
Let us know what you think about these features, and don't hesistate to open issues on Dune's bug tracker if you encounter any issue.
enabled_if
now supports arch_sixtyfour
variable (#8023, fixes #7997,
@Alizter)
Experimental: Added a $ dune monitor
command that can connect to a running
dune build
in watch mode and display the errors and progress. (#8152,
@Alizter)
The progress
RPC procedure now has an extra field for the In_progress
constructor for the number of failed jobs. (#8212, @Alizter)
Add a --preview
flag to dune fmt
which causes it to print out the changes
it would make without applying them (#8289, @gridbugs)
Introduce (source_trees ..)
to the install stanza to allow installing
entire source trees. (#8349, @rgrinberg)
Add --stop-on-first-error
option to dune build
which will terminate the
build when the first error is encountered. (#8400, @pmwhite and @Alizter)
Dune now displays the number of errors when waiting for changes in watch mode. (#8408, fixes #6889, @Alizter)
Add with_prefix
keyword for changing the prefix of the destination of
installed files matched by globs. (#8416, @gridbugs)
Added experimental --display tui
option for Dune that opens an interactive
Terminal User Interface (TUI) when Dune is running. Press '?' to open up a
help screen when running for more information. (#8429, @Alizter and
@rgrinberg)
Add a warnings
field to dune-project
files as a unified mechanism to
enable or disable dune warnings (@rgrinberg, 8448)
dune exec
: support syntax like %{bin:program}
. This can appear anywhere
in the command line, so things like dune exec time %{bin:program}
now work.
(#6035, #8474, fixes #2691, @emillon, @Leonidas-from-XIV)
Add a new alias @doc-json
to build odoc documentation in JSON format. This
output can be consumed by external tools. (#8178, @emillon)
Use posix_spawn
instead of fork
on MacOS. This gives us a performance
boost and allows us to re-enable thread. (#8090, @rgrinberg)
Modules that were declared in (modules_without_implementation)
,
(private_modules)
or (virtual_modules)
but not declared in (modules)
will raise an error. (#7674, @Alizter)
No longer emit linkopts(javascript) in META files (#8168, @hhugo)
RPC message styles are now serialised meaning that RPC diagnostics keep their ANSI styling. (#8516, fixes #6921, @Alizter)
Truncate output from actions that produce too much output (@tov, #8351)
Allow libraries to shadow OCaml built-in libraries. Previously, built-in libraries would always take precedence. (@rgrinberg, #8558)
dune utop
no longer links utop
in "custom" mode, which should make this
command considerably faster. (#8631, fixes #6894, @nojb)
Ensure that package names in dune-project
are valid opam package names.
(#8331, @emillon)
init: check that module names are valid (#8644, fixes #8252, @emillon)
dune init: parse --public
as a public name (#8603, fixes #7108, @emillon)
Stop signing source files with substitutions. Sign only binaries instead (#8361, fixes #8360, @anmonteiro)
Make copy sandbox support directory targets. (#8705, fixes #7724, @emillon)
Deprecate install destination paths beginning with ".." to prevent packages escaping their designated installation directories. (#8350, @gridbugs)
Remove warning against .dune
files generated by pre Dune 2.0 (#8611,
@rgrinberg)
Remove versions 0.1 and 0.2 of the experimental ctypes extension. (#8293, @emillon)
We are thrilled to announce the release of odoc 2.3.0! đ This release is the result of almost a year of diligent work from the odoc team since the last major release of odoc 2.2.0, it comes packed with significant new features and improvements!
Here are a couple of the new features introduced in Odoc 2.3.0 that we'd like to highlight.
Table support is the last addition to the odoc language, and comes with two syntax flavours: a light one, and a heavy one. The light markup is similar to markdown's markup for table, producing tables that are readable in the source file as well.
However, this markup has some limitation, since it only allows inline content in cells. It can also be difficult to read and mantain for big tables, without a proper editor support. For this reason, Odoc also provides a "heavy" markup, closer to the html one, with fewer limitations!
Here is a table in heavy, light, and rendered form:
{t
Table | support
------|--------
is | cool!
}
{table
{tr {th Table} {th support}}
{tr {td is} {td cool!}}
}
Table | support ------|-------- is | cool!
Source code rendering is an extremely exciting new feature. Not only odoc is now able to generate a rendering of the source files (and source hierarchy) of a project, but it is also able to create direct links from the documentation to the implementation!
This puts the documentation browsing to a new level, by helping to quickly answer any implementation-related question!
The source code rendering is also tailored to OCaml, for instance with links from variables to their definition, something missing from traditional html-based source viewing such as github!
Using this features in odocâs driver will require some work, but you can already have a preview of the feature by going to the odoc API website, which was built with the feature enabled. For instance, the Odoc_html 19 module is now populated with many Source links, jumping right into the implementation file 5! Directory pages to browser the implementation are also included 8 :smiley:
Some background on our roadmap and what comes next.
The lack of access to comprehensive documentation for OCaml libraries is one of the biggest pain points reported by the OCaml community, as highlighted in the 2022 OCaml survey (c.f. Q50).
This motivated the odoc and OCaml.org teams to jointly work on a centralised package documentation, that went live in April 2022, as part of the new version of OCaml.org.
With documentation for OCaml libraries readily available on OCaml.org, we now turn our focus on making sure that library authors have the tooling they need to create high-quality documentation.
Our roadmap highlights some features we believe will make the generated documentation significantly better for readers, and documentation-writing much more pleasant and rewarding.
This release is a significant milestone in implementing the features on our roadmap and is the precursor to a series of upcoming releases. Odoc 2.4.0 will follow shortly and will bring support for search. Stay tuned and follow our progress through the OCaml Platform newsletter!
While we are dedicated to developing the best tooling to generate and serve documentation on OCaml.org, creating a well-documented library ecosystem can only be a collective effort. Package authors: we're working hard to give you great tools, but we'll need all your help to create an ecosystem of well-documented libraries for OCaml!
If you find that writing documentation for your library isn't as straightforward as you would like, please do share your feedback with us.
--hidden
not always taken into account (@panglesd, #940)We are happy to announce the release of MDX 2.3.1! This is the first release of MDX to be compatible with OCaml 5.1.
We've also vendored the odoc-parser
library, eliminating the need to have it
as a dependency. MDX can now be installed independently of the odoc
version
you're using.
Add os_type
label to enable/disable based on Sys.os_type
(#433,
@polytypic)
Make MDX compatible with OCaml 5.1 (#435, @polytypic and @kit-ty-kate)
odoc-parser
library, removing the need to have it
as a dependency. (#430, @jonludlam)Merlin 4.12 is a small patch release fixing regressions introduced in previous versions.
We are pleased to announce the release of Merlin 4.11 for OCaml 4.14.1, 5.0, and 5.1.
This release brings official support for OCaml 5.1 and introduces some changes to Emacs' default bindings proposed by the community:
tuareg-eval-region
) and bind
C-c C-v instead to merlin-error-check
;merlin-document
and bind C-c M-d and
C-c | instead to merlin-destruct
;merlin-type-expr
.Thanks to everyone involved!
tuareg-eval-region
) and bind C-c C-v instead to merlin-error-check
;
rebind C-c C-d to merlin-document
and bind C-c M-d and C-c | instead to merlin-destruct
;
bind C-u C-c C-t to merlin-type-expr
.defadvice
macro (ocaml/merlin#1675)Previously the infrastructure team had made FreeBSD available for opam-repo-ci
.
Now we can announce that the same support has been added to ocaml-ci
, giving coverage for both OCaml
4.14 and the new OCaml 5.1 release. opam-repo-ci
has also been upgraded to support OCaml 5.1. We aim to support both 4.14 as
the Long Term Support release and the latest 5.* release.
Additionally an opam-health-check
instance has been setup to provide
continuous checking of opam repository packages against FreeBSD 13.2 x86_64 for both the 4.14 and 5.1 releases of OCaml.
This will allow the community to check whether packages work on FreeBSD and provide fixes to opam-repository
that will
then get tested on FreeBSD. Closing the loop and giving the community the tools to support OCaml on FreeBSD effectively.
We hope the community finds the FreeBSD support useful.
We are pleased to announce the release of OCamlFormat 0.26.1!
This is the first OCamlFormat release to be compatible with OCaml 5.1.
We highlight notable formatting improvements below:
type t =
| Foo
| (* Redirect (None, lib) looks up lib in the same database *)
- Redirect of
- db option * (Loc.t * Lib_name.t)
+ Redirect of db option * (Loc.t * Lib_name.t)
+
object
keywordmodule type S = sig
- class tttttttttttt : aaaaaaaaaaaaaaaaaa:int -> bbbbbbbbbbbbbbbbbbbbb:float ->
+ class tttttttttttt :
+ aaaaaaaaaaaaaaaaaa:int ->
+ bbbbbbbbbbbbbbbbbbbbb:float ->
cccccccccccccccccccc
end
class type ct =
let open M in
- object
+object
val x : t
end
We've also fixed a few bugs. Attributes that were previously skipped are not preserved, and we fixed a crash that occured in the presence of nested modules.
Have a look at the full changelog to see the list of improvements, and donât hesitate to share your feedback on this release on OCaml Discuss.
object
keyword in class types (#2425, @Julow)with module
(#2419, @Julow)We have the pleasure of celebrating the anniversary of Olympe de Gouges' "Declaration of the Rights of Woman and of the Female Citizen" by announcing the release of OCaml version 5.1.0.
Some of the highlights in OCaml 5.1.0 are:
List.append
and List.map
OCaml 5.1.0 is still a relatively experimental release compared to the OCaml 4.14 branch. In particular:
statmemprof
is a work in progress.We are planning to address those regressions, hopefully in time for the OCaml 5.2.0 release for some of them. Meanwhile, the OCaml 4.14 branch will be maintained, and the next release on the OCaml 4.14 branch, OCaml 4.14.2, should follow this release in the upcoming months.
Please report any unexpected behaviours on the OCaml issue tracker and post any questions or comments you might have on our discussion forums.
The full list of changes can be found in the changelog below.
The base compiler can be installed as an opam switch with the following commands:
opam update
opam switch create 5.1.0
The source code for the release candidate is also directly available on:
If you want to tweak the configuration of the compiler, you can switch to the option variant with:
opam update
opam switch create <switch_name> ocaml-variants.5.1.0+options <option_list>
where <option_list>
is a comma-separated list of ocaml-option-*
packages. For instance, for a flambda
and no-flat-float-array
switch:
opam switch create 5.1.0+flambda+nffa ocaml-variants.5.0.0+options ocaml-option-flambda ocaml-option-no-flat-float-array
#11418, #11708: RISC-V multicore support. (Nicolås Ojeda Bär, review by KC Sivaramakrishnan)
#11712, #12258, #12261: s390x / IBM Z multicore support: OCaml & C stack separation; dynamic stack size checks; fiber and effects support. (Aleksei Nikiforov, with help from Vincent Laviron and Xavier Leroy, additional suggestions by Luc Maranget, review by the same and KC Sivaramakrishnan)
#11642: Restore Cygwin port. Add GC messages for address space reservations when OCAMLRUNPARAM option v includes 0x1000. (David Allsopp, review by Xavier Leroy, Guillaume Munch-Maccagnoni and Gabriel Scherer)
#12006, #12064: Add Marshal.Compression
flag to Marshal.to_*
functions.
When this flag is explicitly set, marshaled data is compressed using ZSTD.
On some practical examples, the marshalled output became three times smaller
at no noticeable cost on the marshalling time.
(Xavier Leroy, review by Edwin TĂśrĂśk and Gabriel Scherer, fix by Damien
Doligez)
#10464: Add List.is_empty. (Craig Ferguson, review by David Allsopp)
#11848: Add List.find_mapi
,
List.find_index: ('a -> bool) -> 'a list -> int option
,
Seq.find_mapi
, Seq.find_index
, Array.find_mapi
, Array.find_index
,
Float.Array.find_opt
, Float.Array.find_index
, Float.Array.find_map
,
Float.Array.find_mapi
.
(T. Kinsart, review by Daniel Bßnzli and Nicolås Ojeda Bär)
#11410: Add Set.to_list, Map.to_list, Map.of_list,
Map.add_to_list: key -> 'a -> 'a list t -> 'a list t
.
(Daniel Bßnzli, review by Nicolås Ojeda Bär and Gabriel Scherer)
#11836, #11837: Add Array.map_inplace
, Array.mapi_inplace
,
Float.Array.mapi_inplace
and Float.Array.mapi_inplace
.
(LÊo Andrès, review by Gabriel Scherer, KC Sivaramakrishnan and
Nicolås Ojeda Bär)
#10967: Add Filename.temp_dir. (David Turner, review by Anil Madhavapeddy, Valentin Gatien-Baron, Nicolås Ojeda Bär, Gabriel Scherer, and Daniel Bßnzli)
#11246: Add "hash" and "seeded_hash" functions to Bool, Int, Char, Float, Int32, Int64, and Nativeint. (Nicolås Ojeda Bär, review by Xavier Leroy and Gabriel Scherer)
#11488: Add Mutex.protect: Mutex.t -> (unit -> 'a) -> 'a
for resource-safe critical sections protected by a mutex.
(Simon Cruanes, review by Gabriel Scherer, Xavier Leroy,
Guillaume Munch-Maccagnoni)
#11581: Add type equality witness
type (_, _) eq = Equal: ('a, 'a) eq
in a new module Stdlib.Type.
(Nicolås Ojeda Bär, review by Daniel Bßnzli, Jacques Garrigue, Florian
Angeletti, Alain Frisch, Gabriel Scherer, Jeremy Yallop and Xavier Leroy)
#11843: Add In_channel.input_lines
and In_channel.fold_lines
.
(Xavier Leroy, review by Nicolås Ojeda Bär and Wiktor Kuchta).
#11856, #11859: Using TRMC, the following Stdlib
functions are now
tail-recursive:
Stdlib.(@), List.append,
List.concat_map.
(Jeremy Yallop, review by Daniel Bßnzli, Anil Madhavapeddy, Nicolås Ojeda Bär,
Gabriel Scherer, and Bannerets)
#11362, #11402: Using TRMC, the following Stdlib
functions are now
tail-recursive:
List.map, List.mapi, List.map2,
List.filter, List.filteri, List.filter_map,
List.init,
List.of_seq.
(Nicolås Ojeda Bär, review by Xavier Leroy and Gabriel Scherer)
#11878, #11965: Prevent seek_in from marking buffer data as valid after closing the channel. This could lead to inputting uninitialized bytes. (Samuel Hym, review by Xavier Leroy and Olivier Nicole)
#11128: Add In_channel.isatty, Out_channel.isatty. (Nicolås Ojeda Bär, review by Gabriel Scherer and Florian Angeletti)
#10859: Add Format.pp_print_iter
and Format.pp_print_array
.
(LÊo Andrès and Daniel Bßnzli, review by David Allsopp and Hugo Heuzard)
#10789: Add Stack.drop
(LÊo Andrès, review by Gabriel Scherer)
#11026, #11667, #11858: Rename the type of the accumulator of fold functions to 'acc: fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a list -> 'acc fold_right : ('a -> 'acc -> 'acc) -> 'a list -> 'acc -> 'acc fold_left_map : ('acc -> 'a -> 'acc * 'b) -> 'acc -> 'a list -> 'acc * 'b list ... (Valentin Gatien-Baron and Francois Berenger, review by Gabriel Scherer and Nicolås Ojeda Bär)
#11354: Hashtbl.find_all is now tail-recursive. (FermĂn Reig, review by Gabriel Scherer)
#11500: Make Hashtbl.mem non-allocating. (Simmo Saan, review by Nicolås Ojeda Bär)
#11412: Add Sys.is_regular_file (Xavier Leroy, review by Anil Madhavapeddy, Nicolås Ojeda Bär, David Allsopp)
#11322, #11329: serialization functions Random.State.{of,to}_binary_string between Random.State.t and string (Gabriel Scherer, report by Yotam Barnoy, review by Daniel BĂźnzli, Damien Doligez, Hugo Heuzard and Xavier Leroy)
#11830: Add Type.Id with
val provably_equal : 'a Type.Id.t -> 'b Type.Id.t -> ('a, 'b) Type.eq option
(Daniel BĂźnzli, review by Jeremy Yallop, Gabriel Scherer, Wiktor Kuchta,
Nicolås Ojeda Bär)
#12184, #12320: Sys.rename Windows fixes on directory corner cases. (Jan Midtgaard, review by Anil Madhavapeddy)
printf
) where silently ignored and now fail.
Those new failures occur at compile-time, except if you use advanced
format features like %(...%)
that parse format strings dynamically.
Pass -no-strict-formats to revert to the previous lenient behavior.
(Nicolås Ojeda Bär, review by David Allsopp)Specific efforts have been made during this release to reduce the filesystem size of installed artifacts of the compiler distribution. The installation size of 5.1 is 272 MiB compared to 521 MiB for 5.0. Some of those changes will benefit all OCaml packages.
ocaml/RFCs#23, #12006: use compressed marshaled format from #12006 for .cmi, .cmt, .cmti files, and for debug info in .cmo and .cma files, resulting in major reduction in size. (Xavier Leroy, review by Edwin TĂśrĂśk and Gabriel Scherer, RFC by Simon Cruanes)
#11981: Reduce size of OCaml installations by removing debugging information from installed bytecode executables. It is no longer possible to run ocamldebug over these installed bytecode executables, nor to get exception backtraces for them. (Xavier Leroy, review by David Allsopp, report by Fabrice Le Fessant)
ocamlmklib
, ocamlcmt
,
ocamlprof
, ocamlcp
, ocamloptp
, and ocamlmktop
tools, but no
native-code executables. A tool like ocamlmklib
for example is now
installed directly to $BINDIR/ocamlmklib
; ocamlmklib.byte
and
ocamlmklib.opt
are no longer installed to $BINDIR
.
(Xavier Leroy, review by Gabriel Scherer)#11589, #11903: Modify the GC pacing code to make sure the GC keeps up with allocations in the presence of idle domains. (Damien Doligez and Stephen Dolan, report by Florian Angeletti, review by KC Sivaramakrishnan and Sadiq Jaffer)
#11743: Speed up weak array operations (KC Sivaramakrishnan, review by François Bobot and Sadiq Jaffer)
#12131: Simplify implementation of weak hash sets, fixing a performance regression. (Nick Barnes, review by François Bobot, Alain Frisch and Damien Doligez).
#11474, #11998, #12065: Add support for user-defined events in the runtime event tracing system. (Lucas Pluvinage, review by Sadiq Jaffer, Guillaume Munch-Maccagnoni, Enguerrand Decorne, Gabriel Scherer and Anil Madhavapeddy)
#11827, #12249: Restore prefetching for GC marking (Fabrice Buoro and Stephen Dolan, review by Gabriel Scherer and Sadiq Jaffer)
#11144: Restore frame-pointers support for amd64 (Fabrice Buoro, review by Frederic Bour and KC Sivaramakrishnan)
#11935: Load frametables of dynlink'd modules in batch (Stephen Dolan, review by David Allsopp and Guillaume Munch-Maccagnoni)
#11284, #12525: Use compression of entries scheme when pruning mark stack. Can decrease memory usage for some workloads, otherwise should be unobservable. (Tom Kelly, review by Sabine Schmaltz, Sadiq Jaffer and Damien Doligez)
caml_remove_global_root
or caml_remove_generational_global_root
from within the C finalizer of a custom block, or within the
finalization function passed to caml_alloc_final
. As a workaround,
such a finalization operation can be registered with Gc.finalize
instead, which guarantees to run the finalizer at a safe point.
(Report by Timothy Bourke, discussion by Yotam Barnoy, Timothy
Bourke, Sadiq Jaffer, Xavier Leroy, Guillaume Munch-Maccagnoni, and
Gabriel Scherer)#12130: Fix multicore crashes with weak hash sets. Fixes #11934. (Nick Barnes, review by François Bobot)
#12099: Add ocamlrund option, -events, to produce a trace of debug events during bytecode interpretation. Fixes #12098. (Richard L Ford, review by Gabriel Scherer)
#12001: Fix book keeping for last finalisers during the minor cycle (KC Sivaramakrishnan and Enguerrand Decorne, report by Guillaume Bury and Vincent Laviron, review by Sadiq Jaffer and KC Sivaramakrishnan)
#11919: New runtime events counters for major heap stats and minor heap resizing. (Sadiq Jaffer, review by Gabriel Scherer and David Allsopp)
#11287, #11872, #11955: Clean up reserved header bits (once used for Spacetime profiling). (Nick Barnes, review by Gabriel Scherer and Damien Doligez)
#11750: Decouple major slice from minor GC. (KC Sivaramakrishnan, review by Sadiq Jaffer, Guillaume Munch-Maccagnoni and Damien Doligez)
#11796: protect lazy computation of code fragment digest by a mutex. This makes the thread sanitizer happier, and avoids duplicating the hashing work. (Gabriel Scherer, review by Xavier Leroy, report by Olivier Nicole)
#11137: new Unsafe_store_tag(val, new_tag)
macro to stop using
Tag_val(val)
as lvalue.
(Gabriel Scherer, review by Xavier Leroy, Guillaume Munch-Maccagnoni
and Nicolås Ojeda Bär)
#11880: Restore the correct sigmask in systhreads. (Christiano Haesbaert, review by Guillaume Munch-Maccagnoni and SĂŠbastien Hinderer)
#11881: Fix thread-unsafety of registration of operations for "custom" values. (Guillaume Munch-Maccagnoni, review by Gabriel Scherer and KC Sivaramakrishnan)
#11980: fix quadratic behavior in natdynlink by using a STW section for frame-descriptor updates. (Gabriel Scherer, review by Sadiq Jaffer, report by AndrĂŠ Maroneze for Frama-C and Guillaume Melquiond for Coq)
#12121: unrooted implementations of caml_callback*_exn (Gabriel Scherer, review by KC Sivaramakrishnan and Xavier Leroy)
#3921, #12039, #12128: poll for signals in long-running polymorphic comparisons. (B. Szilvasy, Gabriel Scherer and Xavier Leroy, review by Stefan Muenzel, Guillaume Munch-Maccagnoni and Damien Doligez)
#12231: Support MinGW-w64 11.0 winpthreads library, where the macro to set up to get flexdll working changed (David Allsopp and Samuel Hym, light review by Xavier Leroy)
(breaking change) #11694: Add short syntax for generative functor types () -> ...
(Jeremy Yallop, review by Gabriel Scherer, Nicolås Ojeda Bär,
Jacques Garrigue)
(breaking change) #11457: Remove old polymorphic variant syntax.
With type t = [ `A | `B ]
, one could use the syntax #t
in types,
where it means the same thing as [< t]
, and in patterns, where it means
(`A | `B)
. The use of #t
in types for polymorphic variants
was deprecated since 2001, and is now removed. The syntax remains available
in patterns, or for objects -- when t
is a class type.
(Stefan Muenzel, review by Gabriel Scherer and Jacques Garrigue)
(breaking change) #11984: Add dedicated syntax for generative functor application.
Previously, OCaml did not distinguish between F ()
and
F (struct end)
, even though the latter looks applicative. Instead,
the decision between generative and applicative functor application
was made based on the type of F
. With this patch, we now distinguish
these two application forms; writing F (struct end)
for a generative
functor leads to new warning 73.
(Frederic Bour and Richard Eisenberg, review by Florian Angeletti)
type t = |
) immediate.
(Antal Spector-Zabusky, review by Gabriel Scherer)(breaking change) #6941, #11187, #12483: prohibit using classes through recursive modules inheriting or including a class belonging to a mutually-recursive module would previous behave incorrectly, and now results in a clean error. (Leo White, review by Gabriel Scherer and Florian Angeletti)
(breaking change) #12189, #12211: anonymous row variables in explicitly polymorphic type
annotation, e.g. 'a. [< X of 'a ] -> 'a
, are now implicitly
universally quantified (in other words, the example above is now read
as 'a 'r. ([< X of 'a ] as 'r) -> 'a
).
(Florian Angeletti and Gabriel Scherer, review by Jacques Garrigue)
#11967: Remove traces of Obj.truncate, which allows some mutable loads to become immutable. (Nick Barnes, review by Vincent Laviron and KC Sivaramakrishnan)
#9945, #10883: Turn boolean-result float comparisons into primitive operations Uses the architecture's elementary operations for float comparisons, when available, rather than branching and then setting the return value. (Stefan Muenzel, review by Stephen Dolan, Alain Frisch and Vincent Laviron)
#8998, #11321, #11430: change mangling of OCaml long identifiers
from camlModule__name_NNN
to camlModule.name_NNN
. The previous
mangling schema, using __
, was ambiguous.
(Xavier Leroy, report by sliquister and Michael Bacarella,
review by Gabriel Scherer)
#10834: The -safer-matching option disables type-based optimizations of pattern-matching compilation. This allows to produce a match failure if a pattern-matching was wrongly assumed to be exhaustive. Since the exhaustiveness check for GADTs has had bugs in the past, it may be useful if you need extra security with GADTs. (Jacques Garrigue, review by Gabriel Scherer)
#11102: Speed up register allocation by permanently spilling registers (Stephen Dolan, review by Xavier Leroy)
#11383: Restrict the local function optimisation to forbid moving code inside a sub-function (Vincent Laviron, review by Gabriel Scherer)
#11686: Better spilling heuristic for the Linear Scan allocator for more efficient stack usage. (Nicolås Ojeda Bär, Gabriel Scherer, Alain Frisch, review by Gabriel Scherer, Alain Frisch and NathanaÍlle Courant)
#11904: Remove arm, i386 native-code backends that were already disabled at configuration time. (Nicolås Ojeda Bär, review by Stephen Dolan, Anil Madhavapeddy, and Xavier Leroy)
#11134: Optimise 'include struct' in more cases (Stephen Dolan, review by Leo White and Vincent Laviron)
#11374: Remove pointer cast to a type with stricter alignment requirements in Windows implementation of Unix.gettimeofday. Windows implementations of caml_unix_map_file, caml_unix_lseek and caml_unix_lseek_64 now release the runtime lock. Windows implementation of caml_unix_lockf modernised and simplified. Where possible, 64 bit integers are used instead of LARGE_INTEGER structs. (David Allsopp, review by Jonah Beckford and Xavier Leroy)
#11475: Make Unix terminal interface bindings domain-safe (Olivier Nicole and Xavier Leroy, review by Xavier Leroy)
#11775: Unix.write on a non-blocking socket under Windows will return normally if the write blocks after some data has already been written (as otherwise there is no way of knowing how much data has been written before blocking). The same behaviour was already present under Unix. (Nicolås Ojeda Bär, review by David Allsopp)
#12067: Document Windows specific meanings of Unix.process_status
type
(Samuel Hym, review by David Allsopp)
#12072: Document and test that Sys.rename works over directories too (Jan Midtgaard, review by Anil Madhavapeddy and Xavier Leroy)
#11889, #11978: ocamldoc: handle injectivity annotations and wildcards in type parameters. (Florian Angeletti, report by Wiktor Kuchta, review by Jules Aguillon)
#11787: Fix GDB scripts to work with OCaml 5's heap layout. (Nick Barnes)
#11772: fix ocamlyacc's handling of raw string literals (Demi Marie Obenour)
#9290: Add a directive to switch off debugging in toplevel. This allows to see optimized bytecode with -dlambda. (Jacques Garrigue, review by Gabriel Scherer)
#11166: ocamllex: the union of two character sets "cset1 | cset2" can now be used in any context where a character set is expected. (Nicolås Ojeda Bär, Martin Jambon, review by SÊbastien Hinderer)
#11718: ocamlyacc: OCaml-style comments are now supported, in addition to the C-style comments already supported. The syntax is the same as that used in OCaml code. (Demi Marie Obenour, review by Damien Doligez)
#11728: ocamlyacc: generate line directives for %type declarations (Demi Marie Obenour, review by Damien Doligez)
#11773: ocamlyacc: Do not allow quoted literals (such as 'a' or "bc") in a token name or %type declaration. Previously such literals were accepted by ocamlyacc, but produced malformed OCaml that was rejected by the compiler. (Demi Marie Obenour, review by Gabriel Scherer)
#11774: ocamlyacc: fail if there is an I/O error (Demi Marie Obenour, review by Gabriel Scherer)
#11973: Add support for postfixed mingw host triplets (Romain Beauxis)
#12165: ocamldoc, use standard doctype to avoid quirk mode. (Florian Angeletti, review by Gabriel Scherer)
#11476: Add examples in documentation of Hashtbl, Queue, Atomic, Format (Simon Cruanes, review by Yotam Barnoy, Gabriel Scherer, Daniel Bßnzli, Ulugbek Abdullaev, and Nicolås Ojeda Bär)
#11883, #11884: Update documentation for In_channel and Out_channel with examples and sections to group related functions. (Kiran Gopinathan, review by Daniel BĂźnzli and Xavier Leroy)
#12095, #12097: Put the sample code of the user's manual and reference documentation of the standard library under the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication license.
#11892: Document the semantic differences of Unix.exec* between Unix and Windows. (Boris Yakobowski, review by Daniel Bßnzli, Gabriel Scherer and Nicolås Ojeda Bär)
#9430, #11291: Document the general desugaring rules for binding operators. (Gabriel Scherer, review by Nicolås Ojeda Bär)
#11481: Fix the type of Unix.umask to Unix.file_perm -> Unix.file_perm (Favonia, review by SĂŠbastien Hinderer)
#11514: Document ocamltest builtin variables and actions (Olivier Nicole, review by SĂŠbastien Hinderer)
#11676: Fix missing since annotation in the Sys
and Format
modules
(Github user Bukolab99, review by Florian Angeletti)
#12028: Update format documentation to make it clearer that
pp_print_newline
flushes its newline
(Florian Angeletti, review by Gabriel Scherer)
#12201: in the tutorial on modules, replace priority queue example by a simpler example based on FIFO queues. (Xavier Leroy, review by Anil Madhavapeddy and Nicolås Ojeda Bär).
#12352: Fix a typo in the documentation of Arg.write_arg (Christophe Raffalli, review by Florian Angeletti)
#7179, #11894: correct the description of CAMLreturn and CAMLreturn0 in the Interfacing C page and memory.h file. (Dong An, review by Guillaume Munch-Maccagnoni and Olivier Nicole )
#10647: Show hints for the "undefined global" error in the toplevel (Wiktor Kuchta, review by Gabriel Scherer)
#12116: Don't suggest to insert a semicolon when the type is not unit (Jules Aguillon, review by Florian Angeletti)
#11679: Improve the error message about too many arguments to a function (Jules Aguillon, review by Gabriel Scherer and Florian Angeletti)
#10009: Improve the error reported by mismatched struct/sig and =/: in module and module type bindings. (Jules Aguillon, review by Gabriel Scherer)
#11530: Include kinds in kind mismatch error message. "Error: This variant or record definition does not match that of type M.t The original is abstract, but this is a record". (Leonhard Markert, review by Gabriel Scherer and Florian Angeletti)
#11646: Add colors to error message hints. (Christiana Anthony, review by Florian Angeletti)
#11235, #11864: usage warnings for constructors and fields can now be disabled on field-by-field or constructor-by-constructor basis (Florian Angeletti, review by Gabriel Scherer)
#11888: Improve the error message when type variables cannot be deduced from the type parameters: Before: "Error: In this definition, a type variable cannot be deduced from the type parameters." After: "Error: In the GADT constructor T : 'a -> 'a s t the type variable 'a cannot be deduced from the type parameters." (Stefan Muenzel, review by Florian Angeletti and Gabriel Scherer)
#10818: Preserve integer literal formatting in type hint. (Leonhard Markert, review by Gabriel Scherer and Florian Angeletti)
#11338: Turn some partial application warnings into hints. (Leo White, review by Stephen Dolan)
#10931: Improve warning 14 (illegal backslash) with a better explanation of the causes and how to fix it. (David Allsopp, Florian Angeletti, Lucas De Angelis, Gabriel Scherer, review by Nicolås Ojeda Bär, Florian Angeletti, David Allsopp and Gabriel Scherer)
#10911: Improve the location reported by parenthesized assert expressions (Fabian Hemmer, review by Gabriel Scherer)
#1391, #7645, #3922: Add an early error when compiling different modules with mismatching -for-pack (Pierre Chambart and Vincent Laviron, review by Mark Shinwell)
#11297: Report "unclosed" error when "done" is missing in a "do .. done" construct. (Nicolås Ojeda Bär, review by Gabriel Scherer)
#11635, #5461, #10564: turn warning 31 (Module_linked_twice) into a hard error for ocamlc â this was already an error with ocamlopt. (Hugo Heuzard, review by Valentin Gatien-Baron and Gabriel Scherer)
#11653: Add the -no-absname option to ocamlc, ocamlopt and ocamldep. (Abiola Abdulsalam, review by SĂŠbastien Hinderer and Florian Angeletti)
#11696: Add the -no-g option to ocamlc and ocamlopt. (Abiola Abdulsalam, review by SÊbastien Hinderer, Nicolås Ojeda Bär and Florian Angeletti)
#11722: clearer error messages on non-well-founded type definitions (Gabriel Scherer, review by Jacques Garrigue)
#11819: make the native_compiler
and native_dynlink
configuration
variables available through ocamlc -config.
(SĂŠbastien Hinderer, review by Gabriel Scherer and David Allsopp)
#8602, #11863: Add -stop-after lambda flag option (Douglas Smith and Dmitrii Kosarev, review by Gabriel Scherer)
#11910: Simplify naming convention for shadowed or ephemeral identifiers in
error messages (eg: Illegal shadowing of included type t/2 by t
)
(Florian Angeletti, review by Jules Aguillon)
#12024: insert a blank line between separate compiler messages (Gabriel Scherer, review by Florian Angeletti, report by David Wong)
#12088, #9265, #11949: ocamldebug: fix confusing repeating behavior on blank lines within source scripts (Damien Doligez, review by Gabriel Scherer, report by GaĂŤtan Gilbert)
#12107: use aliases to mark weak row variables: _[< ... ]
, < _..>
, _#ct
are now rendered as [< ...] as '_weak1
, < .. > as '_weak1
,
and #ct as '_weak1
.
(Florian Angeletti, suggestion by Stefan Muenzel, review by Gabriel Scherer)
#12051: Improve the error messages when type variables cannot be generalized (Stefan Muenzel, review by Florian Angeletti)
#11018, #11869: Clean up Types.Variance, adding a description of the lattice used, and defining explicitly composition. (Jacques Garrigue, review by Gabriel Scherer and Jeremy Yallop)
#11536: Introduce wrapper functions for level management ([Ctype.with_level], etc) and for type variable scoping ([Typetexp.with_local_type_variable_scope]). The older API ([Ctype.(begin_def,end_def)], [Typetexp.(narrow,widen)], etc.) is now removed. (Jacques Garrigue and Takafumi Saikawa, review by Gabriel Scherer)
#11601, #11612, #11628, #11613, #11623, #12120 : Clean up some global state handling in emitcode, bytepackager, bytegen, bytesections, spill. (Hugo Heuzard, Stefan Muenzel, review by Vincent Laviron, Gabriel Scherer and NathanaĂŤlle Courant)
#12119, #12188, #12191: mirror type constraints on value binding in the
parsetree:
the constraint typ
in let pat : typ = exp
is now directly stored
in the value binding node in the parsetree.
(Florian Angeletti, review by Richard Eisenberg)
#11912: Refactoring handling of scoped type variables (Richard Eisenberg, review by Gabriel Scherer and Florian Angeletti)
#11691, #11706: use asm instead of asm for strict ISO C conformance (Xavier Leroy, report by Gregg Reynolds , review by Sadiq Jaffer)
#11764: add prototypes to old-style C function definitions and declarations (Antonin DĂŠcimo, review by Xavier Leroy)
#11693: Remove use of C99 Variable Length Arrays (VLAs) in the runtime. (David Allsopp, review by Xavier Leroy, Guillaume Munch-Maccagnoni, Stefan Muenzel and Gabriel Scherer)
#12138: Generalise interface for BUILD_PATH_PREFIX_MAP mapping. Absolute paths are now rewritten too. (Richard L Ford, suggestions and review by Gabriel Scherer)
#10512: explain the compilation strategy for switches on constructors (Gabriel Scherer, review by Vincent Laviron)
#11990: Improve comments and macros around frame descriptors. (Nick Barnes, review by Gabriel Scherer)
#11847, #11849, #11851, #11898: small refactorings in the type checker (Gabriel Scherer, review by Nicolås Ojeda Bär)
#11027: Separate typing counter-examples from type_pat into retype_pat; type_pat is no longer in CPS. (Jacques Garrigue and Takafumi Saikawa, review by Gabriel Scherer)
#11286, #11515: disambiguate identifiers by using how recently they have been bound in the current environment (Florian Angeletti, review by Gabriel Scherer)
#11364: Allow make -C testsuite promote
to take TEST
and LIST
variables
(Antal Spector-Zabusky, review by Gabriel Scherer and David Allsopp)
#11446: document switch compilation (lambda/switch.ml) (Gabriel Scherer, review by Luc Maranget and Vincent Laviron)
#11568: Encode inline record types in Path.t (Leo White and Hyunggyu Jang, review by Gabriel Scherer)
#11569: Remove hash type encoding (Hyunggyu Jang, review by Gabriel Scherer and Florian Angeletti)
#11627: use return values instead of globals for linear scan intervals (Stefan Muenzel, review by Nicolås Ojeda Bär)
#11634: Dll.open_dll now properly handles opening for execution while already opened for checking (Hugo Heuzard, review by Nicolås Ojeda Bär)
Topdirs
in the initial toplevel environment without loading topfind
.
Since the opam default .ocamlinit
file loads topfind
, it is expected
that only scripts run with ocaml -noinit
are affected.
For those scripts, accessing Topdirs
now requires the compiler-libs
directory to be added to the toplevel search path with
#directory "+compiler-libs";;
as was already the case for the other modules in the toplevel interface
library.
(SÊbastien Hinderer, review by Florian Angeletti, Nicolås Ojeda Bär and
Gabriel Scherer)#11615: remove global variables form asmcomp/linearize.ml (Stefan Muenzel, review by Nicolås Ojeda Bär
#10856: Add location, attribute(s) visitors to Tast_mapper/Tast_iterator (Yan Dong, review by Nicolås Ojeda Bär and Gabriel Scherer)
#11763, #11759, #11861: Enable stricter C compilation warnings, use strict prototypes on primitives. (Antonin DĂŠcimo, review by Xavier Leroy, David Allsopp and SĂŠbastien Hinderer)
#11933: Use the correct machtype when reading the code pointer from closures (NathanaĂŤlle Courant, review by Gabriel Scherer and Vincent Laviron)
#11972: refactor runtime/frame_descriptors.c in preparation for quadratic-time fix (Gabriel Scherer, review by Enguerrand Decorne)
#11997: translate structured constants into their Obj.t representation at compile time rather than link time. Changes the way dumpobj prints these constants because their representation becomes untyped. (SÊbastien Hinderer, review by Xavier Leroy, Nicolås Ojeda Bär and Hugo Heuzard)
#12011: remove Ctype.reified_var_counter (Takafumi Saikawa and Jacques Garrigue, review by Gabriel Scherer)
#12012: move calls to Typetexp.TyVarEnv.reset inside with_local_level etc. (Jacques Garrigue and Takafumi Saikawa, review by Gabriel Scherer)
#12034: a logarithmic algorithm to find the next free variable (Gabriel Scherer, review by Stefan Muenzel)
#12092: remove Lev_module_definition from lambda (Nick Roberts, review by Gabriel Scherer)
#12117: Remove arity-interrupting elaboration of module unpacks (Nick Roberts, review by Richard Eisenberg and Jacques Garrigue)
#12118: stop storing names of predefined exceptions in the cu_required_globals field of compilation unit descriptors. (SĂŠbastien Hinderer, review by Vincent Laviron)
#12125: Add Misc.print_see_manual and modify [@manual_ref] to accept lists for simpler printing of manual references (Stefan Muenzel, review by Florian Angeletti)
#12509: Use strict prototypes on primitives when generating a standalone
bytecode executable (ocamlc -custom
).
(Antonin DĂŠcimo, review by Xavier Leroy)
#11844: Reduce verbosity of make
logs by printing program invocations in
shorthand (eg OCAMLC foo.cmo
). Setting V=1
recovers the old style (with
full command-lines).
(Xavier Leroy, Nicolås Ojeda Bär, review by SÊbastien Hinderer)
#11590: Allow installing to a destination path containing spaces. (Ălie Brami, review by SĂŠbastien Hinderer and David Allsopp)
#11243, #11248, #11268, #11420, #11675: merge the sub-makefiles into the root Makefile. (SĂŠbastien Hinderer, review by David Allsopp and Florian Angeletti)
#11828: Compile otherlibs/ C stubs in two version for native and bytecode (Olivier Nicole, review by SĂŠbastien Hinderer and Xavier Leroy)
#12265: Stop adding -lexecinfo to cclibs (leftover debugging code from the multicore project). Harden the feature probe for -lm in configure so -lm is only added if strictly necessary. configure.ac now correctly propagates library flags for the Windows ports, allowing Windows OCaml to be configured with ZSTD support. (David Allsopp, review by SĂŠbastien Hinderer)
#12372: Pass option -no-execute-only to the linker for OpenBSD >= 7.3 so that code sections remain readable, as needed for closure marshaling. (Xavier Leroy and Anil Madhavapeddy, review by Anil Madhavapeddy and SĂŠbastien Hinderer)
#12062: fix runtime events consumer: when events are dropped they shouldn't be parsed. (Lucas Pluvinage)
#12132: Fix overcounting of minor collections in GC stats. (Damien Doligez, review by Gabriel Scherer)
#12017: Re-register finaliser only after calling user alarm in Gc.create_alarm (Fabrice Buoro, report by Sam Goldman, review by Guillaume Munch-Maccagnoni)
#11887, #11893: Code duplication in pattern-matching compilation (Vincent Laviron, report par Greta Yorsh, review by Luc Maranget and Gabriel Scherer)
#10664, #11600: Unsoundness in the typing of polymorphic methods involving polymorphic variants (Jacques Garrigue, report by Mike Shulman, review by Gabriel Scherer)
#11302, #11412: ocamlc
and ocamlopt
should not remove generated files
when they are not regular files.
(Xavier Leroy, report by Thierry Martinez, review by
Anil Madhavapeddy, Nicolås Ojeda Bär, David Allsopp)
#10348, #10560, #11561: Expand GADT equations lazily during unification to avoid ambiguity (Jacques Garrigue, review by Leo White)
#11436: Fix wrong stack backtrace for out-of-bound exceptions raised by leaf functions. (Tom Kelly and Xavier Leroy, review by Mark Shinwell)
#11450, #12018: Fix erroneous functor error messages that were too eager to
cast struct end
functor arguments as unit modules in F(struct end)
.
(Florian Angetti, review by Gabriel Scherer)
#11643: Add missing test declaration to float_compare test, so that it will run. (Stefan Muenzel, review by David Allsopp)
#11630: Use correct location when reporting record labels with non-existent paths. (Nicolås Ojeda Bär, report by Jason Gross, review by Gabriel Scherer)
#11727: Ensure push_defaults can push past module patterns, fixing an currying optimisation accidentally disabled by #10340. (Stephen Dolan, review by Gabriel Scherer)
#11771: Use a more relaxed mode for unification in Ctype.subst (Leo White, review by Jacques Garrigue and Gabriel Scherer)
#11803, #11808: on x86, the destination of an integer comparison must be a register, it cannot be a stack slot. (Vincent Laviron, review by Xavier Leroy, report by Emilio JesĂşs Gallego Arias)
#11809: Protect Parmatch.pats_of_type from missing cmis (Jacques Garrigue, review by Stephen Dolan and Gabriel Scherer)
#11824: Fix a crash when calling ocamlrun -b
(Florian Angeletti, review by SĂŠbastien Hinderer)
#11815: Marshalling continuations raises invalid argument exception. (JÊrôme Vouillon, review by Nicolås Ojeda Bär, Stephen Dolan and Hugo Heuzard)
#11846: Mark rbx as destroyed at C call for Win64 (mingw-w64 and Cygwin64). Reserve the shadow store for the ABI in the c_stack_link struct instead of explictly when calling C functions. This simultaneously reduces the number of stack pointer manipulations and also fixes a bug when calling noalloc functions where the shadow store was not being reserved. (David Allsopp, report by Vesa Karvonen, review by Xavier Leroy and KC Sivaramakrishnan)
#11850: When stopping before the emit
phase (using -stop-after
), an empty
temporary assembly file is no longer left in the file system.
(Nicolås Ojeda Bär, review by Gabriel Scherer and Xavier Leroy)
#11866: Fix the result of caml_read_directory()
on non-existent paths.
(Andrei Paskevich and Charlène Gros, review by David Allsopp and
Nicolås Ojeda Bär)
#11879: Bugfix for Ctype.nondep_type (Stephen Dolan, review by Gabriel Scherer)
#12004: Don't ignore function attributes on lambdas with locally abstract types. (Chris Casinghino, review by Gabriel Scherer)
#12037: Fix some data races by using volatile when necessary (Fabrice Buoro and Olivier Nicole, review by Guillaume Munch-Maccagnoni, Gabriel Scherer and Luc Maranget)
#12046: Flush stderr when tracing the parser (Hugo Heuzard, review by David Allsopp and Nicolås Ojeda Bär)
#12061, #12063: don't add inconsistent equalities when computing high-level error messages for functor applications and inclusions. (Florian Angeletti, review by Gabriel Scherer)
#12075: auto-detect whether ar
support @FILE arguments at
configure-time to avoid using this feature with toolchains
that do not support it (eg FreeBSD/Darwin).
(Nicolås Ojeda Bär, review by Xavier Leroy, David Allsop, Javier
ChĂĄvarri, Anil Madhavapeddy)
#12103, 12104: fix a concurrency memory-safety bug in Buffer (Gabriel Scherer, review by Florian Angeletti, report by Samuel Hym)
#12112: Fix caml_callback{2,3}_exn when used with effect handlers. (Lucas Pluvinage, review by Gabriel Scherer, David Allsopp and Xavier Leroy)
#12134: Use ghost location for nodes created when handling defaults in optional arguments. (Paul-Elliot Anglès d'Auriac, review by Gabriel Scherer)
#12153: Fix segfault in bytecode programs involving recursive value definitions of values of size 0 (Vincent Laviron, Xavier Leroy, Gabriel Scherer, review by Xavier Leroy, report by Nick Roberts)
#12162: Fix miscompilation on amd64 backends involving integer overflows (Vincent Laviron and Greta Yorsh, review by Stefan Muenzel)
#12170: fix pthread_geaffinity_np configure check for android (David Allsopp, review by SĂŠbastien Hinderer)
#12178: Fix runtime events consumer poll function returning an invalid value instead of an OCaml integer value. (Lucas Pluvinage)
#12252: Fix shared library build error on RISC-V. (Edwin TÜrÜk, review by Nicolås Ojeda Bär and Xavier Leroy)
#12255, #12256: Handle large signal numbers correctly (Nick Barnes, review by David Allsopp).
#12277: ARM64, fix a potential assembler error for very large functions by emitting stack reallocation code before the body of the function. (Xavier Leroy, review by KC Sivaramakrishnan)
#12253, #12342: Fix infinite loop in signal handling. (Guillaume Munch-Maccagnoni, report by Thomas Leonard, review by KC Sivaramakrishnan and Sadiq Jaffer)
#12445: missing GC root registrations in runtime/io.c (Gabriel Scherer, review by Xavier Leroy and Jeremy Yallop)
#12481, #12505: Fix incorrect initialization of array expressions
[|e1;...;eN|]
when N
is large enough to require major heap allocation.
(Xavier Leroy, report by Andrey Popp, analysis by KC Sivaramakrishnan
and Vincent Laviron, review by Gabriel Scherer)
#11150, #11207, #11936: Avoid recomputation in Typedecl.check_wellfounded (Jacques Garrigue, report by Boris Yakobowski, review by Gabriel Scherer)
#11186, #11188: Fix composition of coercions with aliases (Vincent Laviron, report and review by Leo White)
#12486: Fix delivery of unhandled effect exceptions on s390x (Miod Vallat, report by Jan Midtgaard, review by Vincent Laviron and Xavier Leroy)
We're thrilled to announce the release of Merlin 4.10, which comes with many bug fixes and improvements.
One of the standout features of this release is the significantly enhanced
support for binding operators like let+
and and+
. You'll find that the
results from type-enclosing
on expressions that contain let bindings are now
more precise.
construct
command (#1618). Prefixes are still produced when
warning 42 (disambiguated name) is active.short-path
from looping in some cases related to recursive type
definitions (#1645)type-enclosing
on let/and operators (#1653)merlin-construct-with-local-values
(#1644)As OCaml 5.1 is on the horizon, we're excited to announce the release of odoc 2.2.1. This latest version brings compatibility with the upcoming OCaml 5.1 release.
Additions
OBuilder now supports FreeBSD which has allowed opam-repo-ci to be extended to test against it. Currently, we are testing Opam 2.1.5 with OCaml 4.14.1 and OCaml 5.0 with FreeBSD 13.2 (AMD64).
The fix to sendfile
in 3.9.2 was not quite enough so here is the last part of
the fix. It brings compatibility with filesystems where sendfile
is not
available, in particular when ecryptfs
is used.
sendfile
fallback (#8288, fixes #8284, @alan-j-hu)We're happy to announce the release of Dune 3.10.0. It comes with some internal fixes as well as some interesting features:
dune describe
that will allow a better implementation of
opam-dune-lint to check the
consistency between library and package dependenciesdune show
for a more consistent command
line interfaceAdd dune show rules
as alias of the dune rules
command. (#8000, @Alizter)
Add dune show installed-libraries
as an alias of the dune installed-libraries
command. (#8135, @Alizter)
Add dune build --dump-gc-stats FILE
argument to dump garbage collection
stats to a named file. (#8072, @Alizter)
Add dune describe package-entries
to print all package entries (#7480,
@moyodiallo)
Fix %{deps}
to expand properly in (cat ...)
when containing 2 or more
items. (#8196, @Alizter)
Fix the severity
of error messages sent over RPC which was missing. (#8193,
@Alizter)
Fix bug with ppx and Reason syntax due to missing dependency in sandboxed action (#7932, fixes #7930, @Alizter)
Improve dune describe external-lib-deps
by adding the internal dependencies
for more information. (#7478, @moyodiallo)
Re-enable background file digests on Windows. The files are now open in a way that prevents race condition around deletion. (#8262, fixes #8268, @emillon)
This bugfix-only release contains two platform-specific changes: one fixes the
Dune cache on Windows, and the other one completes the fix on Linux when
sendfile
is not available. This makes Dune available where user directories
are encrypted using ecryptfs
for example.
Disable background digests on Windows. This prevents an issue where unremovable files would make Dune crash when the shared cache is enabled. (#8243, fixes #8228, @emillon)
Fix permission errors when sendfile
is not available (#8234, fixes #8210,
@emillon)
We are thrilled to announce the release of OCamlFormat 0.26.0!
After almost 5 months of intense development, this release comes with a ton of consistency improvements and bug fixes. In particular, the handling of comments should be largely superior!
Have a look at the full changelog to see the list of improvements, and don't hesitate to share your feedback on this release on OCaml Discuss.
Items marked with an asterisk (*
) are changes that are likely to format
existing code differently from the previous release when using the default
profile.
--numeric
feature (#2333, #2357, @gpetiot)let f (type a) :> a M.u = ..
(#2399, @Julow)module T = (val (x : (module S)))
(#2370, @Julow)then begin end
(#2369, @Julow)fun _ : _ ->
(#2352, @Julow)(::)
(#2347, @Julow)as
-patterns that have parentheses (#2359, @Julow)@@ let+ x = ...
(#2315, #2396, @Julow)
It was formatted differently than @@ let x = ...
.fun (type a) ->
following fun x ->
(#2294, @Julow)((module M) : (module S))
is formatted as (module M : S)
) (#2280, #2300, @gpetiot, @Julow)~label:(fun ...
(#2271, #2291, #2293, #2298, #2398, @Julow)
The fun
keyword is docked where possible and the arguments are indented to avoid confusion with the body.The release of UTop 2.13.0 introduced a regression on Windows. We're releasing UTop 2.13.1 with a patch, and made UTop 2.13.0 unavailable on Windows.
In Dune 3.9.0, we added a feature that offloads some computations to background threads. Unfortunately, this has a bad interaction on macOS, where we fork processes to implement the RPC server and watch mode.
We marked Dune 3.9.0 unavailable on macOS, and released 3.9.1 with some mitigations: we don't offload these computations on macOS, and we only fork when necessary.
The plan for the next release is to stop forking processes on macOS.
Disable background operations and threaded console on macOS and other Unixes where we rely on fork. (#8100, #8121, fixes #8083, @rgrinberg, @emillon)
Initialize async I/O thread lazily. (#8122, @emillon)
We're releasing version 2.13.0 of UTop! This version comes with a couple of bug fixes.
It also bumps the minimal required version of OCaml to 4.11.0 and removes deprecated values from the API.
Fix behavior of utop -stdin (#434, fixes #433, @tuohy)
Handle bounds with Zed.next_error
(#442, @tmattio)
Load files from XDG directories (the legacy paths still work). (#431, @Skyb0rg007)
Remove deprecated values prompt_continue
, prompt_comment
, smart_accept
,
new_prompt_hooks
, at_new_prompt
(#427, @emillon)
Require OCaml 4.11.0 or newer. (#444, @emillon)
The Dune team is thrilled to announce the release of Dune 3.9.0. This version ships with a host of new features and improvements, including:
dune show
Command: This command enables you to display various pieces of information. For instance, you can use dune show pp
to display the preprocessed output of a file or dune show aliases [DIR]
to list the aliases available in DIR
. Read more about the command on its manpage using dune show --help
..eml
files.(build_if)
Toggle in (test)
Stanza: This new field facilitates the packaging of non-portable tests and benchmarks. If you have tests that don't build on a specific platform, you can now tell Dune not to build them on other Platforms with the build_if
field.Enjoy the new features and improvements incorporated into this version!
Include the time it takes to read/write state files when --trace-file
is
enabled (#7960, @rgrinberg)
Include source tree scans in the traces produced by --trace-file
(#7937,
@rgrinberg)
Add --all
option to dune rpc status
to show all Dune RPC servers running.
(#8011, fix #7902, @Alizter)
Add additional metadata to the traces provided by --trace-file
whenever
--trace-extended
is passed (#7778, @rleshchinskiy)
$ dune describe
is now a command group, so arguments to subcommands must be
passed after subcommand itself. (#7919, @Alizter)
Add dune show
command group which is an alias of dune describe
. (#7946,
@Alizter)
Add dune show env
command and make dune printenv
an alias of it. (#7985,
@Alizter)
Add commands dune show targets
and dune show aliases
that display all the
available targets and aliases in a given directory respectively. (#7770,
grants #265, @Alizter)
Extensions used in (dialect)
can contain periods (e.g., cppo.ml
). (#7782,
fixes #7777, @nojb)
The interface
and implementation
fields of a (dialect)
are now optional
(#7757, @gpetiot)
Add (build_if)
to the (test)
stanza. When it evaluates to false, the
executable is not built. (#7899, fixes #6938, @emillon)
Allow (include_subdirs qualified)
to be used when libraries define a
(modules ...)
field (#7797, fixes #7597, @anmonteiro)
Allow multiple globs in library's (stdlib (internal_modules ..))
(@anmonteiro, #7878)
Do not rerun OCaml syntax files on every iteration of the watch mode. This is too memory consuming. (#7894, fix #6900, @rgrinberg)
Attach melange rules to the default alias (#7926, @haochenx)
Compute digests and manage sandboxes in background threads (#7947, @rgrinberg)
Validate file extension for $ dune ocaml top-module
. (#8005, fixes #8004,
@3Rafal)
Cinaps: The promotion rules for cinaps would only offer one file at a time no matter how many promotions were available. Now we offer all the promotions at once (#7901, @rgrinberg)
Add necessary parentheses in generated opam constraints (#7682, fixes #3431, @Lucccyo)
The OCaml infrastructure team is going to move to Debian 12 as the main distribution from Debian 11. We will continue to provide Debian 11 and 10 images while they are supported, dropping Debian 10 when it reaches end of life in 2024-06-30. In addition to these changes we are deprecating Ubuntu 18.04, Alpine 3.16/17, OL7, OpenSuse 15.2 distributions as the have reached end of life. We strongly recommend updating to a newer version if you are still using them.
Please get in touch on https://github.com/ocaml/infrastructure/issues if you have questions or requests for additional support.
We're excited to announce the release of Dune-release 2.0.0!
This release brings support for putting your .opam
files in a opam/
directory. If your project contains dozens of packages, you'll be able to
generate them into the opam/
folder starting with Dune 3.8 using (opam_file_location inside_opam_directory)
in your dune-project
.
Another notable change is the removal of delegates. Users of dune-release who
want to publish their packages to another platform than GitHub can now use the
dune-release delegate-info
and use the output to build their own publication
workflows.
opam/
subdirectory. (#466, @Leonidas-from-XIV)dune-release check
now attempts to discover and parse the change
log, and a new flag --skip-change-log
disables this behaviour. (#458,
@gridbugs)dune-project
. The parser could get confused
when opam file generation is used. Now it only considers the first (name X)
in the file. (#445, @emillon)dune-release delegate-info
and wrap dune-release calls in a script. See #188 for details.
(#428, @NathanReb)dune-release
expects
the opam
binary to be version 2.0 at least. (#406, #411,
@Leonidas-from-XIV)We've released OCaml LSP 1.16.2 with a fix that was introduced in 1.16.1 that prevented users from using preprocessor such as CPPO.
We're thrilled to announce the release of OCaml LSP 1.16.1! đ
This release comes with new "Extract local" and "Extract function" code actions to easily refactor your code.
We've also disabled code lenses by default following user feedback. You can follow the discussion on GitHub.
This release is also the first OCaml LSP release to use upstream Merlin. Among other things, this means that it is compatible with all the OCaml versions supported by Merlin: currently OCaml 4.14 and 5.0.0.
We're also releasing numerous bug fixes, including:
And much more! Read the full changelog for a complete list of improvements and bug fixes.
didChangeConfiguration
notification (#1103)merlin-lib
4.9 (#1070)Support building with OCaml 5.0 and 5.1 (#1150)
Disable code lens by default. The support can be re-enabled by explicitly setting it in the configuration. (#1134)
Fix initilization of ocamlformat-rpc
in some edge cases when ocamlformat is
initialized concurrently (#1132)
Kill unnecessary $ dune ocaml-merlin
with SIGTERM rather than SIGKILL
(#1124)
Refactor comment parsing to use odoc-parser
and cmarkit
instead of
octavius
and omd
(#1088)
This allows users who migrated to omd 2.X to install ocaml-lsp-server in the same opam switch.
We also slightly improved markdown generation support and fixed a couple in the generation of inline heading and module types.
Allow opening documents that were already open. This is a workaround for neovim's lsp client (#1067)
Disable type annotation for functions (#1054)
Respect codeActionLiteralSupport capability (#1046)
Fix a document syncing issue when utf-16 is the position encoding (#1004)
Disable "Type-annotate" action for code that is already annotated. (#1037, fixes #1036)
Fix semantic highlighting of long identifiers when using preprocessors (#1049, fixes #1034)
Fix the type of DocumentSelector in cram document registration (#1068)
Accept the --clientProcessId
command line argument. (#1074)
Accept --port
as a synonym for --socket
. (#1075)
Fix connecting to dune rpc on Windows. (#1080)
We're excited to announce the release of Ppxlib 0.30.0! It comes with support for OCaml 5.1, various enhancements, and bug fixes.
For PPX writing, Ast_pattern
now offers additional utility functions, while metaquot
benefits from improved error reporting.
PPX usage sees better compatibility with OCaml trunk
, thanks to the Driver's improved Parsetree
version recognition. This allows for compatibility with both trunk
and stable OCaml versions concurrently.
Finally, this release enhances Ppxlib's compatibility with ReScript, introducing "ns" and "res" as reserved namespaces.
Ast_pattern
now has ebool
, pbool
helper, and a new map.(ocaml-ppx/ppxlib#402, @Burnleydev1)metaquot
. (ocaml-ppx/ppxlib#397, @Burnleydev1)Attribute.declare_with_attr_loc
(ocaml-ppx/ppxlib#396, @dvulakh)Quoter
's let
binding non-recursive (ocaml-ppx/ppxlib#401, @sim642)Parsetree
magic numbers to Parsetree
versions towards the current version,
as it is usually the common case and it helps when magic numbers are
ambiguous (such as on development versions) (ocaml-ppx/ppxlib#409, @shym)base
and stdio
(ocaml-ppx/ppxlib#421, @kit-ty-kate)ppxlib
contains more than a library
(Update the opam description ocaml-ppx/ppxlib#422, @pitag-ha)5.1.0~alpha1
(ocaml-ppx/ppxlib#428, @shym, @Octachron , @pitag-ha, @panglesd)-locations-check
option for coercions with ground (ocaml-ppx/ppxlib#428, @Octachron)We've released Dune 3.8.2 with a few bug fixes.
-p
/ --only-packages
for melange.emit
artifacts (dune#7849, @anmonteiro)The server toxis
where Opam-Repo-CI and OCaml-CI were deployed suffered hardware difficulties yesterday, resulting in BTRFS filesystem corruption and memory issues. These issues are tracked on ocaml/infrastructure#51. Services were restored temporarily using a spare spinning disk, but we continued to see ECC memory issues.
All services have now been redeployed on new ARM64 hardware. We retained the databases for Prometheus, OCaml-CI and Opam-Repo-CI, but unfortunately, older job logs have been lost.
The external URLs for these services are unchanged.
The Grafana dashboards at status.ci3.ocamllabs.io and status.ci.ocamllabs.io have been merged into a single dashboard at status.ci.ocamllabs.io. HTTP redirects are in place for the old addresses.
We've just released a patch version of Dune to fix regressions introduced in Dune 3.8.0.
In particular, we've reverted some cross-compilation improvements that caused build failures when using ppx_runtime_libraries
and we'll revisit them in a future version of Dune.
(mode vo)
for
these older versions of Coq. (dune#7847, fixes dune#7846, @Alizter)ppx_runtime_libraries
in the target context when
cross compiling) (dune#7887, fixes dune#7875, @emillon)Feedback on this post is welcomed on Discuss!
We are pleased to announce the patch release of opam 2.1.5.
This opam release consists of backported bug & security fixes:
archive-mirrors
field from init config file to config (#5315)Opam installation instructions (unchanged):
From binaries: run
bash -c "sh <(curl -fsSL https://opam.ocaml.org/install.sh) --version 2.1.5"
or download manually from the Github "Releases" page to your PATH. In this case, don't forget to run opam init --reinit -ni
to enable sandboxing if you had version 2.0.0~rc manually installed or to update you sandbox script.
From source, using opam:
opam update; opam install opam-devel
(then copy the opam binary to your PATH as explained, and don't forget to run opam init --reinit -ni
to enable sandboxing if you had version 2.0.0~rc manually installed or to update your sandbox script)
From source, manually: see the instructions in the README.
We hope you enjoy this new minor version, and remain open to bug reports and suggestions.
archive-mirrors
field from init config file to config
[#5315 @hannesm]