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.
See full changelog
Fixes
- Fix file permissions used when specifying output files of pp and ppx. (ocaml-lsp#1153)
Official stable release announcements and updates from the OCaml compiler, OCaml infrastructure and the OCaml Platform Tools.
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)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]We are pleased to announce the release of Merlin 4.9 for OCaml 4.14.1 and 5.0.
This maintenance release brings multiple bug fixes and improvements. In particular we identified and patched an important memory consumption issue that could greatly affect Merlin’s performance in heavily functorized projects.
scope option to the occurrences command in preparation for
the upcoming project-wide-occurrences feature (#1596)false instead of true in the
construct command, for consistency (#1599).construct results ordering for sum types sand poly variants (#1603)errors to erroneously alert about missing
cmi files (#1577)merlin-construct (#1598)construct ordering (#1603)The dune team is pleased to announce the release of Dune 3.8.0.
It is now available in opam-repository. As usual, it should always be safe to upgrade your dune package: new features and deprecations are only available if you upgrade the language version in your dune-project files.
concurrent actionDune 3.8.0 introduced the new concurrent action. You can now use it instead of the progn action to execute actions concurrently.
For instance:
(rule
(action
(concurrent
(write-file A "I am file A.\n")
(write-file B "I am certainly file B.\n")
(write-file C "I am most certainly file C.\n"))))
will write to files A, B and C concurrently.
.mld filesIn Dune 3.7.0, we introduced version 0.3 of the mdx stanza, which came with support for .mld files.
In Dune 3.8.0, .mld files are now supported by default with version 0.4 of the mdx stanza!
Have a look at this diff to see how to migrate your code to the new stanza version.
Introduce mdx stanza 0.4 requiring mdx >= 2.3.0 which updates the default
list of files to include *.mld files (#7582, @Leonidas-from-XIV)
Allow (stdlib ...) to be used with (wrapped false) in library stanzas
(#7139, @anmonteiro).
Allow the main module of a library with (stdlib ...) to depend on other
libraries (#7154, @anmonteiro).
Support (link_flags ...) in (cinaps ...) stanza. (#7423, fixes #7416,
@nojb)
Allow (package ...) in any position within (rule ...) stanza (#7445,
@Leonidas-from-XIV)
Added a new user action (concurrent ) which is like (progn ) but runs the
actions concurrently. (#6933, @Alizter)
Accept the Ordered Set Language for the modes field in library stanzas
(#6611, @anmonteiro).
Allow parallel execution of inline tests partitions (#7012, @hhugo)
Add the --display-separate-messages flag to separate the error messages
produced by commands with a blank line. (#6823, fixes #6158, @esope)
Add --watch-exclusions to Dune build options (#7216, @jonahbeckford)
Adds support for loading plugins in toplevels (#6082, fixes #6081, @ivg, @richardlford)
Introduce a public_headers field on libraries. This field is like
install_c_headers, but it allows to choose the extension and choose the
paths for the installed headers. (#7512, @rgrinberg)
Dune can now detect Coq theories from outside the workspace. This allows for composition with installed theories (not necessarily installed with Dune). (#7047, @Alizter, @ejgallego)
Added a --no-build option to dune coq top for avoiding rebuilds (#7380,
fixes #7355, @Alizter)
Add a coqdoc_flags field to the coq.theory stanza allowing the user to
pass extra arguments to coqdoc. (#7676, fixes #7954 @Alizter)
Preliminary support for Coq compiled intefaces (.vos files) enabled via
(mode vos) in coq.theory stanzas. This can be used in combination with
dune coq top to obtain fast re-building of dependencies (with no checking
of proofs) prior to stepping into a file. (#7406, @rlepigre)
Read pkg-config arguments from the PKG_CONFIG_ARGN environment variable
(#1492, #7734, @anmonteiro)
Use $PKG_CONFIG, when set, to find the pkg-config binary (#7469, fixes
#2572, @anmonteiro)
Bootstrap: remove reliance on shell. Previously, we'd use the shell to get the number of processors. (#7274, @rgrinberg)
Non-user proccesses such as version control or config checking are now run silently. (#6994, fixes #4066, @Alizter)
Bytecode executables built for JSOO are linked with -noautolink and no
longer depend on the shared stubs of their dependent libraries (#7156, @nojb)
Always include opam files in the generated .install file. Previously, it
would not be included whenever (generate_opam_files true) was set and the
.install file wasn't yet generated. (#7547, @rgrinberg)
Modules that were declared in (modules_without_implementation),
(private_modules) or (virtual_modules) but not declared in (modules)
will cause Dune to emit a warning which will become an error in 3.9. (#7608,
fixes #7026, @Alizter)
Coq language versions less 0.8 are deprecated, and will be removed
in an upcoming Dune version. All users are required to migrate to
(coq lang 0.8) which provides the right semantics for theories
that have been globally installed, such as those coming from opam
(@ejgallego, @Alizter)
Find pps dependencies in the host context when cross-compiling, (#7415,
fixes #4156, @anmonteiro)
Fix plugin loading with findlib. The functionality was broken in 3.7.0. (#7556, @anmonteiro)
Load the host context findlib.conf when cross-compiling (#7428, fixes
#1701, @rgrinberg, @anmonteiro)
Allow overriding the ocaml binary with findlib configuration (#7648,
@rgrinberg)
Resolve ppx_runtime_libraries in the target context when cross compiling
(#7450, fixes #2794, @anmonteiro)
Fix dune install when cross compiling (#7410, fixes #6191, @anmonteiro,
@rizo)
Fix string quoting in the json file written by --trace-file (#7773,
@rleshchinskiy)
Correctly set MANPATH in dune exec. Previously, we would use the bin/
directory of the context. (#7655, @rgrinberg)
merlin: ignore instrumentation settings for preprocessing. (#7606, fixes #7465, @Alizter)
When a rule's action is interrupted, delete any leftover directory targets. This is consistent with how we treat file targets. (#7564, @rgrinberg)
Fix dune crashing on MacOS in watch mode whenever $PATH contains $PWD
(#7441, fixes #6907, @rgrinberg)
Dune in watch mode no longer builds concurrent rules in serial (#7395 @rgrinberg, @jchavarri)
dune coq top now correctly respects the project root when called from a
subdirectory. However, absolute filenames passed to dune coq top are no
longer supported (due to being buggy) (#7357, fixes #7344, @rlepigre and
@Alizter)
RPC: Ignore SIGPIPE when clients suddenly disconnect (#7299, #7319, fixes #6879, @rgrinberg)
Always clean up the UI on exit. (#7271, fixes #7142 @rgrinberg)
Bootstrap: correctly detect the number of processors by allowing nproc to be
looked up in $PATH (#7272, @Alizter)
Speed up file copying on macos by using clonefile when available
(@rgrinberg, #7210)
Support commands that output 8-bit and 24-bit colors in the terminal (#7188, @Alizter)
Speed up rule generation for libraries and executables with many modules (#7187, @jchavarri)
Do not re-render UI on every frame if the UI doesn't change (#7186, fix #7184, @rgrinberg)
Make coq_db creation in scope lazy (@ejgallego, #7133)
dune install now respects --display quiet mode (#7116, fixes #4573, fixes #7106, @Alizter)
Stub shared libraries (dllXXX_stubs.so) in Dune-installed libraries could
not be used as dependencies of libraries in the workspace (eg when compiling
to bytecode and/or Javascript). This is now fixed. (#7151, @nojb)
Fix regression where Merlin was unable to handle filenames with uppercase letters under Windows. (#7577, @nojb)
On nix+macos, pass -f to the codesign hook to avoid errors when the binary
is already signed (#7183, fixes #6265, @greedy)
Fix bug where RPC clients built with dune-rpc-lwt would crash when closing their connection to the server (#7581, @gridbugs)
Fix RPC server on Windows (used for OCaml-LSP). (#7666, @nojb)
Following the release of UTop 2.12.0 a few days ago, we released UTop 2.12.1, a patch release that fixes a regression with unit qualification.
This release also includes an implementation of completion-at-point for Emacs.
Unit module is in scope with
no () constructor (fix regression with unit qualification ocaml-community/utop#429, fixes regression with qualifying () ocaml-community/utop#428, @emillon)UTop 2.12.0 is out with support for the upcoming release of OCaml 5.1!
This release also fixes an issue that prevented users to redefine the () constructor.
You can now safely run type t = () of unit and continue using your top-level session.
Add support for OCaml 5.1 (#421, @emillon)
Mark prompt_continue, prompt_comment, smart_accept, new_prompt_hooks,
at_new_prompt as deprecated (they have been documented as such since 2012
and most of them are ignored) (#415, @emillon)
Qualify () constructor in generated expressions. (#418, fixes #417, @emillon)
We're pleased to announce the release of Mdx 2.3.0!
This release comes with support for mld files and changes the parser used
by the toplevel, which allows Camlp5's parser to be used with MDX.
Starting in MDX 2.3.0, you can now execute code blocks in your .mld files! 🎉
As a reminder, .mld files are text files similar to Markdown, but instead of
using the Markdown markup language, they use the Ocamldoc markdown language - as
is used in .mli files. .mld are typically used to write manuals with
odoc.
To run mdx on .mld files, start by enabling mdx in your dune-project:
(using mdx 0.3)
Then list your .mld files in the mdx stanza in your dune:
(mdx
(files index.mld))
Now if you put a code block in index.mld, it will be executed when running dune test and if dune will suggest to promote the output. For instance, if you run dune test with this index.mld:
Here's an example code block in a [.mld] file:
{[
# List.map (fun x -> x * x) [(1 + 9); 2; 3; 4];;
]}
dune test will return:
---+++@@@@ Here's an example code block in a [.mld] file:
{[
# List.map (fun x -> x * x) [(1 + 9); 2; 3; 4];;
+ - : int list = [100; 4; 9; 16]
]}
You can run dune promote to accept the change.
You can see a complete demo of this here.
Now you can keep the code blocks in your manual up-to-date even when your API changes!
mld files (#423, @jonludlam)ref, instead of always the official OCaml parser). This allows
Camlp5's parser to be used with MDX. (#417, @chetmurthy)We are excited to announce the release of Dune 3.7.1, which brings a few bug fixes from the recent 3.7.0 release:
... and a few more, you can consult the changelog for a full list of bug fixes.
Fix segfault on MacOS when dune was being shutdown while in watch mode. (#7312, fixes #6151, @gridbugs, @emillon)
Fix preludes not being recorded as dependencies in the (mdx) stanza (#7109,
fixes #7077, @emillon).
Pass correct flags when compiling stdlib.ml. (#7241, @emillon)
Handle "Too many links" errors when using Dune cache on Windows. The fix in 3.7.0 for this same issue was not effective due to a typo. (#7472, @nojb)
We are pleased to announce the release of OCamlFormat 0.25.1! This release contains several bug fixes, changes, and new features.
The library is also available through the ocamlformat-lib package on opam. The ocamlformat package only contains the binary.
We would like to thank all contributors for their valuable contributions to this release. Please see the complete changelog for more details.
We hope you enjoy this release and continue to find OCamlFormat a valuable tool for your OCaml projects. You can download ocamlformat.0.25.1 from the opam repository or GitHub.
Thank you for your support and feedback, and please don't hesitate to reach out if you have any questions or issues.
The OCamlFormat team
if-then-else and break-cases optionsStarting in OCamlFormat 0.25.1, we've also added new values to the if-then-else and break-cases options. Now you can use the vertical value to format these expressions in a more readable and consistent way.
These options are not set by default but you can try them out by customizing your .ocamlformat file as usual.
Here are a few examples:
if-then-else = vertical- let epi = if Option.is_some next then fmt "@\n" else fmt_opt epi in
+ let epi =
+ if Option.is_some next then
+ fmt "@\n"
+ else
+ fmt_opt epi
+ in
- if tree_depth tree > depth then node_depth_truncate_ depth node
- else (* already short enough; don't bother truncating *)
+ if tree_depth tree > depth then
+ node_depth_truncate_ depth node
+ else
+ (* already short enough; don't bother truncating *)
node
break-cases = vertical-| Ok (`Version | `Help) -> Stdlib.exit 0
-| Error _ -> Stdlib.exit 1
+| Ok (`Version | `Help) ->
+ Stdlib.exit 0
+| Error _ ->
+ Stdlib.exit 1
- ~f:(function `Int _ | `Float _ -> true | _ -> false)
+ ~f:(function
+ | `Int _
+ | `Float _ ->
+ true
+ | _ ->
+ false)
Formatting .mld files as odoc documentation files is now possible! This will make it much easier to maintain high-quality documentation alongside your OCaml code.
This feature is only available in ocamlformat for now, but keep an eye on the future dune releases to know when dune fmt will be able to format your .mld files!
We fixed various issues related to indentation, alignment, and comments positioning.
Here are a few examples:
| [ node ] ->
( (if List.mem node ~set:integer_graph.(node)
- then Has_loop [ numbering.forth.(node) ]
- else No_loop numbering.forth.(node))
+ then Has_loop [ numbering.forth.(node) ]
+ else No_loop numbering.forth.(node))
, component_edges.(component) )
(let open Memo.O in
- let+ w = Dune_rules.Workspace.workspace () in
- Dune_engine.Execution_parameters.builtin_default
- |> Dune_rules.Workspace.update_execution_parameters w);
+ let+ w = Dune_rules.Workspace.workspace () in
+ Dune_engine.Execution_parameters.builtin_default
+ |> Dune_rules.Workspace.update_execution_parameters w);
- module Sel = (val if is_osx () then (module Mac)
- else if Sys.unix then (module Unix)
- else (module Fail) : Unix_socket)
+ module Sel =
+ (val if is_osx () then (module Mac)
+ else if Sys.unix then (module Unix)
+ else (module Fail)
+ : Unix_socket)
max-indent option is not set (#2131, @hhugo, @gpetiot)enable/disable floating attributes (#2156, @gpetiot).ocamlformat-ignore under Windows (#2206, @nojb)initializer keyword (#2145, @gpetiot)(struct end) vs ()) (#2135, #2146, @trefis, @gpetiot)((module X) : (module Y)) vs (module X : Y)) (#2136, @trefis, @gpetiot)if carrying attributes (#2167, @trefis, @gpetiot)ocamlformat package now only contains the binary, the library is available through the ocamlformat-lib package (#2230, @gpetiot)break-colon option to decide whether to break before or after the : symbol in value binding declarations and type constraints. This behavior is no longer ensured by ocp-indent-compat. (#2149, @gpetiot).mld files as odoc documentation files (#2008, @gpetiot)vertical for option if-then-else (#2174, @gpetiot)vertical for option break-cases (#2176, @gpetiot)wrap-or-vertical for option break-infix that only wraps high precedence infix ops (#1865, @gpetiot)We are pleased to announce the release of Merlin 4.8 for OCaml 4.14.1 and 5.0.
This maintenance release brings multiple bug fixes and improvements to document fetching, jump-to-definition and type-on-hover for records' labels.
OCamlFormat 0.25.0 is now available with expanded formatting capabilities!
This release addresses numerous inconsistencies and bugs, particularly around comment positioning, parentheses handling, and alignment issues. Key fixes include proper indentation when OCamlFormat is disabled on expressions, correct formatting of chunks with enable/disable attributes, and improved handling of comments around variant identifiers, type aliases, and constructor records. The release also resolves several platform-specific issues, including Windows build automation and glob pattern interpretation in .ocamlformat-ignore files.
New formatting options provide developers with more control over code layout. The break-colon option allows customization of line breaks around colons in value bindings and type constraints. Both if-then-else and break-cases options now support a vertical value for consistent vertical formatting. Additionally, OCamlFormat can now format .mld files as odoc documentation, and a new wrap-or-vertical value for break-infix provides more nuanced control over high-precedence infix operator wrapping.
max-indent option is not set (#2131, @hhugo, @gpetiot)enable/disable floating attributes (#2156, @gpetiot).ocamlformat-ignore under Windows (#2206, @nojb)initializer keyword (#2145, @gpetiot)(struct end) vs ()) (#2135, #2146, @trefis, @gpetiot)((module X) : (module Y)) vs (module X : Y)) (#2136, @trefis, @gpetiot)if carrying attributes (#2167, @trefis, @gpetiot)ocamlformat package now only contains the binary, the library is available through the ocamlformat-lib package (#2230, @gpetiot)break-colon option to decide whether to break before or after the : symbol in value binding declarations and type constraints. This behavior is no longer ensured by ocp-indent-compat. (#2149, @gpetiot).mld files as odoc documentation files (#2008, @gpetiot)vertical for option if-then-else (#2174, @gpetiot)vertical for option break-cases (#2176, @gpetiot)wrap-or-vertical for option break-infix that only wraps high precedence infix ops (#1865, @gpetiot)The dune team is pleased to announce the release of Dune 3.7.0.
As in the previous announce, here is a changelog split in several parts: changes to the dune executable itself (new commands or options, etc) and changes to the dune language. Most of the changes to the latter are only enabled when you opt-in to the new version by specifying (lang dune 3.7) in the corresponding dune-project file. In other words, it should always be safe to upgrade the dune package.
Dune 3.7 now supports watch mode for executables! 🎉
It works just as you'd expect, if you define an executable, you can run it with
dune exec -w my-executable
It will interrupt the process when a file change and re-start the application.
For a practical example of the workflows enabled by watch-mode, check this demo of a live reload for web development:
Starting from Dune 3.7, Dune watch mode is now available on Windows!
@yams-yams and @nojb
from Lexifi have been working on integrating Windows native polling API with
Dune to supplement the support for fswatch, which is unavailable on Windows.
Windows users can now run dune build -w out of the box!
It's quite common to organise your code into subdirectories to separate
components. Until now, you could do this by including
(include_subdirs unqualified) in your dune files, but this wasn't completely
satisfying since all of your modules were available in the top-level. If you
wanted to expose modules in subdirectories under another module, you had to
create a separate library, which was.. quite the overhead.
Dune 3.7 brings support for the highly-anticipated qualified sub-directories.
You can now write (include_subdirs qualified) in your dune file, and modules
in your subdirectories will be exposed under a module with the name of the
directory.

Allow running $ dune exec in watch mode (with the -w flag). In watch mode,
$ dune exec the executed binary whenever it is recompiled. (#6966,
@gridbugs)
Add a dune cache size command for displaying the size of the cache (#6638,
@Alizter)
Allow $ dune ocaml dump-dot-merlin to run in watch mode. Also this command
shouldn't print "Entering Directory" mesages. (#6497, @rgrinberg)
Add native support for polling mode on Windows (#7010, @yams-yams, @nojb, review by @Rucikir and @jbeckford)
Auto-detect dune-workspace files as dune files in Emacs (#7061,
@ilankri)
Allow $ dune utop to load libraries defined in data only directories
defined using (subdir ..) (#6631, @rgrinberg)
Make dune describe workspace return consistent dependencies for
executables and for libraries. By default, compile-time dependencies
towards PPX-rewriters are from now not taken into account (but
runtime dependencies always are). Compile-time dependencies towards
PPX-rewriters can be taken into account by providing the
--with-pps flag. (#6727, fixes #6486, @esope)
Use colored output with MDX when Dune colors are enabled. (#6462, @MisterDA)
Use colored output with GCC and Clang when compiling C stubs. The
flag -fdiagnostics-color=always is added to the :standard set of
flags. (#4083, @MisterDA)
Move $ dune ocaml-merlin -dump-config=$dir to $ dune ocaml merlin dump-config $dir. (#6547, @rgrinberg)
Fix parsing of OCaml errors that contain code excerpts with ... in them.
(#7008, @rgrinberg)
Fix --trace-file output. Dune now emits a single complete event for every
executed process. Unterminated async events are no longer written. (#6892,
@rgrinberg)
Print missing newline after $ dune exec. (#6821, fixes #6700, @rgrinberg,
@Alizter)
Fix binary corruption when installing or promoting in parallel (#6669, fixes #6668, @edwintorok)
Report an error if dune init ... would create a "dune" file in a location
which already contains a "dune" directory (#6705, @gridbugs)
Fix the parsing of alerts. They will now show up in diagnostics correctly. (#6678, @rginberg)
Print "Leaving Directory" whenever "Entering Directory" is printed. (#6419, fixes #138, @cpitclaudel, @rgrinberg)
Remove "Entering Directory" messages for $ dune install. (#6513,
@rgrinberg)
dune clean should no longer fail under Windows due to the inability to
remove the .lock file. Also, bring the implementation of the global lock
under Windows closer to that of Unix. (#6523, @nojb)
Fix missing dependencies when detecting the kind of C compiler we're using (#6610, fixes #6415, @emillon)
Remove spurious build dir created when running dune init proj ... (#6707,
fixes #5429, @gridbugs)
Validate the command line arguments for $ dune ocaml top-module. This
command requires one positional argument (#6796, fixes #6793, @rgrinberg)
Fix dependency cycle when installing files to the bin section with
glob_files (#6764, fixes #6708, @gridbugs)
Handle "Too many links" errors when using Dune cache on Windows (#6993, @nojb)
Pre-emptively clear screen in watch mode (#6987, fixes #6884, @rgrinberg)
Allow --sandbox to affect ocamldep invocations. Previously, they were
wrongly marked as incompatible (#6749, @rgrinberg)
Allow (include_subdirs qualified) for OCaml projects. (#6594, fixes #1084,
@rgrinberg)
Format dune files when they are named dune-file. This occurs when we enable
the alternative file names project option. (#6566, @rgrinberg)
Add map_workspace_root dune-project stanza to allow disabling of
mapping of workspace root to /workspace_root. (#6988, fixes #6929,
@richardlford)
Allow the cinaps stanza to set a custom alias. By default, if the alias is
not set then the cinaps actions will be attached to both @cinaps and
@runtest (#6991, @rgrinberg)
Add (using ctypes 0.3). When used, paths in (ctypes) are interpreted
relative to where the stanza is defined. (#6883, fixes #5325, @emillon)
Stop passing -q flag in dune coq top, which allows for .coqrc to be
loaded. (#6848, fixes #6847, @Alizter)
Coq native mode is now automatically detected by Dune starting with Coq lang
0.7. (mode native) has been deprecated in favour of detection from the
configuration of Coq. (#6409, @Alizter)
Accurately determine merlin configuration for all sources selected with
copy# and copy_files#. The old heuristic of looking for a module in
parent directories is removed (#6594, @rgrinberg)
Fix parsing of the <= operator in blang expressions of dune files.
Previously, the operator would be interpreted as <. (#6928, @tatchi)
Fix preprocessing with staged_pps (#6748, fixes #6644, @rgrinberg)
Fix the parsing of decimal and hexadecimal escape literals in dune,
dune-package, and other dune s-expression based files (#6710, @shym)
Fix cross compilation configuration when a context with targets is itself a host of another context (#6958, fixes #6843, @rgrinberg)
Allow compilation rules to be impacted by (env ..) stanzas that modify the
environment or set binaries. (#6527, @rgrinberg)
Fix handling of support files generated by odoc. (#6913, @jonludlam)
Fix the compilation of modules generated at link time when
implicit_transitive_deps is enabled (#6642, @rgrinberg)
Fix inline tests with js_of_ocaml and whole program compilation mode enabled (#6645, @hhugo)
Fix js_of_ocaml separate compilation rules when --enable=effects
,--enable=use-js-string or --toplevel is used. (#6714, #6828, #6920, @hhugo)
Fix js_of_ocaml separate compilation in presence of linkall (#6832, #6916, @hhugo)
coqdep is now called once per theory, instead of one time per Coq
file. This should significantly speed up some builds, as coqdep
startup time is often heavy (#7048, @Alizter, @ejgallego)
ppxlib as-is, as well as ppx_sexp_conv in the same project (#386, @kit-ty-kate)File_path exports. (#381, @ceastlund)Ppxlib.Expansion_helpers with name mangling utilities from ppx_deriving (#370, @sim642)Fix configurator when using the MSVC compiler (#6538, fixes #6537, @nojb)
Fix running the RPC server on windows (#6721 fixes #6720, @rgrinberg)
Normal syntax to Markdown to better explain what the syntax is
and moved it to Mdx.Syntax (#412, @Leonidas-from-XIV)part-end MDX directive in
the output, before that line would've been dropped (#374, #387,
@Leonidas-from-XIV)On behalf of the ocaml-lsp team, I’m pleased to announce ocaml-lsp-server versions 1.15.0-4.14 and 1.15.0-5.0 for OCaml 4.14 and 5.0, respectively. This is the first time we release ocaml-lsp supporting two compiler versions. We look forward to your feedback.
Enable semantic highlighting support by default (#933)
Support connecting over pipes and socket. Pipes on Windows aren't yet supported (#946)
More about communication channels in LSP specification.
Re-enable ocamlformat-rpc for formatting code snippets (but not files and
not on Windows) (#920, #939)
One needs to have installed either ocamlformat package version > 0.21.0 or,
otherwise, ocamlformat-rpc package. Note that previously ocamlformat-rpc
came in a standalone OPAM package, but since ocamlformat version > 0.21.0,
it comes within ocamlformat package.
Add custom ocamllsp/hoverExtended request (#561)
Support utf-8 position encoding clients (#919)
More about position encoding in LSP specification.
Show unwrapped module alias types on hovering over module names. This is due
to upgrading to merlin 4.7 and using merlin's verbosity=smart by default
(#942)
Respect the client's completion item resolve and preSelect capabilities (#925, #936)
Disable polling for dune's watch mode on Windows and OCaml 4.14.0 (#935)
Fix semantic highlighting of "long identifiers," e.g., Foo.Bar.x (#932)
Fix syncing of document contents:
@toplevel_printer annotated printers for functors (#378 @metavinek)We have the pleasure of celebrating the birthday of Oronce Finé by announcing the release of OCaml version 4.14.1.
This release is a collection of safe bug fixes, cherry-picked from the OCaml 5.0.0 release. If you were using OCaml 4.14.0 and cannot yet upgrade to OCaml 5, this release is for you.
The 4.14 branch is expected to receive more backported fixes during the maturation of OCaml 5. Thus don't hesitate to report any bugs on the OCaml issue tracker.
See the list of changes below for more details.
The base compiler can be installed as an opam switch with the following commands:
opam update
opam switch create 4.14.1
The source code for the release candidate is also directly available on:
ranlib on created / installed libraries
(Sébastien Hinderer and Xavier Leroy, review by the same)#11370, #11373: Don't pass CFLAGS to flexlink during configure. (David Allsopp, report by William Hu, review by Xavier Leroy and Sébastien Hinderer)
#11487: Thwart FMA test optimisation during configure (William Hu, review by David Allsopp and Sébastien Hinderer)
#10768, #11340: Fix typechecking regression when combining first class modules and GADTs. (Jacques Garrigue, report by François Thiré, review by Matthew Ryan)
#11204: Fix regression introduced in 4.14.0 that would trigger Warning 17 when calling virtual methods introduced by constraining the self type from within the class definition. (Nicolás Ojeda Bär, review by Leo White)
#11263, #11267: caml/{memory,misc}.h: Check whether _MSC_VER is defined
before using it to ensure that the headers can always be used in code which
turns on -Wundef (or equivalent).
(David Allsopp and Nicolás Ojeda Bär, review by Nicolás Ojeda Bär and
Sébastien Hinderer)
#11314, #11416: Fix non-informative error message for module inclusion (Florian Angeletti, report by Thierry Martinez, review by Gabriel Scherer)
#11358, #11379: Refactor the initialisation of bytecode threading, This avoids a "dangling pointer" warning of GCC 12.1. (Xavier Leroy, report by Armaël Guéneau, review by Gabriel Scherer)
#11387: Module type with constraints no longer crash the compiler in presence
of both shadowing warnings and the -bin-annot compiler flag.
(Florian Angeletti, report by Christophe Raffalli, review by Gabriel Scherer)
#11392, #11392: Assertion failure with -rectypes and external definitions
(Gabriel Scherer, review by Florian Angeletti, report by Dmitrii Kosarev)
#11417: Fix a regression which allowed virtual methods in non-virtual classes. (Leo White, review by Florian Angeletti)
#11468: Fix regression from #10186 (OCaml 4.13) detecting IPv6 on Windows for Mingw-w64 i686 port. (David Allsopp, review by Xavier Leroy and Sébastien Hinderer)
#11489, #11496: More prudent deallocation of alternate signal stack (Xavier Leroy, report by @rajdakin, review by Florian Angeletti)
#11516, #11524: Fix the deprecated_mutable attribute.
(Chris Casinghino, review by Nicolás Ojeda Bär and Florian Angeletti)
#11194, #11609: Fix inconsistent type variable names in "unbound type var" messages (Ulysse Gérard and Florian Angeletti, review Florian Angeletti and Gabriel Scherer)
#11622: Prevent stack overflow when printing a constructor or record mismatch error involving recursive types. (Florian Angeletti, review by Gabriel Scherer)
#11732: Ensure that types from packed modules are always generalised (Stephen Dolan and Leo White, review by Jacques Garrigue)
#11737: Fix segfault condition in Unix.stat under Windows in the presence of
multiple threads.
(Marc Lasson, Nicolás Ojeda Bär, review by Gabriel Scherer and David Allsopp)
#11776: Extend environment with functor parameters in strengthen_lazy.
(Chris Casinghino and Luke Maurer, review by Gabriel Scherer)
#11533, #11534: Follow synonyms again in #show_module_type
(this had stopped working in 4.14.0)
(Gabriel Scherer, review by Jacques Garrigue, report by Yaron Minsky)
#11768, #11788: Fix crash at start-up of bytecode programs in
no-naked-pointers mode caused by wrong initialisation of caml_global_data
(Xavier Leroy, report by Etienne Millon, review by 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)
We have the pleasure of celebrating the birthdays of Jane Austen and Arthur C. Clarke by announcing the release of OCaml version 5.0.0.
The highlight of this new major version of OCaml is the long-awaited runtime support for shared memory parallelism and effect handlers.
This multicore support is the culmination of more than 8 years of effort, and required a full rewrite of the OCaml runtime environment. Consequently, OCaml 5.0.0 is expected to be a more experimental version of OCaml than the usual OCaml releases.
In this release, the native compiler only supports the x86-64 and arm64 architectures. In terms of operating systems, Linux, the BSDs, macOS and mingw64 on Windows are supported.
We are planning to restore the support for most previously supported architectures and operating systems, and address remaining known issues over the course of the next year.
Don't let those words of caution hinder your experimentation with OCaml 5: OCaml 5 as a language is fully compatible with OCaml 4 down to the performance characteristics of your programs. In other words, any code that works with OCaml 4 should work the same with OCaml 5.
The currently known exceptions to this rule are:
Please report any unexpected behaviours on the OCaml issue tracker and post any questions or comments you might have on our discussion forums.
During the maturing period for OCaml 5, the OCaml 4.14 branch will be maintained by backporting bug fixes from the OCaml 5 branch at regular intervals. The next release on the OCaml 4.14 branch, OCaml 4.14.1, should soon follow this release.
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.0.0
It might be also interesting to check the new support for parallelism by installing the domainslib library with
opam install domainslib
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.0.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.0.0+flambda+nffa ocaml-variants.5.0.0+options ocaml-option-flambda ocaml-option-no-flat-float-array
The command line above is slightly more complicated for opam versions before 2.1:
opam update
opam switch create <switch_name> --packages=ocaml-variants.5.0.0+options,<option_list>
In both cases, all available options can be listed with opam search ocaml-option.
#11400: Runtime events counters fixes Fixes mismatch between OCaml and C APIs, removes events from 4.x that are not present in the 5.0 GC and adds some missing probes. (Sadiq Jaffer, review by Gabriel Scherer, Florian Angeletti)
#11368: Runtime events buffer size OCAMLRUNPARAMS fix The runtime events buffer size can now be set via the 'e' OCAMLRUNPARAM. This is previously mistakenly enabled/disabled tracing instead. (Sadiq Jaffer, review by KC Sivaramakrishnan, David Allsopp, Damien Doligez)
#11308: Add environment variable to preserve runtime_events after exit If the environment variable OCAML_RUNTIME_EVENTS_PRESERVE exists then the runtime will not remove the runtime events ring buffers at exit. This makes tracing very short running programs more reliable. (Sadiq Jaffer, review by KC Sivaramakrishnan)
#10964: Ring-buffer based runtime tracing (runtime_events) Runtime_events is a very low overhead runtime tracing system designed for continuous monitoring of OCaml applications. (Sadiq Jaffer, review by Anil Madhavapeddy, Enguerrand Decorne, Richard Warburton, Gabriel Scherer, Sabine Schmaltz, Florian Angeletti, Patrick Ferris, Tom Kelly)
(breaking change) #10723: do not use -flat-namespace linking for macOS.
(Carlo Cabrera, review by Damien Doligez)
(breaking change) #10863, #10933: Remove support for old, unprefixed C runtime function names
such as alloc. The new names prefixed with caml_ must be used instead,
such as caml_alloc. Consequently, it is no longer needed to define
CAML_NAME_SPACE to avoid bringing unprefixed names into scope: this is now
the default behavior.
(Nicolás Ojeda Bär, review by Xavier Leroy)
#10902: Do not register empty code fragments in natdynlink. (David Allsopp, review by Xavier Leroy and Damien Doligez)
#10965: caml_fatal_error_hook, GC timing hooks, and
caml_scan_roots_hook are now atomic variables. Restore GC timing
hooks in multicore.
(Guillaume Munch-Maccagnoni, review by Enguerrand Decorne, Xavier
Leroy, Gabriel Scherer, and KC Sivaramakrishnan)
#11209: Add a public and thread-safe timing hook running at domain
termination, after this domain has stopped running any OCaml code:
caml_domain_terminated_hook. This can be useful for implementing
domain-local state in C.
(Guillaume Munch-Maccagnoni, review by Xavier Leroy and Gabriel
Scherer)
#10875, #11731: Add option to allocate fiber stacks and sigaltstacks with mmap(MAP_STACK) instead of malloc. This is exposed via a configure --enable-mmap-map-stack option, and is enabled by default on OpenBSD where it is mandatory. (Anil Madhavapeddy, review by Gabriel Scherer, Tom Kelly, Michael Hendricks and KC Sivaramakrishnan).
#10950: Do not use mmap to allocate Caml_state. In order to reduce virtual memory usage, we dynamically allocate the domain_state structure. (Enguerrand Decorne, KC Sivaramakrishnan and Tom Kelly, review by Anil Madhavapeddy and Gabriel Scherer)
#11010: Use strerror_r for reentrant error string conversion. (Anil Madhavapeddy and Xavier Leroy, review by same and Edwin Török)
#11002, #11066, #11086: Do not use Begin_roots/End_roots macros in the runtime system. Also fix a missing root registration in the implementation of Unix.write on Windows. (Nicolás Ojeda Bär, Daniel Bünzli and Antonin Décimo, review by Xavier Leroy and David Allsopp)
#11022: Track GC work for all managed bigarray allocations (Stephen Dolan, report by Andrew Hunter, review by Damien Doligez)
#10802: Use 4.12 value macros and helpers in C code (Antonin Décimo, review by Gabriel Scherer)
#11105: Fix handling of fiber stack cache with multiple domains (Jon Ludlam, KC Sivaramakrishnan and Tom Kelly)
#11054: Respect user provided maximum stack space Make sure the stack we initially request is sized accordingly to the user provided settings. tmc/stack_space is also updated by this PR in order to account for this change. (Enguerrand Decorne, report by Jon Ludlam, review by Tom Kelly, KC Sivaramakrishnan and Gabriel Scherer)
#11238: Increase the default limit for the stack size to 128 Mi words, i.e. 1 Gib for 64-bit platforms and 512 Mib for 32-bit platforms. (Xavier Leroy, review by Sébastien Hinderer)
#10915, #11039, #11057, #11095, #11190: Implement quality treatment for
asynchronous actions in multicore. Reimplement the old behaviour of
caml_process_pending* for multicore.
(Guillaume Munch-Maccagnoni, review by Sadiq Jaffer and Gabriel Scherer)
#11303: Ensure that GC is not invoked from bounds check failures (Stephen Dolan, review by Sadiq Jaffer and Xavier Leroy)
#11304: Fix data race on Windows file descriptors (Olivier Nicole and Xavier Leroy, review by Xavier Leroy, David Allsopp, and Sadiq Jaffer)
&Field(v, i) now has type volatile value *
instead of value * in OCaml 4. This makes the memory model
for mixed OCaml/C code better defined, but can cause warnings or type
errors in user C code.
(KC Sivaramakrishnan, review by Xavier Leroy, Gabriel Scherer and
Guillaume Munch-Maccagnoni, additional discussions with Stephen
Dolan and Luc Maranget)#5299, #4787, #11138, #11272, #11506: To help debugging, Caml_state
now dynamically checks that the domain lock is held, and fails
otherwise (with a fatal error at most entry points of the C API, or
systematically in debug mode). A new variable Caml_state_opt is
introduced, and is NULL when the domain lock is not held. This
allows to test from C code if the current thread holds the lock of
its domain.
(Guillaume Munch-Maccagnoni, review by Florian Angeletti, Damien
Doligez, Sadiq Jaffer, Xavier Leroy, and Gabriel Scherer)
#11223: The serialization format of custom blocks changed in 4.08, but the deserializer would still support the pre-4.08 format. OCaml 5.x removed support for this old format; provide a clear error message in this case. (Hugo Heuzard, review by Gabriel Scherer)
#11504, #11522: Use static allocation in caml_make_float_vect in
no-flat-float-array mode, it's more efficient and avoids a a race condition
(Xavier Leroy, report by Guillaume Munch-Maccagnoni, review by David Allsopp)
#11652: Fix benign off-by-one error in Windows implementation of caml_mem_map. (David Allsopp, review by Gabriel Scherer)
#11669, #11704: Fix construction of Effect.Unhandled exceptions in the bytecode interpreter. (David Allsopp and Xavier Leroy, report by Samuel Hym, review by Xavier Leroy and Gabriel Scherer)
Random.State.split and Random.split to "split" a PRNG off
another PRNG.
(Xavier Leroy, review by Gabriel Scherer and Hugo Heuzard)(breaking change) #10867, #11345: Remove deprecated values: Array.create, Array.make_float, Array.create_matrix, Bytes.uppercase, Bytes.lowercase, Bytes.capitalize, Bytes.uncapitalize, Char.lowercase, Char.uppercase, Filename.temp_dir_name, Int32.format, Int64.format, Nativeint.format, Format.bprintf, Format.kprintf, Format.set_all_formatter_output_functions, Format.get_all_formatter_output_functions, Format.pp_set_all_formatter_output_functions, Format.pp_get_all_formatter_output_functions, Format.pp_open_tag, Format.pp_close_tag, Format.open_tag, Format.close_tag, Format.formatter_tag_functions, Format.pp_set_formatter_tag_functions, Format.pp_get_formatter_tag_functions, Format.set_formatter_tag_functions, Format.get_formatter_tag_functions, Gc (mutability of the fields of type Gc.control), Lazy.lazy_from_fun, Lazy.lazy_from_val, Lazy.lazy_is_val, Obj.set_tag, Obj.truncate, Obj.final_tag, Obj.extension_constructor, Obj.extension_name, Obj.extension_id, Scanf.stdib, Scanf.fscanf, Scanf.kfscanf, Stdlib.( & ), Stdlib.( or ), String.set, String.copy, String.fill, String.unsafe_set, String.unsafe_fill, String.uppercase, String.lowercase, String.capitalize, String.uncapitalize, Thread.kill, Thread.wait_write, Thread.wait_read, the whole ThreadUnix module, the infix operator (.[]<-). (Nicolás Ojeda Bär, review by Damien Doligez)
(breaking change) #10896: Remove Stream, Genlex and Pervasives. Also remove legacy standalone bigarray library (the Bigarray module is now part of the standard library). (Nicolás Ojeda Bär, review by Kate Deplaix and Anil Madhavapeddy)
Random.self_init
(Michael Hendricks, review by Gabriel Scherer, Xavier Leroy, and
Anil Madhavapeddy)Thread.exit() as raising the
exception Thread.Exit, and mark Thread.exit as deprecated.
The new implementation changes the behavior compared with
the OCaml 4 implementation. For example, the new implementation
causes Fun.finally finalizers to be run and catch-all exception
handlers to prevent termination.
(Jacques-Henri Jourdan and Xavier Leroy, review by Damien Doligez,
Guillaume Munch-Maccagnoni, Gabriel Scherer, and Enguerrand Decorne)#11034: Dynlink library, add a global lock to make dynlinking thread-safe. (Florian Angeletti, review by Gabriel Scherer)
#11087: deprecate Thread.wait_timed_read, Thread.wait_timed_write, Thread.select, Thread.wait_pid. The same functionality is available in the Unix module. (Nicolás Ojeda Bär, review by Anil Madhavapeddy)
#11309, #11424, #11427, #11545: Add Domain.recommended_domain_count. (Christiano Haesbaert, Konstantin Belousov, review by David Allsopp, KC Sivaramakrishnan, Gabriel Scherer, Nicolas Ojeda Bar)
#11461, #11466: Fix gethostbyaddr for IPv6 arguments and make it domain-safe (Olivier Nicole, Nicolás Ojeda Bär, David Allsopp and Xavier Leroy, review by the same)
#11479: Make Unix.symlink domain-safe on Windows (Olivier Nicole, review by Xavier Leroy and David Allsopp)
#11024: Handle alerts in ocamldoc.
The alert [@@alert deprecated] is handled specifically and it's no longer
needed to duplicate the deprecated annotation (the alert for the compiler and
the tag for the documentation). Every other alerts also appear in the
documentation.
(Jules Aguillon, review by Florian Angeletti)
#11065: Port the bytecode debugger to 5.0, adding support for effect handlers. (Damien Doligez and @fabbing, review by @fabbing and Xavier Leroy)
#11079: Add the -nobanners option to dumpobj. (Sébastien Hinderer, review by Gabriel Scherer and Vincent Laviron)
#11100: Fix ocamltest to make sure failed tests are not counted as "unexpected error". (Damien Doligez, review by Sébastien Hinderer)
#11245: Merge the common code of ocamlcp and ocamloptp into a single module. (David Allsopp, review by Sébastien Hinderer)
#11382: OCamlmktop use a new initialization module "OCamlmktop_init" to preserve backward-compatibility with user-module provided modules that install toplevel printers. (Florian Angeletti, review by Gabriel Scherer and David Allsopp)
#11058: runtime/HACKING.adoc tips on debugging the runtime (Gabriel Scherer, review by Enguerrand Decorne and Nicolás Ojeda Bär)
#11093: Add an effect handlers tutorial (KC Sivaramakrishnan, review by François Pottier, Gabriel Scherer, François Bobot and Wiktor Kuchta)
#11192: Better documentation for condition variables. (François Pottier, review by Luc Maranget, Xavier Leroy, and Wiktor Kuchta)
#11093: Add tutorials on parallelism features and the relaxed memory model (KC Sivaramakrishnan, review by Damien Doligez, Anil Madhavapeddy, Gabriel Scherer, Thomas Leonard, Tom Ridge, Xavier Leroy, Luc Maranget, Fabrice Buoro, Olivier Nicole, Guillaume Munch-Maccagnoni, Jacques-Henri Jourdan)
#11640: Add Flambda commonly-used options to the ocamlopt manpage (Amandine Nangah, review by David Allsopp, Florian Angeletti, Sébastien Hinderer, and Vincent Laviron)
#11676: Fix missing since annotation in the Sys and Format modules
(Github user Bukolab99, review by Florian Angeletti)
#11813: Make new multicore chapters easier to discover, and emphasize impact on C bindings. (Edwin Török, review by KC Sivaramakrishnan, and Florian Angeletti)
#9140, #11131: New command-line flag -nocwd to not include implicit the current directory to the load path. (Thomas Roglin, review by Gabriel Scherer and Nicolás Ojeda Bär)
#11089: Add 'since
#10909: Disable warning 59 (assignment to immutable blocks) unless flambda invariant checks are enabled. (Vincent Laviron, review by Gabriel Scherer)
#10981, #11276: Implement a -cmi-file option for ocamlc and ocamlopt. (Sébastien Hinderer, review by Damien Doligez, Daniel Bünzli and Florian Angeletti)
#11184, #11670: Stop calling ranlib on created / installed libraries (Sébastien Hinderer and Xavier Leroy, review by the same)
#11253: Deprecate ocaml script and ocamlnat script where script has no
extension and is an implicit basename.
(David Allsopp, review by Florian Angeletti and Sébastien Hinderer)
#10878, #10909: restore flambda after the Multicore merge. (Vincent Laviron, review by Gabriel Scherer and Xavier Leroy)
#10864, #10888: restore afl-fuzz mode for sequential programs. (Jan Midtgaard, review by Xavier Leroy and Gabriel Scherer)
#11008, #11047: rework GC statistics in the Multicore runtime (Gabriel Scherer, review by Enguerrand Decorne)
#11058: basic debugging documentation in runtime/HACKING.adoc (Gabriel Scherer, review by Enguerrand Decorne and Nicolás Ojeda Bär)
#11199: Stop installing topdirs.cmi twice. The toplevel now reads topdirs.cmi from +compiler-libs, as the debugger does. (David Allsopp, review by Sébastien Hinderer)
#11007, #11399: META files for the stdlib, compiler-libs and other libraries (unix, dynlink, str, runtime_events, threads, ocamldoc) are now installed along with the compiler. (David Allsopp, Florian Angeletti, Nicolás Ojeda Bär and Sébastien Hinderer, review by Daniel Bünzli, Kate Deplaix, Anil Madhavapeddy and Gabriel Scherer)
#11092: Build native-code compilers on OpenBSD/aarch64. (Christopher Zimmermann, review by Anil Madhavapeddy)
#11126: Build system: make it possible to choose which ocamldep (and flags) to use when computing dependencies for the compiler. Add a -no-slash option to ocamldep to let users override -slash. (Sébastien Hinderer, review by David Allsopp)
#11147: Factorize the stdlib-related compilation flags. Make it possible to control them consistently through the STDLIBFLAGS build variable. Make sure ocamldoc and ocamllex get compiled and linked with debugging information (-g). (Sébastien Hinderer, review by Gabriel Scherer)
#11149: Make the bootstrap process reproducible on systems with non-big-endian floating point. If the boot/ artefacts are up-to-date, this means that running make bootstrap on any platform should not change the images in boot/ and paves the way for automated testing that the bootstrap is repeatable. (David Allsopp, review by Damien Doligez and Sébastien Hinderer)
#11160: otherlibs: merge win32unix into unix. (Sébastien Hinderer, review by David Allsopp, Nicolás Ojeda Bär, Xavier Leroy, Vincent Laviron and Antonin Décimo)
-I +lib if required, but display an alert.
(David Allsopp, review by Florian Angeletti, Nicolás Ojeda Bär,
Valentin Gatien-Baron and Sébastien Hinderer)#11200: Install ocamlprof's Profiling runtime module to a +profiling, removing it from the default namespace. (David Allsopp, review by Sébastien Hinderer)
#11294: Switch minimum required autoconf to 2.71. (David Allsopp, review by Xavier Leroy)
#11370, #11373: Don't pass CFLAGS to flexlink during configure. (David Allsopp, report by William Hu, review by Xavier Leroy and Sébastien Hinderer)
#11487: Thwart FMA test optimization during configure (William Hu, review by David Allsopp and Sébastien Hinderer)
#11097: Build native-code compilers on NetBSD/aarch64 (Kate Deplaix, review by Anil Madhavapeddy)
#10768, #11340: Fix typechecking regression when combining first class modules and GADTs. (Jacques Garrigue, report by François Thiré, review by Matthew Ryan)
#10790: don't drop variance and injectivity annotations when pretty printing
with constraints (for example, with type +!'a t = ...).
(Florian Angeletti, report by Luke Maurer, review by Matthew Ryan and
Gabriel Scherer)
#11167: Fix memory leak from signal stack. (Antoni Żewierżejew, review by Gabriel Scherer and Enguerrand Decorne)
#11112: harden -use-runtime against spaces or quotes in the provided path (Gabriel Scherer, report by Brahima Dibassi, review by David Allsopp)
#11068, #11070: Fix typo in function name given in Unix_error exception for Unix.readlink on Windows. (David Allsopp, report by Xia Li-yao)
#10807: Don't duplicate standard handles in the child process spawned by win32unix Unix.create_process if the handles were already inheritable. Fix broken signalling of EOF on standard handles if they were already inheritable. (Antonin Décimo, review by Xavier Leroy and Nicolás Ojeda Bär)
#10868: Fix off-by-1 bug when initializing frame hashtables (Jonah Beckford, review by Tom Kelly, Nicolás Ojeda Bär and KC Sivaramakrishnan)
#11077: Make dumpobj compatible with absence of naked pointer support (Olivier Nicole and Jan Midtgaard, review by Gabriel Scherer)
#11111: fix fork() usage in ocamltest C code. When calling fork() from C code with the Multicore runtime active, one needs to call caml_atfork_hook() on the forked child before it can use the OCaml runtime. (Gabriel Scherer, review by Xavier Leroy, report by Brahima Dibassi)
#10809: Use the WSA_FLAG_NO_HANDLE_INHERIT on Windows when creating sockets with WSASocket if the cloexec (non-inheritable) parameter is true. Fixes a race condition where a child process could inherit the socket and deadlock the parent. (Antonin Décimo, review by Xavier Leroy)
#11194, #11609: Fix inconsistent type variable names in "unbound type var" messages (Ulysse Gérard and Florian Angeletti, review Florian Angeletti and Gabriel Scherer)
#11204: Fix regression introduced in 4.14.0 that would trigger Warning 17 when calling virtual methods introduced by constraining the self type from within the class definition. (Nicolás Ojeda Bär, review by Leo White)
#11263, #11267: caml/misc.h: check whether _MSC_VER is defined before using
it to ensure that the headers can always be used in code which turns on
-Wundef (or equivalent).
(David Allsopp and Nicolás Ojeda Bär, review by Nicolás Ojeda Bär and
Sébastien Hinderer)
#11289, #11405: fix some leaks on systhread termination (Fabrice Buoro, Enguerrand Decorne, Gabriel Scherer, review by Xavier Leroy and Florian Angeletti, report by Romain Beauxis)
#11314, #11416: fix non-informative error message for module inclusion (Florian Angeletti, report by Thierry Martinez, review by Gabriel Scherer)
#11358, #11379: Refactor the initialization of bytecode threading, This avoids a "dangling pointer" warning of GCC 12.1. (Xavier Leroy, report by Armaël Guéneau, review by Gabriel Scherer)
#11387, module type with constraints no longer crash the compiler in presence
of both shadowing warnings and the -bin-annot compiler flag.
(Florian Angeletti, report by Christophe Raffalli, review by Gabriel Scherer)
#11392, #11392: assertion failure with -rectypes and external definitions (Gabriel Scherer, review by Florian Angeletti, report by Dmitrii Kosarev)
#11417: Fix regression allowing virtual methods in non-virtual classes. (Leo White, review by Florian Angeletti)
#11468: Fix regression from #10186 (OCaml 4.13) detecting IPv6 on Windows for mingw-w64 i686 port. (David Allsopp, review by Xavier Leroy and Sébastien Hinderer)
#11482, #11542: Fix random crash in large closure allocation (Damien Doligez, report by Thierry Martinez and Vincent Laviron, review by Xavier Leroy)
#11508, #11509: make Bytes.escaped domain-safe (Christiano Haesbaert and Gabriel Scherer, review by Xavier Leroy, report by Jan Midtgaard and Tom Kelly)
#11516, #11524: Fix the deprecated_mutable attribute.
(Chris Casinghino, review by Nicolás Ojeda Bär and Florian Angeletti)
#11576: Fix bug in Bigarray.Genarray.init in the the case of zero-dimensional arrays. (Nicolás Ojeda Bär, Jeremy Yallop, report by Masayuki Takeda, review by Jeremy Yallop and Florian Angeletti)
#11587: Prevent integer comparison from being used on pointers (Vincent Laviron, review by Gabriel Scherer)
#11622: Prevent stack overflow when printing a constructor or record mismatch error involving recursive types. (Florian Angeletti, review by Gabriel Scherer)
#11662, #11673: fix a memory leak when using Dynlink, the bug was only present in development version of OCaml 5. (Stephen Dolan, report by Andre Maroneze, review by Gabriel Scherer)
#11732: Ensure that types from packed modules are always generalised (Stephen Dolan and Leo White, review by Jacques Garrigue)
#11737: Fix segfault condition in Unix.stat under Windows in the presence of multiple threads. (Marc Lasson, Nicolás Ojeda Bär, review by Gabriel Scherer and David Allsopp)
#11776: Extend environment with functor parameters in strengthen_lazy.
(Chris Casinghino and Luke Maurer, review by Gabriel Scherer)
#11533, #11534: follow synonyms again in #show_module_type (this had stopped working in 4.14.0) (Gabriel Scherer, review by Jacques Garrigue, report by Yaron Minsky)
Feedback on this post is welcomed on Discuss!
We are pleased to announce the minor release of opam 2.1.4.
This opam release consists of backported fixes:
dose3 >= 6.1 and base64 >= 3.1.0 are now required (#5357)Opam installation instructions (unchanged):
From binaries: run
bash -c "sh <(curl -fsSL https://opam.ocaml.org/install.sh) --version 2.1.4"
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.
We are pleased to announce the minor release of opam-publish 2.2.0.
This opam-publish release consists of the following breaking change:
and the following fixes:
Additions
--as-json for the HTML renderer that emits HTML
fragments (preamble, content) together with metadata (table of contents,
breadcrumbs, whether katex is used) in JSON format. (@sabine, #908){m ... } and {math ... } tags. (@giltho, @gpetiot, #886)Bugfixes
Oops, we went looking but didn't find the changelog for this release 🙈
(??) custom prefix operator.
(#1507, fixes #1506)enclosing command result (#1512)verbosity=smart mode for type enclosing that only expand
modules' types (#1374, @ulugbekna)enclosing command (#1512)Fix status line enabled when ANSI colors are forced. (#6503, @MisterDA)
Fix build with MSVC compiler (#6517, @nojb)
Do not shadow library interface modules (#6549, fixes #6545, @rgrinberg)
Dear dune users, It is my pleasure to announce that dune 3.6.0 is now available on opam 🎉. Here's the changelog - I reused the same classification as in the previous announce for dune 3.5.0. Thanks again to all the contributors including bug reporters.
This lists features of the “dune” executable itself. Upgrading dune will bring in these changes. We consider these changes safe, but it is difficult to define what a breaking change is for a command-line tool (for example, some error messages change). It is important to note that just upgrading the dune executable is not supposed to change how dune interprets existing projects. If just upgrading dune breaks compilation, it is a bug in dune, please report it!
$ dune ocaml top-module subcommand to load modules directly without sealing them behind the signature. (#5940, @rgrinberg)$ dune external-lib-deps under $ dune describe external-lib-deps. (#6045, @moyodiallo)dune promotion group: dune promote is moved to dune promotion apply (the former still works) and the new dune promotion diff command can be used to just display the promotion without applying it. (#6160, fixes #5368, @emillon)subdir (#6404, fixes #3502, @rgrinberg)CLICOLOR and CLICOLOR_FORCE to enable/disable/force ANSI colors. (#6340, fixes #6323, @MisterDA)._build/.rpc/dune on windows to allow rpc clients to connect using the build directory. (#6329, @rgrinberg)This lists changes if you opt into the new (lang dune 3.6) version in your dune-project file. For this too, these are changes that we consider safe, but they can require changes to your dune files. For example, sandboxing is enabled in more places, which means that you might have to be more precise in expressing your dependencies. Please reach out on the issue tracker if you have trouble fixing your dune file or if something does not seem to be possible anymore.
(glob_files <glob>) and (glob_files_rec <glob>) terms to the files field of the install stanza (#6250, closes #6018, @gridbugs)Byte_complete binaries to be installable (#4837, @AltGr, @rgrinberg):standard in the (modules) field of the coq.pp stanza (#6229, fixes #2414, @Alizter)(deps %{bin:...}) (#6326, @anmonteiro)(package ..) set from depending on private libraries that don't belong to a package (#6385, fixes #6153, @rgrinberg)pkg-config because we aren't tracking its external dependencies (#6052, @rgrinberg)Fix random requests failing after switching documents (#904, fixes #898)
Do not offer related diagnostic information unless the user enables in client capabilities (#905)
Do not offer diagnostic tags unless the client supports them (#909)
Do not attach extra data to diagnostics unless the client supports this (#910)
Use /bin/sh instead of /bin/bash. This fixes ocamllsp on NixOS
Fix various server crashes when opening non OCaml/Reason files. Files such as dune, cram, etc. would cause the server to crash. (#884, fixes #871)
Ignore unknown tags in merlin configuration to improve forward compatibility with Dune. (#883)
I'd like to announce the release of dune 3.5.0 on opam. This release is packed with fixes and new features, that are described below with a description of what this means for project maintainers.
This lists features of the "dune" executable itself. Upgrading dune will bring in these changes. We consider these changes safe, but it is difficult to define what a breaking change is for a command-line tool (for example, some error messages change). It is important to note that just upgrading the dune executable is not supposed to change how dune interprets existing projects. If just upgrading dune breaks compilation, it is a bug in dune, please report it!
clear-on-rebuild-and-flush-history (#6065, @rgrinberg)(license) (#6114,
fixes #6103, @emillon)(promote (until-clean)) when
--ignore-promoted-rules (or -p) is passed. (#6010, fixes #4401, @emillon)dune ocaml. (#6038, @emillon,
#6169, @shonfeder)This is technically a subset of above section. For M1 mac users, dune 3.5.0 is the first version which will correctly support dune-build-info.
This lists changes if you opt into the new (lang dune 3.5) version in your dune-project file. For this too, these are changes that we consider safe, but they can require changes to your dune files. For example, sandboxing is enabled in more places, which means that you might have to be more precise in expressing your dependencies. Please reach out on the issue tracker if you have trouble fixing your dune file or if something does not seem to be possible anymore.
runtime_deps field in the cinaps stanza to specify runtime
dependencies for running the cinaps preprocessing action (#6175, @rgrinberg)dirs field in the install stanza to install entire
directories (#5097, fixes #5059, @rgrinberg)(include <file>) term to the include_dirs field for adding
directories to the include paths sourced from a file. (#6058, fixes #3993,
@gridbugs)(extra_objects ...) field in (executable ...) and (library ...) stanzas (#6084, fixes #4129, @gridbugs)mode_specific_stubs that allows the
specification of different flags and sources for foreign stubs depending on
the build mode (#5649, @voodoos)Foo__ when building a library Foo (#6126, @rgrinberg)ODOC_SYNTAX and will rerun accordingly (#6010, fixes
#1117, @emillon)These changes, associated with (lang dune 3.5), are specific to coq.
%{coq:...} macro for accessing data about the configuration about Coq.
For instance %{coq:version} (#6049, @Alizter)(stdlib no).
(#6165 #6164, fixes #6163, @ejgallego @Alizter @LasseBlaauwbroek)Findlib).(coq.theory ...) stanza will now ensure that for each declared (plugin ...), the META file for it is built before calling coqdep. This enables
the use of the new Findlib-based loading method in Coq 8.16; however as of
Coq 8.16.0, Coq itself has some bugs preventing this to work yet. (#6167 ,
workarounds #5767, @ejgallego)On behalf of the ocamllsp team, I'm pleased to announce version 1.14.0. This release contains a new code action to help you inline definitions thanks to @jfeser. We look forward to your feedback.
Code action for inlining let bindings within a module or expression. (#847)
Tag "unused code" and "deprecated" warnings, allowing clients to better display them. (#848)
Refresh merlin configuration after every dune build in watch mode (#853)
Respect showDocument capabilities. Do not offer commands or code actions
that rely on this request without client support. (#836)
Fix signatureHelp on .mll files: avoid "Document.dune" exceptions
esequence right-associative. (#366, @ceastlund)Deriving.Generator (#368, @sim642).ml, .mli, etc.) (#795)On behalf of the dune team, I’m pleased to announce the release of version 3.4.0.
Bug fixes, a couple new features, better hints and error messages - I won't restate what's in the changelog below. Thanks to everyone involved in this release!
Make dune describe correctly handle overlapping implementations
for virtual libraries (#5971, fixes #5747, @esope)
Building the @check alias should make sure the libraries and executables
don't have dependency cycles (#5892, @rgrinberg)
[ctypes] Add support for the errno parameter using the errno_policy field
in the ctypes settings. (#5827, @droyo)
Fix dune coq top when it is invoked on files from a subdirectory of the
directory containing the associated stanza (#5784, fixes #5552, @ejgallego,
@rlepigre, @Alizter)
Fix hint when an invalid module name is found. (#5922, fixes #5273, @emillon)
The (cat) action now supports several files. (#5928, fixes #5795, @emillon)
Dune no longer uses shimmed META files for OCaml 5.x, solely using the ones
installed by the compiler. (#5916, @dra27)
Fix handling of the (deps) field in (test) stanzas when there is an
.expected file. (#5952, #5951, fixes #5950, @emillon)
Ignore insignificant filesystem events. This stops RPC in watch mode from
flashing errors on insignificant file system events such as changes in the
.git/ directory. (#5953, @rgrinberg)
Fix parsing more error messages emitted by the OCaml compiler. In particular, messages where the excerpt line number started with a blank character were skipped. (#5981, @rgrinberg)
env stanza: warn if some rules are ignored because they appear after a wildcard rule. (#5898, fixes #5886, @emillon)
On Windows, XDG_CACHE_HOME is taken to be the FOLDERID_InternetCache if
unset, and XDG_CONFIG_HOME and XDG_DATA_HOME are both taken to be
FOLDERID_LocalAppData if unset. (#5943, fixes #5808, @nojb)
odoc-parser.2.0.0 (#2123, @gpetiot)
odoc-parser{m ...} available in doc-comments{math ...} available in doc-commentsAllow cancellation of workspace symbols requests (#777)
Fix unintentionally interleaved jsonrpc IO that would corrupt the session (#786)
Ignore SIGPIPE . (#788)
Fix a bad interaction between inferred interfaces and promotion code actions in watch mode (#753)
Fix URI parsing (#739 fixes #471 and #459)
bench binary is not distributed anymore to avoid name collisions (#2104, @gpetiot)indicate-multiline-delimiters (#2116, @gpetiot).ocp-indent files (#2103, @gpetiot)max-indent = 2 (#2099, @gpetiot)| under keyword instead of parenthesis (#2102, @gpetiot)Oops, we went looking but didn't find the changelog for this release 🙈
lwt_logsAdditions
Bugs fixed
val x : #c) (@jonludlam, #809)merlin-lib package that exposes merlin's internals and the merlin
package with the frontend. (#1448, #1455, #1457, #1497, @rgrinberg,
@tmattio, @kit-ty-kate)Seq-based API of Yojson 2.0, avoiding the need for the
deprecated Stream module (#1475 by @Leonidas-from-XIV)MERLIN_LOG (#1480 by @ulugbekna)type-enclosing results (#1483, fixes #1477)core_type (#1484)merlin-locate optional, both for
consistency with Emacs convention and for backwards compatibility. (#1476,
@antalsz)