We're happy to announce Utop 2.15.0 which adds support for OCaml 5.3.0!
OCaml Changelog
RSSOfficial stable release announcements and updates from the OCaml compiler, OCaml infrastructure and the OCaml Platform Tools.
We're pleased to announce the release of OCaml LSP Server 1.22.0, which enables experimental project-wide renaming of identifiers!
Merlin 5.4-503 is now available with support for OCaml 5.3. This release leverages new features in OCaml 5.3 to improve locate behavior, resolving issues where Merlin previously confused unique identifiers from interfaces and implementations. The indexer has been optimized to perform fewer merges, and initial support for project-wide renaming has been added, allowing occurrences to return all usages of related definitions across a project.
The Vim plugin receives an enhancement with search-by-type functionality, accessible through the existing :MerlinSearch command. The command now automatically switches between search-by-type and polarity search based on the first character of the query.
See full changelog
- merlin binary
- Support for OCaml 5.3
- Use new 5.3 features to improve locate behavior in some cases. Merlin no
longer confuses uids from interfaces and implementations. (#1857) - Perform less merges in the indexer (#1881)
- Add initial support for project-wide renaming: occurrences can now return
all usages of all related definitions. (#1877)
- vim plugin
- Added support for search-by-type (#1846)
This is exposed through the existing:MerlinSearchcommand, that
switches between search-by-type and polarity search depending on the
first character of the query.
- Added support for search-by-type (#1846)
OCaml LSP Server version 1.21.0 is now available. This release introduces a new server option called standardHover that allows clients to disable the default hover provider functionality.
See full changelog
Features
- Add a new server option
standardHover, that can be used by clients to
disable the default hover provider. WhenstandardHover = false
textDocument/hoverrequests always returns with empty result. (#1416)
We’re happy to announce that we just released ppxlib.0.34.0.
The full patch notes are available on the release page over here.
The main features are OCaml 5.3 compatibility, new AST pretty-printing utilities and the ppxlib-tools package, support for [@@deriving ...] on class types and the addition of missing Pprintast entry points.
Changes summary
5.3 compatibility
ppxlib.0.34.0 is the first official ppxlib release that’s compatible with the new 5.3 compiler.
The ppxlib driver now also comes with a -keywords CLI option, similar to the compiler’s that allow you to compile and preprocess with the 5.3 compiler code that uses effect as an identifier. This is pretty niche but it’s there should you need it.
Please note that means you can use ppx-es with a 5.3 compiler but not that ppx-es can consume/produce 5.3 language features. We’re currently working on a fix allowing you to use the effect syntax in files that require preprocessing as it’s not possible with 0.34.0. The fix should be released in the next few days as 0.34.1.
AST pretty-printing
We added a new Pp_ast module that allows you to pretty print AST fragments.
The only way ppxlib would print ASTs before were as S-expressions. In practice we found that it was not always helpful and wanted a more readable and human friendly way of displaying the AST.
The default output of those printer is a simplified version of the AST to keep things clear and avoid cluttering the output with information that is not always useful. For example, if you run Ppxlib.Pp_ast.Default.expression on the AST for x + 2, you’ll get the following:
Pexp_apply
( Pexp_ident (Lident "+")
, [ ( Nolabel, Pexp_ident (Lident "x"))
; ( Nolabel, Pexp_constant (Pconst_integer ( "2", None)))
]
)
The alert reader will note that there are no locations or attributes and that the expression record layer is omitted here.
You can of course configure the printer to display more information if you need to.
We’ve been using these new printers internally to debug migration code and they have been a huge help so we hope they will make working with ppxlib easier for you too.
In addition to this new module, we also added a command line utility called ppxlib-pp-ast to pretty print ASTs from source files, source code fragments or even marshalled AST files. It is very similar to the old ppx_tools’s dumpast.
Note that it will print ppxlib’s internal AST after it’s been migrated from the installed compiler’s version. This is something that we could not simply achieve with OCaml’s own -dparsetree.
This should be a useful tool for debugging ppx related bugs or learning about the AST and we hope ppx authors and users will like it.
Other changes
As mentioned above, we also added some missing Pprintast* entries such as binding, longident and payload.
It is now possible to use [@@deriving ...] on class type declarations and therefore to write derivers for class types.
*: To the confused readers: Pprintast is entirely different from Pp_ast mentioned above as it prints the source code corresponding to a given AST.
Special thanks
We wanted to thank our external contributors for this release: @hhugo, @nojb and @dra27 for their help on the 5.3 compat and @mattiasdrp for bringing the Pprintast module up to speed.
Special thanks as well to @pedrobslisboa who started integrating their excellent ppx-by-example into ppxlib’s documentation.
Finally, I’d also like to thank the OCaml Software Foundation who’s been funding all my work on ppxlib and made this release possible!
Happy preprocessing to you all!
See full changelog
-
Add initial OCaml 5.3 support (#487, @NathanReb, @hhugo, @nojb)
-
Initialise OCaml 5.3's lexer with the
keywordssetting fromOCAMLPARAMor the new-keywordsdriver's CLI option to allow the standalone ppx driver to process old packages usingeffectas an identifier (#535, @dra27, @NathanReb) -
Add
Pprintast.binding,longidentandpayload(#542, @mattiasdrp) -
Fix
deriving_inlineround-trip check so that it works with 5.01 <-> 5.02 migrations (#519, @NathanReb) -
Add ppxlib's AST pretty-printing utilities in
Ppxlib.Pp_astand appxlib-pp-astexecutable in a new separateppxlib-toolspackage (#517, #525, #537, @NathanReb) -
Change
-dparsetreefrom a sexp output to a pretty printed AST, closer to what the compiler's-dparsetreeis. (#530, @NathanReb) -
Add Parsetree documentation comments to
Ast_builderfunctions (#518, @patricoferris) -
Support class type declarations in derivers with the new, optional arguments
{str,sig}_class_type_declinDeriving.add(#538, @patricoferris)
We are excited to share the release of OCaml-LSP 1.20.1, which introduces powerful new features and vital bug fixes to improve your development workflow. The new typeSearch request allows you to find values by type signature or polarity, making it easier to locate the functionality you need. Configurable MerlinJump actions and the custom jump request give you more control over code navigation. On the bug fix side, we have tackled issues like file descriptor leaks, enhanced method completion, and cleaned up duplicate responses in selectionRange.
See full changelog
Features
- Add custom
ocamllsp/typeSearchrequest (#1369) - Make MerlinJump code action configurable (#1376)
- Add custom
ocamllsp/jumprequest (#1374)
Fixes
- Deactivate the jump code actions by default. Clients can enable them with the
merlinJumpCodeActionsconfiguration option. Alternatively, a custom request is provided for ad hoc use of the feature. (#1411) - Fix FD leak in running external processes for preprocessing (#1349)
- Fix prefix parsing for completion of object methods (#1363, fixes #1358)
- Remove some duplicates in the
selectionRangeanswers (#1368)
This release introduces Merlin 5.3-502, compatible with OCaml 5.2, and 4.18-414, compatible with OCaml 4.14. Key updates include EXCLUDE_QUERY_DIR for better file management, resolving exceptions in polarity search,
and stabilizing type-enclosing results. For users of 5.3-502, additional enhancements address path resolution issues, fixes jump to fun functionality, and ensure proper handling of occurrences from hidden source files.
See full changelog
-
merlin binary
-
merlin binary (only in 5.3-502)
The Dune team is happy to announce the release of Dune 3.17.1!
This patch release includes some bug fixes. To reduce computing time, it does
not build .cmxs files anymore when the (no_dynlink) stanza is used instead.
This behavior also corrects the semantic of the (no_dynlink) stanza which was
building but not installing .cmxs files. It does not try to build and install them anymore.
See full changelog
Fixed
-
When a library declares
(no_dynlink), then the.cmxsfile for it is no longer built. (#11176, @nojb) -
Fix bug that could result in corrupted file copies by Dune, for example when using the
copy_files#stanza or thecopy#action. (@nojb, #11194, fixes #11193) -
Remove useless error message when running
$ dune substin empty projects. (@rgrinberg, #11204, fixes #11200)
CHANGES:
Added
- Support OCaml 5.3 (#457, @anmonteiro, @samoht, @voodoos)
- Support multiple version labels in block headers. The block is active if all
the version formulaes are satisfied (#458, @samoht)
Fixed
- Avoid infinite loop in lexer on unclosed code block (#444, @edwintorok)
- Fix support for skipped blocks in mli and mld files (#462, @samoht)
We're happy to announce the release of opam-publish 2.5.0!
See full changelog
- Add a new
--pre-releaseargument adding the necessary flags and availibility formula for pre-releases [#164 @kit-ty-kate]
After almost a year of work, OCamlformat 0.27.0 is finally available with support for 5.3 syntax!
This release includes the new function syntax from OCaml 5.2, the effect
keyword from OCaml 5.3 and a large number of bug fixes and improvements.
An other notable change, is that comments are now formatted by default.
See full changelog
Highlight
-
* Support OCaml 5.2 syntax (#2519, #2544, #2590, #2596, #2621, #2628, @Julow, @EmileTrotignon, @hhugo) This includes local open in types, raw identifiers, and the new representation for functions. This might change the formatting of some functions due to the formatting code being completely rewritten.
-
Support OCaml 5.3 syntax (#2609, #2610, #2611, #2622, #2623, #2562, #2624, #2625, #2627, @Julow, @Zeta611) This adds support for effect patterns, short functor type arguments and utf8 identifiers. To format code using the new
effectsyntax, add this option to your.ocamlformat:ocaml-version = 5.3 -
Documentation comments are now formatted by default (#2390, @Julow) Use the option
parse-docstrings = falseto restore the previous behavior. -
* Consistent indentation of polymorphic variant arguments (#2427, @Julow) Increases the indentation by one to make the formatting consistent with normal variants. For example:
... (* before *) (`Msg (foo bar)) (* after *) (`Msg (foo bar)) -
Build on OCaml 5.3 (#2603, @adamchol, @Julow)
Added
-
Improve the emacs plugin (#2577, #2600, @gridbugs, @thibautbenjamin) Allow a custom command to be used to run ocamlformat and add compatibility with emacs ocaml tree-sitter modes.
-
Added option
let-binding-deindent-fun(#2521, @henrytill) to control the indentation of thefunin:let f = fun foo -> bar -
Added back the flag
--disable-outside-detected-project(#2439, @gpetiot) It was removed in version 0.22. -
Support newer Odoc syntax (#2631, #2632, #2633, @Julow)
Changed
-
* Consistent formatting of comments (#2371, #2550, @Julow) This is mostly an internal change but some comments might be formatted differently.
-
* Improve formatting of type constraints with type variables (#2437, @gpetiot) For example:
let f : type a b c. a -> b -> c = ... -
* Improve formatting of functor arguments (#2505, @Julow) This also reduce the indentation of functor arguments with long signatures.
-
Improvements to the Janestreet profile (#2445, #2314, #2460, #2593, #2612, @Julow, @tdelvecchio-jsc)
-
* Undo let-bindings and methods normalizations (#2523, #2529, @gpetiot) This remove the rewriting of some forms of let-bindings and methods:
let f x = (x : int)is no longer rewritten intolet f x : int = xlet f (type a) (type b) ...is no longer rewritten intolet f (type a b) ...let f = fun x -> ...is no longer rewritten intolet f x = ...
-
* The
break-colonoption is now taken into account for method type constraints (#2529, @gpetiot) -
* Force a break around comments following an infix operator (fix non-stabilizing comments) (#2478, @gpetiot) This adds a line break:
a || (* this comment is now on its own line *) b
Fixed
- Fix placement of comments in some cases (#2471, #2503, #2506, #2540, #2541, #2592, #2617, @gpetiot, @Julow) Some comments were being moved or causing OCamlformat to crash. OCamlformat refuses to format if a comment would be missing in its output, to avoid loosing code.
- Fix attributes being dropped or moved (#2247, #2459, #2551, #2564, #2602, @EmileTrotignon, @tdelvecchio-jsc, @Julow)
OCamlformat refuses to format if the formatted code has a different meaning than the original code, for example, if an attribute is removed.
We also try to avoid moving attributes even if that doesn't change the original code, for example we no longer format
open[@attr] Masopen M [@@attr]. - Remove trailing space inside a wrapping empty signature (#2443, @Julow)
- Fix extension-point spacing in structures (#2450, @Julow)
- * Consistent break after string constant argument (#2453, @Julow)
- * Fix cinaps comment formatting to not change multiline string contents (#2463, @tdelvecchio-jsc)
- * Fix the indentation of tuples in attributes and extensions (#2488, @Julow)
- * Fix weird indentation and line breaks after comments (#2507, #2589, #2606, @Julow)
- * Fix unwanted alignment in if-then-else (#2511, @Julow)
- Fix missing parentheses around constraint expressions with attributes (#2513, @alanechang)
- Fix formatting of type vars in GADT constructors (#2518, @Julow)
- Fix
[@ocamlformat "disable"]in some cases (#2242, #2525, @EmileTrotignon) This caused a bug insideclass typeconstructs and when attached to alet ... in - Display
a##binstead ofa ## band similarly for operators that start with # (#2580, @v-gb) - * Fix arrow type indentation with
break-separators=before(#2598, @Julow) - Fix missing parentheses around a let in class expressions (#2599, @Julow)
- Fix formatting of paragraphs in lists in documentation (#2607, @Julow)
- Avoid unwanted space in references and links text in documentation (#2608, @Julow)
- * Improve the indentation of attributes in patterns (#2613, @Julow)
- * Avoid large indentation in patterns after
let%ext(#2615, @Julow)
We're happy to announce the release of Dune 3.17.0.
Among the list of chances, this release enables the Dune cache by default for
known-safe operations, adds support for Wasm_of_ocaml, adds support for the
-H compiler flag introduced in OCaml 5.2 and allows specifying code hosting
services like Codeberg or Gitlab organizations.
See full changelog
Fixed
-
Show the context name for errors happening in non-default contexts. (#10414, fixes #10378, @jchavarri)
-
Correctly declare dependencies of indexes so that they are rebuilt when needed. (#10623, @voodoos)
-
Don't depend on coq-stdlib being installed when expanding variables of the
coq.versionfamily (#10631, fixes #10629, @gares) -
Error out if no files are found when using
copy_files. (#10649, @jchavarri) -
Re_export dune-section private library in the dune-site library stanza, in order to avoid failure when generating and building sites modules with implicit_transitive_deps = false. (#10650, fixes #9661, @MA0100)
-
Expect test fixes: support multiple modes and fix dependencies when there is a custom runner (#10671, @vouillon)
-
In a
(library)stanza with(extra_objects)and(foreign_stubs), avoid double linking the extra object files in the final executable. (#10783, fixes #10785, @nojb) -
Map
(re_export)library dependencies to theexportsfield inMETAfiles, and vice-versa. This field was proposed in to https://discuss.ocaml.org/t/proposal-a-new-exports-field-in-findlib-meta-files/13947. The field is included in Dune-generatedMETAfiles only when the Dune lang version is >= 3.17. (#10831, fixes #10830, @nojb) -
Fix staged pps preprocessors on Windows (which were not working at all previously) (#10869, fixes #10867, @nojb)
-
Fix
dune describewhen an executable is disabled withenabled_if. (#10881, fixes #10779, @moyodiallo) -
Fix an issue where C stubs would be rebuilt whenever the stderr of Dune was redirected. (#10883, fixes #10882, @nojb)
-
Fix the URL opened by the command
dune ocaml doc. (#10897, @gridbugs) -
Fix the file referred to in the error/warning message displayed due to the dune configuration version not supporting a particular configuration stanza in use. (#10923, @H-ANSEN)
-
Fix
enabled_ifwhen it usesenvvariable. (#10936, fixes #10905, @moyodiallo) -
Fix exec -w for relative paths with --root argument (#10982, @gridbugs)
-
Do not ignore the
(locks ..)field in thetestandtestsstanza (#11081, @rgrinberg) -
Tolerate files without extension when generating merlin rules. (#11128, @anmonteiro)
Added
-
Make Merlin/OCaml-LSP aware of "hidden" dependencies used by
(implicit_transitive_deps false)via the-Hcompiler flag. (#10535, @voodoos) -
Add support for the -H flag (introduced in OCaml compiler 5.2) in dune (requires lang versions 3.17). This adaptation gives the correct semantics for
(implicit_transitive_deps false). (#10644, fixes #9333, ocsigen/tyxml#274, #2733, #4963, @MA0100) -
Add support for specifying Gitlab organization repositories in
sourcestanzas (#10766, fixes #6723, @H-ANSEN) -
New option to control jsoo sourcemap generation in env and executable stanza (#10777, fixes #10673, @hhugo)
-
One can now control jsoo compilation_mode inside an executable stanza (#10777, fixes #10673, @hhugo)
-
Add support for specifying default values of the
authors,maintainers, andlicensestanzas of thedune-projectfile via the dune config file. Default values are set using the(project_defaults)stanza (#10835, @H-ANSEN) -
Add names to source tree events in performance traces (#10884, @jchavarri)
-
Add
codebergas an option for defining project sources in dune-project files. For example,(source (codeberg user/repo)). (#10904, @nlordell) -
dune runtestcan now run individual tests withdune runtest mytest.t(#11041, @Alizter). -
Wasm_of_ocaml support (#11093, @vouillon)
-
Add a
coqdep_flagsfield to thecoqfield of theenvstanza, and to thecoq.theorystanza, allowing to configurecoqdepflags. (#11094, @rlepigre)
Changed
-
Remove all remnants of the experimental
patch-back-source-tree. (#10771, @rgrinberg) -
Change the preset value for author and maintainer fields in the
dune-projectfile to encourage including emails. (#10848, @punchagan) -
Tweak the preset value for tags in the
dune-projectfile to hint at topics not having a special meaning. (#10849, @punchagan) -
Change some colors to improve readability in light-mode terminals (#10890, @gridbugs)
-
Forward the linkall flag to jsoo in whole program compilation as well (#10935, @hhugo)
-
Configurator uses
pkgconfas pkg-config implementation when available and forwards it thetargetofocamlc -config. (#10937, @pirbo) -
Enable Dune cache by default. Add a new Dune cache setting
enabled-except-user-rules, which enables the Dune cache, but excludes user-written rules from it. This is a conservative choice that can avoid breaking rules whose dependencies are not correctly specified. This is the current default. (#10944, #10710, @nojb, @ElectreAAS) -
Do not add
dunedependency indune-projectwhen creating projects withdune init proj. The Dune dependency is implicitely added when generating opam files (#11129, @Leonidas-from-XIV)
Feedback on this post is welcomed on Discuss!
As mentioned in our talk at the OCaml Workshop 2024, we decided to switch to a time-based release cycle (every 6 months), starting with opam 2.3.
As promised, we are very pleased to announce the release of opam 2.3.0, and encourage all users to upgrade. Please read on for installation and upgrade instructions.
Try it!
In case you plan a possible rollback, you may want to first backup your
~/.opam or $env:LOCALAPPDATA\opam directory.
The upgrade instructions are unchanged:
- Either from binaries: run
For Unix systems
bash -c "sh <(curl -fsSL https://opam.ocaml.org/install.sh)"
or from PowerShell for Windows systems
Invoke-Expression "& { $(Invoke-RestMethod https://opam.ocaml.org/install.ps1) }"
or download manually from the Github "Releases" page to your PATH.
- Or from source, manually: see the instructions in the README.
You should then run:
opam init --reinit -ni
Major breaking change: extra-files
When loading a repository, opam now ignores files in packages' files/ directories which aren't listed in the extra-files field of the opam file.
This was done to simplify the opam specification where we hope the opam file to be the only thing that you have to look at when reading a package specification. It being optional to list all files in the extra-files: field went against that principle. This change also reduces the surface area for potential file corruption as all extra-files must have checksums.
This is a breaking change and means that if you are using the files/ directory without listing them in the extra-files: field, you need to make sure that all files in that directory are included in the extra-files field.
The resulting opam file remains compatible with all previous opam 2.x releases.
If you have an opam repository, you should make sure all files are listed so every packages continues to work without any issue, which can be done automatically using the opam admin update-extrafiles command.
Major changes
-
Packages requiring an unsupported version of opam are now marked unavailable, instead of causing a repository error. This means an opam repository can now allow smoother upgrade in the future where some packages can require a newer version of opam without having to fork the repository to upgrade every package to that version as was done for the upgrade from opam 1.2 to 2.0
-
Add a new
opam list --latests-onlyoption to list only the latest versions of packages. Note that this option respects the order options were given on the command line. For example:--available --latests-onlywill first list all the available packages, then choose only the latest packages in that set; while--latests-only --availablewill first list all the latest packages, then only show the ones that are available in that set -
Fix and improve
opam install --check, which now checks if the whole dependency tree of the package is installed instead of only the root dependencies -
Add a new
--verbose-onoption to enable verbose output for specified package names. Thanks to @desumn for this contribution -
Add a new
opam switch import --deps-onlyoption to install only the dependencies of the root packages listed in the opam switch export file -
opam switch list-availableno longer displays compilers flagged withavoid-version/deprecatedunless--allis given, meaning that pre-release or unreleased OCaml packages no longer appear to be the latest version -
opam switch create --repositoriesnow correctly infers--kind=gitfor URLs ending with.gitrather than requiring thegit+https://protocol. This is consistant with other commands such asopam repository add. Thanks to @Keryan-dev for this contribution -
opam switch set-invariantnow displays the switch invariant using the same syntax as the--formulaflag -
The
builtin-0installsolver was improved and should now be capable of being your default solver instead ofbuiltin-mccs+glpk. It was previously mostly only suited for automated tasks such as Continuous Integration. If you wish to give it a try, simply callingopam option solver=builtin-0install(callopam option solver=restores the default) -
Most of the unhelpful conflict messages were fixed. (#4373)
-
Fix an opam 2.1 regression where the initial pin of a local VCS directory would store untracked and ignored files. Those files would usually be cleaned before building the package, however git submodules would not be cleaned and would cause issues when paired with the new behaviour added in 2.3.0~alpha1 which makes opam error when git submodules fail to update (it was previously a warning). (#5809)
-
Fix the value of the
archvariable when the current OS is 32bit on a 64bit machine (e.g. Raspberry Pi OS). (#5949) -
opam now fails when git submodules fail to update instead of ignoring the error and just showing a warning
-
opam's libraries now compile with OCaml >= 5.0 on Windows
-
Fix the installed packages internal cache, which was storing the wrong version of the opam file after a build failure. This could be triggered easily for users with custom repositories with non-populated extra-files. (#6213)
-
Several improvements to the pre-built release binaries were made:
- The Linux binaries are now built on Alpine 3.20
- The FreeBSD binary is now built on FreeBSD 14.1
- The OpenBSD binary is now built on OpenBSD 7.6 and loses support for OpenBSD 7.5 and earlier
- Linux/riscv64 and NetBSD/x86_64 binaries are now available
And many other general, performance and UI improvements were made and bugs were fixed. You can take a look to previous blog posts. API changes and a more detailed description of the changes are listed in:
- the release note for 2.3.0~alpha1
- the release note for 2.3.0~beta1
- the release note for 2.3.0~beta2
- the release note for 2.3.0~rc1
- the release note for 2.3.0
This release also includes PRs improving the documentation and improving and extending the tests.
Please report any issues to the bug-tracker.
We hope you will enjoy the new features of opam 2.3!
We're happy to announce the release of Dune 3.16.1.
This is a patch release that fixes an issue with OCaml.5.3.0 and C++ flags.
See full changelog
Fixed
- Call the C++ compiler with
-std=gnu++11when using OCaml >= 5.0 (#10962, @kit-ty-kate)Added
We are happy to announce the joint release of Merlin 5.2.1-502 and 4.17.1. This release adds many new features to Merlin including the ability to add hints to a source tree, serch for values using a type signature and expanding PPX annotations to preview their source code. There are also bug fixes for both the Merlin binary and editor modes.
More information can be found in the Discuss announcement.
Contributions are always welcome at Merlin | Issues
See full changelog
- merlin binary
- A new WRAPPING_PREFIX configuration directive that can be used to tell Merlin what to append to the current unit name in the presence of wrapping (ocaml/merlin#1788)
- Add
-unboxed-typesand-no-unboxed-typesas OCaml ignored flags (ocaml/merlin#1795, fixes ocaml/merlin#1794) - Destruct: Refinement in the presence of optional arguments (ocaml/merlin#1800 ocaml/merlin#1807, fixes ocaml/merlin#1770)
- Implement new
expand-nodecommand for expanding PPX annotations (ocaml/merlin#1745) - Implement new
inlay-hintscommand for adding hints on a source tree (ocaml/merlin#1812) - Implement new
search-by-typecommand for searching values by types (ocaml/merlin#1828) - Canonicalise paths in occurrences. This helps deduplicate the results and
- Show more user-friendly paths. (ocaml/merlin#1840)
- Fix
dot-merlin-readerignoring SOURCE_ROOT and STDLIB directives (ocaml/merlin#1839, ocaml/merlin#1803)
- editor modes
- Vim:
- Fix Python-3.12 syntax warnings in
merlin.py(ocaml/merlin#1798) - Dead code / doc removal for previously deleted MerlinPhrase command (ocaml/merlin#1804)
- Fix Python-3.12 syntax warnings in
- Emacs:
- Improve the way that result of polarity search is displayed (#1814)
- Add
merlin-search-by-type,merlin-search-by-polarityand change the behaviour ofmerlin-searchto switch between by-type or by-polarity depending on the query (ocaml/merlin#1828)
- Vim:
We're happy to announce the release of Odoc 2.4.3!
This release includes three key fixes: we restored missing KaTeX headers for proper mathematical rendering, resolved an issue where ][ characters in code blocks were incorrectly interpreted as "code blocks with result" (now requiring explicit delimiters), and corrected the misprinting of type variables from ML files in OCaml 4.14 and later versions where multiple instances of the same type variable could be displayed with different names.
See full changelog
Fixed
- Fix missing katex headers (@panglesd, #1096)
- Allow
][in code blocks, fixing issue #1137 (@Julow, #1149)
This was interpreted as "code blocks with result", which now mandates a
delimiter:{delim@lang[ code ]delim[ result ]} - Fix misprinting of type variables from ml files for OCaml 4.14 and later
(multiple occurences of the same type variable could be named differently)
(@Octachron, #1173)
Feedback on this post is welcomed on Discuss!
We are pleased to announce the release of opam 2.2.1.
We've fixed a couple of regressions and would like to encourage users of opam 2.2 to upgrade.
Changes
The three main changes are:
- Fixe a regression in
opam install --deps-onlywhere the direct dependencies were not set as root packages (spotted in the wild by @rjbou and also reported on Discuss) - Fix a regression when fetching Git packages where the resulting Git repository could lead to unexpected outputs of Git commands, by disabling shallow clone by default except when fetching opam repositories (#6145)
- Mitigate curl/curl#13845 by falling back from
--write-outto--failif exit code 43 is returned by Curl. In particular, this fixesopam initwhen run fromcmd/PowerShellon Windows 11 23H2 (#6120)
A couple more improvements and additions to the testsuite were made. You can view the full list of changes in the release note.
Try it!
The upgrade instructions are unchanged:
- Either from binaries: run
For Unix systems
bash -c "sh <(curl -fsSL https://opam.ocaml.org/install.sh) --version 2.2.1"
or from PowerShell for Windows systems
Invoke-Expression "& { $(Invoke-RestMethod https://opam.ocaml.org/install.ps1) }"
(or via winget upgrade OCaml.opam) or download manually from the Github "Releases" page to your PATH.
- Or from source, manually: see the instructions in the README.
You should then run:
opam init --reinit -ni
Please report any issues to the bug-tracker.
Happy hacking!
We're happy to announce the release of opam-publish 2.4.0!
See full changelog
- Add
--excludeto exclude the given packages from the publishing process [#161 @kit-ty-kate]
We are pleased to announce the release of OCaml LSP 1.19.0. This version brings official support for OCaml 5.2. It also includes a new custom query to get
documentation and a fix regarding the handling of OCamlFormat processes.
See full changelog
Features
- Add custom
ocamllsp/getDocumentationrequest (ocaml/ocaml-lsp#1336) - Add support for OCaml 5.2 (ocaml/ocaml-lsp#1233)
Fixes
- Kill unnecessary OCamlFormat processes with
sigtermrather thansigintorsigkill(ocaml/ocaml-lsp#1343)
The Ppxlib dev team is happy to announce the release of ppxlib.0.33.0.
This release's main feature is a series of improvement to flags controlling
unused value/module/type warnings silencing.
The ppxlib driver generates warning silencing items to prevent [@@deriving ...]
generated code to trigger unused code warnings. Three warnings are disabled that
way:
- Warning 32: unused value
- Warning 60: unused module
- Warning 34: unused type
The first two are disabled for values and modules generated by the deriver while
the third is disabled for the types in the type declaration to which the
[@@deriving ...]attribute is attached. This feature was added a long time ago to avoid manually disabling those warnings when working with derivers that generate a set of values and modules only to use a subset of those. Alternatively, the unused type warning silencing was added to allow defining an alias type only to be consumed by a deriver (e.g.,type error = [`Not_found | `Invalid_arg] [@@deriving to_string]). We since then believe that we should not disable warnings lightly, as this behaviour makes it difficult to find and remove deadcode. The right approach in those situations should be to fix the PPX derivers so that they are more configurable and can be used without triggering such warnings. We will start to move toward removing this feature, but since it is still useful in some places, we came up with a plan to do this iteratively. Inppxlib.0.31.0we added the-unused-code-warningsdriver flag and the?unused_code_warningsDeriving.V2.makeoptional argument to control whether to silence Warnings 32 and 60. When both are set totrue, by the user and the deriver authors, the warnings are not silenced. As ofppxlib.0.33.0, these also control the silencing of Warning 34 (unused type).forcecan now be passed to the-unused-code-warningsflag in order to disable warnings silencing, regardless of the derivers opting in. This allows users to test whether their codebase and their set of derivers rely on warning silencing or not and to use those results to eliminate deadcode and/or report issues upstream to the derivers they use. We also added a separate-unused-type-warningsflag that works similarly to-unused-code-warnings(i.e., depends on the value of the?unused_code_warningsargument), but it only controls Warning 34 silencing, as it turns out it is less likely to cause unwanted warnings than with the other two. This will allow users to disable it more easily, without having to deal with Warnings 32 and 60 straight away. We want to encourage users to try those on their codebase in order to see the impact it has. Did you have deadcode lying around that slipped past undetected? Does this trigger unwanted warnings because of deriver's generated code? The plan is to give the ecosystem some time to try those features and adapt by fixing individual derivers and flipping setting?unused_code_warningsto true as they do. After a while, we will swap the default value of the driver flag totrueso that only derivers that haven't opted in will enable warning silencing. Then as time goes we will swap the default of theDeriving.makeargument so that derivers will instead have to explicitly opt out to get the warning silencing. Finally, once we are confident the ecosystem is in a good enough state, we will remove this feature altogether.
ppxlib.0.33.0 also comes with a couple of new features for PPX authors:
- A couple new
Ast_builderfunctions:elist_tailandplist_tailthat can be used to build list expressions and patterns with a custom tail:elist_tail [expr1; expr2] tail_exprreturns the expression forexpr1::expr2::tail_expr. Context_free.special_function', a new version ofspecial_functionthat allows passing aLongident.tdirectly rather that relying on parsing the string argument to aLongident.t.
Finally, the release includes a few bug fixes to Longident.parse and
Code_path.main_module_name and fixes the location-check flag so it is not
required to also pass -check to enable location checks. It also fixes the 5.2
migrations locations, as we used to build nodes with inconsistent locations when
migrating Pexp_function nodes.
We would like to thank our external contributors who have been a huge part of this release: @octachron, @vg-b, and @jchavarri, and a special mention to @mbarbin, who has not only contributed a lot to the warning silencing features but has been extensively testing and providing very useful feedback on them.
And of course, as usual, we'd like to thank the OCaml Software Foundation who has been funding my work on Ppxlib and on this release, making all of this possible!
See full changelog
-
Fix a bug where
Code_path.main_module_namewould not properly remove extensions from the filename and therefore return an invalid module name. (#512, @NathanReb) -
Add
-unused-type-warningsflag to the driver to allow users to disable only the generation of Warning 34 silencing structure items when using[@@deriving ...]on type declarations. (#511, @mbarbin, @NathanReb) -
Make the
-unused-code-warningsdriver flag also control Warning 34 silencing for type declarations with[@@deriving ...]attached. (#510, @mbarbin, @NathanReb) -
Add
-unused-code-warnings=forcedriver command-line flag argument. (#490, @mbarbin) -
Add new functions
Ast_builder.{e,p}list_tailthat take an extra tail expression/pattern argument parameter compared toAst_builder.{e,p}list, so they can build ASTs likea :: b :: cinstead of only[ a; b ]. (#498, #502, @v-gb, @NathanReb) -
Fix
Longident.parseso it also handles indexing operators such as.!(),.%(;..)<-, orVec.(.%())(#494, @octachron) -
Add a
special_function'variant that directly takes aLongident.targument in order to avoid the issue withLongident.tcovering distinct syntactic classes that cannot be easily parsed by a common parser (#496, @octachron). -
Keep location ranges consistent when migrating
Pexp_functionnodes from 5.2+ to older versions (#504, @jchavarri) -
Fix
-locations-checkbehaviour so it is no longer required to pass-checkand can enable location checks. (#506, @NathanReb)
We are pleased to announce the release of OCaml LSP 1.18.0. This version comes with a lot of fixes and new features.
Notable features that are included in this release are:
- Improved hover behavior with less noisy hovers on some parse tree nodes such as keywords, comments, etc., along with support for hovering over PPX annotations and preview the generated code.
- Some additional custom queries, particularly
TypeEnclosing - Folding
ifthenelseexpressions - A new configuration option to control Dune diagnostics
- Improved document symbols
...and many fixes to a handful of issues.
Feedback is very much welcomed on the the Discuss Announcement post and do not hesistate to report issues in the issue tracker.
See full changelog
Features
-
Introduce a configuration option to control Dune diagnostics. The option is called
duneDiganostics, and it may be set to{ enable: false }to disable diagnostics. (ocaml/ocaml-lsp#1221) -
Support folding of
ifthenelseexpressions (ocaml/ocaml-lsp#1031) -
Improve hover behavior (ocaml/ocaml-lsp#1245)
Hovers are no longer displayed on useless parse tree nodes such as keywords, comments, etc.
Multiline hovers are now filtered away.
Display expanded PPXs in the hover window.
-
Improve document symbols (ocaml/ocaml-lsp#1247)
Use the parse tree instead of the typed tree. This means that document symbols will work even if the source code doesn't type check.
Include symbols at arbitrary depth.
Differentiate functions / types / variants / etc.
This now includes PPXs like
let%expect_testorlet%benchin the outline. -
Introduce a
destruct-linecode action. This is an improved version of the olddestructcode action. (ocaml/ocaml-lsp#1283) -
Improve signature inference to only include types for elements that were absent from the signature. Previously, all signature items would always be inserted. (ocaml/ocaml-lsp#1289)
-
Add an
update-signaturecode action to update the types of elements that were already present in the signature (ocaml/ocaml-lsp#1289) -
Add custom
ocamllsp/merlinCallCompatiblerequest (ocaml/ocaml-lsp#1265) -
Add custom
ocamllsp/typeEnclosingrequest (ocaml/ocaml-lsp#1304)
Fixes
-
Detect document kind by looking at Merlin's
suffixesconfig.This enables more LSP features for non-
.ml/.mlifiles. Though it still depends on Merlin's support. (ocaml/ocaml-lsp#1237) -
Correctly accept the
--clientProcessIdflag. (ocaml/ocaml-lsp#1242) -
Disable automatic completion and signature help inside comments (ocaml/ocaml-lsp#1246)
-
Includes a new optional/configurable option to toggle syntax documentation. If toggled on, allows display of syntax documentation on hover tooltips. Can be controlled via environment variables and by GUI for VS code. (ocaml/ocaml-lsp#1218)
-
For completions on labels that the LSP gets from Merlin, take into account whether the prefix being completed starts with
~or?. Change the label completions that start with?to start with~when the prefix being completed starts with~. (ocaml/ocaml-lsp#1277) -
Fix document syncing (ocaml/ocaml-lsp#1278, ocaml/ocaml-lsp#1280, fixes ocaml/ocaml-lsp#1207)
-
Stop generating inlay hints on generated code (ocaml/ocaml-lsp#1290)
-
Fix parenthesising of function types in
SignatureHelp(ocaml/ocaml-lsp#1296) -
Fix syntax documentation rendering (ocaml/ocaml-lsp#1318)
We're happy to announce the release of opam-publish 2.3.1!
See full changelog
- Adapt to opam 2.2 API and update lower bound to opam libs [#138 @kit-ty-kate]
- Use opam download command mechanism to select a specific download command [#159 @Emilios1995]
Feedback on this post is welcomed on Discuss!
We are very pleased to announce the release of opam 2.2.0, and encourage all users to upgrade. Please read on for installation and upgrade instructions.
Try it!
In case you plan a possible rollback, you may want to first backup your
~/.opam or $env:LOCALAPPDATA\opam directory.
The upgrade instructions are unchanged:
- Either from binaries: run
For Unix systems
bash -c "sh <(curl -fsSL https://opam.ocaml.org/install.sh) --version 2.2.0"
or from PowerShell for Windows systems
Invoke-Expression "& { $(Invoke-RestMethod https://opam.ocaml.org/install.ps1) }"
or download manually from the Github "Releases" page to your PATH.
- Or from source, manually: see the instructions in the README.
You should then run:
opam init --reinit -ni
Changes
Major change: Windows support
After 8 years' effort, opam and opam-repository now have official native Windows support! A big thank you is due to Andreas Hauptmann (@fdopen), whose WODI and OCaml for Windows projects were for many years the principal downstream way to obtain OCaml on Windows, Jun Furuse (@camlspotter) whose initial experimentation with OPAM from Cygwin formed the basis of opam-repository-mingw, and, most recently, Jonah Beckford (@jonahbeckford) whose DkML distribution kept - and keeps - a full development experience for OCaml available on Windows.
OCaml when used on native Windows requires certain tools from the Unix world
which are provided by either Cygwin or MSYS2.
We have engineered opam init so that it is possible for a user not to need to
worry about this, with opam managing the Unix world, and the user being able
to use OCaml from either the Command Prompt or PowerShell. However, for the Unix
user coming over to Windows to test their software, it is also possible to have
your own Cygwin/MSYS2 installation and use native Windows opam from that. Please
see the previous blog post
for more information.
There are two "ports" of OCaml on native Windows, referred to by the name of provider of the C compiler. The mingw-w64 port is GCC-based. opam's external dependency (depext) system works for this port (including providing GCC itself), and many packages are already well-supported in opam-repository, thanks to the previous efforts in opam-repository-mingw. The MSVC port is Visual Studio-based. At present, there is less support in this ecosystem for external dependencies, though this is something we expect to work on both in opam-repository and in subsequent opam releases. In particular, it is necessary to install Visual Studio or Visual Studio BuildTools separately, but opam will then automatically find and use the C compiler from Visual Studio.
Major change: opam tree / opam why
opam tree is a new command showing packages and their dependencies with a tree view.
It is very helpful to determine which packages bring which dependencies in your installed switch.
$ opam tree cppo
cppo.1.6.9
├── base-unix.base
├── dune.3.8.2 (>= 1.10)
│ ├── base-threads.base
│ ├── base-unix.base [*]
│ └── ocaml.4.14.1 (>= 4.08)
│ ├── ocaml-base-compiler.4.14.1 (>= 4.14.1~ & < 4.14.2~)
│ └── ocaml-config.2 (>= 2)
│ └── ocaml-base-compiler.4.14.1 (>= 4.12.0~) [*]
└── ocaml.4.14.1 (>= 4.02.3) [*]
Reverse-dependencies can also be displayed using the new opam why command.
This is useful to examine how dependency versions get constrained.
$ opam why cmdliner
cmdliner.1.2.0
├── (>= 1.1.0) b0.0.0.5
│ └── (= 0.0.5) odig.0.0.9
├── (>= 1.1.0) ocp-browser.1.3.4
├── (>= 1.0.0) ocp-indent.1.8.1
│ └── (>= 1.4.2) ocp-index.1.3.4
│ └── (= version) ocp-browser.1.3.4 [*]
├── (>= 1.1.0) ocp-index.1.3.4 [*]
├── (>= 1.1.0) odig.0.0.9 [*]
├── (>= 1.0.0) odoc.2.2.0
│ └── (>= 2.0.0) odig.0.0.9 [*]
├── (>= 1.1.0) opam-client.2.2.0~alpha
│ ├── (= version) opam.2.2.0~alpha
│ └── (= version) opam-devel.2.2.0~alpha
├── (>= 1.1.0) opam-devel.2.2.0~alpha [*]
├── (>= 0.9.8) opam-installer.2.2.0~alpha
└── user-setup.0.7
Special thanks to @cannorin for contributing this feature.
Major change: with-dev-setup
There is now a way for a project maintainer to share their project development
tools: the with-dev-setup dependency flag. It is used in the same way as
with-doc and with-test: by adding a {with-dev-setup} filter after a
dependency. It will be ignored when installing normally, but it's pulled in when the
package is explicitly installed with the --with-dev-setup flag specified on
the command line.
For example
opam-version: "2.0"
depends: [
"ocaml"
"ocp-indent" {with-dev-setup}
]
build: [make]
install: [make "install"]
post-messages:
[ "Thanks for installing the package"
"as well as its development setup. It will help with your future contributions" {with-dev-setup} ]
Major change: opam pin --recursive
When pinning a package using opam pin, opam looks for opam files in the root directory only.
With recursive pinning, you can now instruct opam to look for .opam files in
subdirectories as well, while maintaining the correct relationship between the .opam
files and the package root for versioning and build purposes.
Recursive pinning is enabled by the following options to opam pin and opam install:
- With
--recursive, opam will look for.opamfiles recursively in all subdirectories. - With
--subpath <path>, opam will only look for.opamfiles in the subdirectory<path>.
The two options can be combined: for instance, if your opam packages are stored
as a deep hierarchy in the mylib subdirectory of your project you can try
opam pin . --recursive --subpath mylib.
These options are useful when dealing with a large monorepo-type repository with many opam libraries spread about.
New Options
-
opam switch -, inspired bygit switch -, makes opam switch back to the previously selected global switch. -
opam pin --currentfixes a package to its current state (disabling pending reinstallations or removals from the repository). The installed package will be pinned to its current installed state, i.e. the pinned opam file is the one installed. -
opam pin remove --allremoves all the pinned packages from a switch. -
opam exec --no-switchremoves the opam environment when running a command. It is useful when you want to launch a command without opam environment changes. -
opam clean --untrackedremoves untracked files interactively remaining from previous packages removal. -
opam admin add-constraint <cst> --packages pkg1,pkg2,pkg3applies the given constraint to a given set of packages -
opam list --basehas been renamed into--invariant, reflecting the fact that since opam 2.1 the "base" packages of a switch are instead expressed using a switch invariant. -
opam install --formula <formula>installs a formula instead of a list of packages. This can be useful if you would like to install one package or another one. For exampleopam install --formula '"extlib" |"extlib-compat"'will install eitherextliborextlib-compatdepending on what's best for the current switch.
Miscellaneous changes
- The UI now displays a status when extracting an archive or reloading a repository
- Overhauled the implementation of
opam env, fixing many corner cases for environment updates and making the reverting of package environment variables precise. As a result, usingsetenvin an opam file no longer triggers a lint warning. - Fix parsing pre-opam 2.1.4 switch import files containing extra-files
- Add a new
sys-ocaml-systemdefault global eval variable - Hijack the
"%{var?string-if-true:string-if-false-or-undefined}%"syntax to support extending the variables of packages with+in their name (conf-c++andconf-g++already exist) using"%{?pgkname:var:}%" - Fix issues when using fish as shell
- Sandbox: Mark the user temporary directory
(as returned by
getconf DARWIN_USER_TEMP_DIR) as writable when TMPDIR is not defined on macOS - Add Warning 69: Warn for new syntax when package name in variable in string interpolation contains several '+' (this is related to the "hijack" item above)
- Add support for Wolfi OS, treating it like Alpine family as it also uses apk
- Sandbox:
/tmpis now writable again, restoring POSIX compliance - Add a new
opam admin: new add-extrafilescommand to add/check/update theextra-files:field according to the files present in thefiles/directory - Add a new
opam lint -W @1..9syntax to allow marking a set of warnings as errors - Fix bugs in the handling of the
OPAMCURL,OPAMFETCHandOPAMVERBOSEenvironment variables - Fix bugs in the handling of the
--assume-builtargument - Software Heritage fallbacks is now supported, but is disabled-by-default for now. For more information you can read one of our previous blog post
And many other general and performance improvements were made and bugs were fixed. You can take a look to previous blog posts. API changes and a more detailed description of the changes are listed in:
- the release note for 2.2.0~alpha
- the release note for 2.2.0~alpha2
- the release note for 2.2.0~alpha3
- the release note for 2.2.0~beta1
- the release note for 2.2.0~beta2
- the release note for 2.2.0~beta3
- the release note for 2.2.0~rc1
- the release note for 2.2.0
This release also includes PRs improving the documentation and improving and extending the tests.
Please report any issues to the bug-tracker.
We hope you will enjoy the new features of opam 2.2! 📯
We are pleased to announce the release of Merlin 5.1-502. This is an important release that brings a lot of backend changes and a major
new feature: project-wide occurrences queries.
Try it by running dune build @ocaml-index (since dune 3.16.0) and performing a reference query!
More information can be found in the discuss announcement and the wiki.
See full changelog
- merlin binary
- Support project-wide occurrences queries using index files (ocaml/merlin#1766)
- The file format is described in library
Merlin_lib.index_format - Two new configuration directives are introduced:
SOURCE_ROOTthat is used to resolve relative paths found in the indexes.INDEXthat is used to declare the list of index files Merlin should use when looking for occurrences.
- The file format is described in library
- A new
UNIT_NAMEconfiguration directive that can be used to tell Merlin the correct name of the current unit in the presence of wrapping (ocaml/merlin#1776) - Perform incremental indexation of the buffer when typing. (ocaml/merlin#1777)
merlin-lib.commands: Add afind_command_optalternative tofind_commandthat does not raise (ocaml/merlin#1778)- Prevent uid clashes by not returning PWO for defs located in the current interface file (ocaml/merlin#1781)
- Reset uid counters when restoring the typer cache so that uids are stable across re-typing (ocaml/merlin#1779)
- Improve the behavior on occurrences when the cursor is on a label / constructor declaration (ocaml/merlin#1785)
- Support project-wide occurrences queries using index files (ocaml/merlin#1766)
- editor modes
- emacs: add basic support for project-wide occurrences (ocaml/merlin#1766)
- vim: add basic support for project-wide occurrences (ocaml/merlin#1767, @Julow)
We're happy to announce the release of Dune 3.16.0.
Among the list of chances, this release contains improvements to Melange support and a way to look for references in a whole project using Merlin and OCaml LSP.
See full changelog
Added
-
Allow libraries with the same
(name ..)in projects as long as they don't conflict during resolution (viaenabled_if). (#10307, @anmonteiro, @jchavarri) -
dune describe ppnow finds the exact module and the stanza it belongs to, instead of guessing the name of the preprocessed file. (#10321, @anmonteiro) -
Print the result of
dune describe ppwith the respective dialect printer. (#10322, @anmonteiro) -
Add new flag
--contexttodune ocaml-merlin, which allows to select a Dune context when requesting Merlin config. Adddune describe contextssubcommand. Introduce a fieldgenerate_merlin_rulesfor contexts declared in the workspace, that allows to optionally produce Merlin rules for other contexts besides the one selected for Merlin (#10324, @jchavarri) -
Melange: add include paths for private library
.cmjfiles during JS emission. (#10416, @anmonteiro) -
dune ocaml-merlin: communicate additional directivesSOURCE_ROOT,UNIT_NAME(the actual name with wrapping) andINDEXwith the paths to the index(es). (#10422, @voodoos) -
Add a new alias
@ocaml-indexthat uses theocaml-indexbinary to generate indexes that can be read by tools such as Merlin to provide project-wide references search. (#10422, @voodoos) -
Merlin: add optional
(merlin_reader CMD)construct to(dialect)stanza to configure a Merlin reader (#8567, @andreypopp)
Changed
-
Melange: treat private libraries with
(package ..)as public libraries, fixing an issue whereimportpaths were wrongly emitted. (#10415, @anmonteiro) -
Install
.globfiles for Coq theories too (#10602, @ejgallego)
Fixed
-
Don't try to document nonexistent libraries in doc-new target (#10319, fixes #10056, @jonludlam)
-
Make
dune-site'sload_allfunction look forMETAfiles so that it doesn't fail on empty directories in the plugin directory (#10458, fixes #10457, @shym) -
Fix incorrect warning for libraries defined inside nonexistant directories using
(subdir ..)and used by executables usingdune-build-info(#10525, @rgrinberg) -
Don't try to take build lock when running
coq top --no-build(#10547, fixes #7671, @lzy0505) -
Make sure to truncate Dune's lock file after locking and unlocking so that users cannot observe incorrect PID's (#10575, @rgrinberg)
-
MDX: link MDX binary with
byte_complete. This fixes(libraries)with foreign archives on Linux. (#10586, fixes #10582, @anmonteiro) -
Virtual libraries: fix an issue where linking an executable involving several virtual libries would cause an error. (#10581, fixes #10460, @rgrinberg)
We are pleased to announce the release of Merlin 4.16-414 and 4.16-501.
These releases expose additional functions for packages using merlin-lib that need to manually parse merlin commands.
See full changelog
- merlin binary
- Addition of a
merlin-lib.commandslibrary which disassociates the execution of commands from thenew_protocol, from the binary, allowing it to be invoked from other projects (ocaml/merlin#1758) merlin-lib.commands: Add afind_command_optalternative tofind_commandthat does not raise (ocaml/merlin#1778)
- Addition of a
We are pleased to announce the release of Merlin 4.15-414 and 4.15-501.
These releases bring a handful of bug fixes and improvements, notably to the
destruct feature, that were already released for OCaml 5.2 in Merlin 5.0-502.
See full changelog
- merlin binary
- destruct: Removal of residual patterns (ocaml/merlin#1737, fixes ocaml/merlin#1560)
- Do not erase fields' names when destructing punned record fields (ocaml/merlin#1734, fixes ocaml/merlin#1661)
- Ignore SIGPIPE in the Merlin server process (ocaml/merlin#1746)
- Fix lexing of quoted strings in comments (ocaml/merlin#1754, fixes ocaml/merlin#1753)
- Improve cursor position detection in longidents (ocaml/merlin#1756)
We just released version 3.15.3 with some bug fixes.
See full changelog
Fixed
-
Fix interpretation of
exists_ifpredicate inMETAfiles of installed libraries containing more than one element. (#10564, fixes #10563, @dbuenzli, @nojb) -
Fix TSAN warning in wait4 stubs (#10554, fixes #10553, @emillon)
Feedback on this post is welcomed on Discuss!
We are pleased to announce the patch release of opam 2.1.6.
This opam release consists of backported bug fixes and improvements:
- Changes necessary for opam-repository (see ocaml/opam-repository#23789)
- Better recognize depexts on Gentoo, NetBSD, OpenBSD (#5065)
- Upgrade the vendored dune to 3.14.0 (#5869)
- Fix debug logs showing up regardless of verbosity on macOS 12.7.1 / 13.6.3 / 14.2 and FreeBSD (#5769)
Opam installation instructions (unchanged):
-
From binaries: run
bash -c "sh <(curl -fsSL https://opam.ocaml.org/install.sh) --version 2.1.6"or download manually from the Github "Releases" page to your PATH. In this case, don't forget to run
opam init --reinit -nito 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 -nito 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.
See full changelog
- Changes necessary for opam repository
- Warn if
GNU patchis not detected when a patch is applied [#5893 @kit-ty-kate] - Use
gpatchby default instead ofpatchon NetBSD and DragonFlyBSD [#5893 @kit-ty-kate] - Use
gpatchif it exists and is detected as GNU patch whenpatchis notGNU patch[#5893 @kit-ty-kate] - Better recognize depexts on Gentoo, NetBSD, OpenBSD [#5065 @mndrix]
- Upgrade the vendored dune to 3.14.0 [#5869 @kit-ty-kate]
- Vendor mccs.1.1+17 [#5769 @kit-ty-kate]
- Require mccs >= 1.1+17: Fix debug logs showing up regardless of verbosity on macOS 12.7.1 / 13.6.3 / 14.2 and FreeBSD [#5769 @kit-ty-kate]
- API Changes:
OpamSystem.patchnow displays a warning when GNU patch is not detected and looks for both patch and gpatch as a backup option depending on the OS [#5893 @kit-ty-kate]
We are pleased to announce the release of Merlin 5.0-502!
This release brings official support for OCaml 5.2. Substantial backend changes were required to adapt to this release, especially for features such as occurrences and get-documentation. Do not hesitate to report any suspicious behavior in the issue tracker!
This release also fixes a handful of issues, two of them improving the behaviour of Merlin's destruct feature.
See full changelog
- merlin binary
- Support for OCaml 5.2 (#1757)
destruct: Removal of residual patterns (#1737, fixes #1560)- Do not erase fields' names when destructing punned record fields (#1734, fixes #1661)
- Ignore SIGPIPE in the Merlin server process (#1746)
- Fix lexing of quoted strings in comments (#1754, fixes #1753)
- Improve cursor position detection in longidents (#1756)
- Addition of a
merlin-lib.commandslibrary that disassociates the execution of commands from thenew_protocol, from the binary, allowing it to be invoked from other projects (#1758) - New occurrences backend: Don't index occurrences when
merlin.hideattribute is present. (#1768) - Use the new
uid_to_decltable in 5.2's CMT files to get documentation. (#1773)
The ppxlib team is happy to announce the release of ppxlib.0.32.1.
The main feature of this release is of course the support for the upcoming OCaml 5.2 release. Starting with this version you'll be able to use ppx with the latest compiler.
The feature also comes with a small follow up improvement to the 0.32.0 error reporting changes that simplifies how exception thrown from context free rewriting are handled. The errors will now be inserted where the generated code would have been instead of appended to the whole AST. This should lead to a better error reporting from the compiler as it will now report errors in order of their position in the code.
We'd like to thank the OCaml Software Foundation once again as they funded the vast majority of the work for this release.
See full changelog
-
Add support for OCaml 5.2
-
Insert errors from caught located exceptions in place of the code that should have been generated by context-free rules. (#472, @NathanReb)
We've released odoc 2.4.2 with OCaml 5.2 compatibility and a few bug fixes.
See full changelog
Added
- OCaml 5.2.0 compatibility (@Octachron, #1094, #1112)
Fixed
- Fix issues #1066 and #1095 with extended opens (@jonludlam, #1082, #1100)
We've released OCamlFormat 0.26.2 with compatibility with OCaml 5.2.
See full changelog
Changed
- Compatible with OCaml 5.2.0 (#2510, @gpetiot, @Julow)
We just released version 3.15.2 with some bug fixes.
This one is particularly important for Coq users since it fixes a bug introduced in 3.13.0 that made incremental builds very slow.
See full changelog
Fixed
-
If no directory targets are defined, then do not evaluate
enabled_if(#10442, @rgrinberg) -
Fix a bug where Coq projects were being rebuilt from scratch each time the dependency graph changed. (#10446, fixes #10149, @alizter)
attempt at monorepo
This release reverts the change introduce in Mdx 2.4.0 that allows the execution of included OCaml code blocks after users reported issues. We will revisit the feature to ensure it is opt-in and doesn't break users setup.
See full changelog
Changed
- Revert #446: "Allow execution of included OCaml code blocks" (#451, @gpetiot). Included OCaml code blocks preserve their pre-2.4.0 behavior.
We're happy to announce that Dune 3.15.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.
Removal of previous limitations in many forms
Prior to Dune 3.15 there were a number of limitations where percent forms like
%{env:...} could be used to expand to useful values. In this release,
@rgrinberg put some effort to relax a lot of these restrictions where possible.
In the new version some of these limitations have been lifted, so for example
{env:...} can be used in install stanzas
(#10160).
Likewise there was no consistency where %{cma:...} or %{cmo:...} could be
used. With #10169, these forms
should work consistently everywhere.
Similarly the variables allowed in enabled_if fields have been expanded in
#10250, from just allowing
variables that can be computed from the context to now allowing all variables
as long as expanding these variables does not introduce dependency cycles.
These relaxed rules can also be combined to enable a library depending on
environment variables, e.g. (enabled_if %{env:ENABLE_LIBFOO=false})).
Overlapping names in different contexts
Continuing the theme of conditionally enabling or disabling code to be built,
@jchavarri and @rgrinberg's work on
#10220 makes it possible to have
overlapping names between executable and melange.emit targets. This can be
useful when a name is to be shared in different contexts (e.g. one context with
native compilation and one emitting code for the browser).
Properly output UTF-8 encoded text when formatting
Dune does not assume an encoding of dune files, however when files were formatted the formatter would err on the safe side and escape bytes outside the ASCII range. This means that UTF-8 characters outside of ASCII would get escaped into decimal escape sequences.
This was especially annoying in places where the user would write natural
language texts, which is common when defining Opam packages in dune-project
files. For example a discussion of a paper by Paul Erdős, Peter Frankl, Vojtěch
Rödl would upon reformatting be turned into Paul Erd\197\145s, Peter Frankl,
Vojt\196\155 R\195\182, which does a disservice to these scientists and is
hard to read.
Thanks to the work of @moyodiallo in #9728 starting with Dune 3.15 the original encoding will be preserved, so your package descriptions will be more readable.
See full changelog
Added
-
Add link flags to to
ocamlmklibfor ctypes stubs (#8784, @frejsoya) -
Remove some unnecessary limitations in the expansions of percent forms in install stanza. For example, the
%{env:..}form can be used to select files to be installed. (#10160, @rgrinberg) -
Allow artifact expansion percent forms (
%{cma:..},%{cmo:..}, etc.) in more contexts. Previously, they would be randomly forbidden in some fields. (#10169, @rgrinberg) -
Allow
%{inline_tests}in more contexts (#10191, @rgrinberg) -
Remove limitations on percent forms in the
(enabled_if ..)field of libraries (#10250, @rgrinberg) -
Support dialects in
dune describe pp(#10283, @emillon) -
Allow defining executables or melange emit stanzas with the same name in the same folder under different contexts. (#10220, @rgrinberg, @jchavarri)
Fixed
-
coq: Delay Coq rule setup checks so OCaml-only packages can build in hybrid Coq/OCaml projects when
coqcis not present. Thanks to @vzaliva for the test case and report (#9845, fixes #9818, @rgrinberg, @ejgallego) -
Fix conditional source selection with
selectonbigarrayin OCaml 5 (#10011, @moyodiallo) -
melange: fix inconsistency in virtual library implementation. Concrete modules within a virtual library can now refer to its virtual modules too (#10051, fixes #7104, @anmonteiro)
-
melange: fix a bug that would cause stale
importpaths to be emitted when moving source files within(include_subdirs ..)(#10286, fixes #9190, @anmonteiro) -
Dune file formatting: output utf8 if input is correctly encoded (#10113, fixes #9728, @moyodiallo)
-
Fix expanding dependencies and locks specified in the cram stanza. Previously, they would be installed in the context of the cram test, rather than the cram stanza itself (#10165, @rgrinberg)
-
Fix bug with
dune exec --watchwhere the working directory would always be set to the project root rather than the directory where the command was run (#10262, @gridbugs) -
Regression fix: sign executables that are promoted into the source tree (#10263, fixes #9272, @emillon)
-
Fix crash when decoding dune-package for libraries with
(include_subdirs qualified)(#10269, fixes #10264, @emillon)
Changed
- Remove the
--react-to-insignificant-changesoption. (#10083, @rgrinberg)
We are happy to announce the release of MDX 2.4.0! This is the first release of MDX to be compatible with OCaml 5.2.
This release also comes with support for executing included OCaml code blocks.
See full changelog
Added
- Handle the error-blocks syntax (#439, @jonludlam, @gpetiot)
- Allow execution of included OCaml code blocks. Add
skiptoincludeblocks to revert to the old behavior (#446, @panglesd, @gpetiot) Warning: this is a breaking change that is reverted in the next release. - Make MDX compatible with OCaml 5.2 (#448, @gpetiot)
Fixed
- Reduce false-positives while detecting warnings (#440, @Julow)
We're happy to announce that Dune 3.14.2 is now available.
Note that due to a regression that was detected before publishing to opam
version 3.14.1 should not be used. The fix for the regression is part of
this release.
This feature brings some small bugfixes around the handling of Coq as well as solves an issue where Dune is running on Windows in a path that contains Unicode characters. This affected e.g. users with diacritics or non-latin script in their name when running Dune within their home directory.
See full changelog
Fixed
-
When a directory is changed to a file, correctly remove it in subsequent
dune buildruns. (#9327, fix #6575, @emillon) -
Fix a problem with the doc-new target where transitive dependencies were missed during compile. This leads to missing expansions in the output docs. (#9955, @jonludlam)
-
coq: fix performance regression in coqdep unescaping (#10115, fixes #10088, @ejgallego, thanks to Dan Christensen for the report)
-
coq: memoize coqdep parsing, this will reduce build times for Coq users, in particular for those with many .v files (#10116, @ejgallego, see also #10088)
-
on Windows, use an unicode-aware version of
CreateProcessto avoid crashes when paths contains non-ascii characters. (#10212, fixes #10180, @emillon) -
fix compilation on non-glibc systems due to
signal.hnot being pulled in spawn stubs. (#10256, @emillon)
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)
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:
- Improved Telemetry and Heap Usage Reporting: With the addition of the "heap_mbytes" field in server responses (#1717) and cache stats in telemetry (#1711), developers can now gain deeper insights into Merlin's performance and memory usage. These enhancements are part of our ongoing efforts to improve Merlin's performance profiling capabilities.
- SyntaxDocument Command: Addressing a common challenge among new users, the new SyntaxDocument command (#1706) enables you to find detailed information about the syntax element under the cursor directly from your editor. This feature aims to facilitate learning and code readability by providing instant access to syntax descriptions, making it easier for developers to familiarize themselves with OCaml's syntax.
Happy coding!
See full changelog
- merlin binary
- Add a "heap_mbytes" field to Merlin server responses to report heap usage (#1717)
- Add cache stats to telemetry (#1711)
- Add new SyntaxDocument command to find information about the node under the cursor (#1706)
- Fix
FLG -pp ppx.exe -as-pp/-dump-astuse of invalid shell redirection when direct process launch on Windows. (#1723, fixes #1722) - Add a query_num field to the
ocamlmerlinresponses to detect server crashes (#1716) - Jump to cases within a match statement (#1726)
- Jump to
module-type(#1728, partially fixes #1656) - Exposes stable functions for configuration handling and pattern variable destruction. (#1730)
- editor modes
- vim: load merlin under the ocamlinterface and ocamllex filetypes (#1340)
- Fix merlinpp not using binary file open (#1725, fixes #1724)
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 dune files with (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:
- Write a generator that lists the input files and emits Dune stanzas (as text);
- Add a rule that makes a
dune.incfile using this generator; - Add
(include dune.inc)in the maindunefile,
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 integration
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.
See full changelog
Added
-
Introduce a
(dynamic_include ..)stanza. This is like(include foo)but allowsfooto 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 listto print the list of available promotions. (#9705, @moyodiallo) -
If Sherlodoc is installed, add a search bar in generated HTML docs (#9772, @EmileTrotignon)
-
Add
only_sourcesfield tocopy_filesstanza (#9827, fixes #9709, @jchavarri) -
The
(foreign_library)stanza now supports the(enabled_if)field. (#9914, @nojb)
Fixed
-
Fix
$ dune install -pincorrectly 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)
Changed
-
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:
- @burnleydev1 for their improvement of the driver exception handling
- @dianaoigo for their addition of the new attribute flags API
- @jonahbeckford for their fix of the windows compatibility
We'd also like to thank the OCaml Software Foundation who has been funding my work on this release.
See full changelog
-
Add an optional
embed_errorsargument toContext_free.map_top_downthat controls how to deal with exceptions thrown by context-free rules. (#468, @NathanReb) -
Fix
Longident.parseso it properly handles unparenthesized dotted operators such as+.or*.. (#111, @rgrinberg, @NathanReb) -
raising an exception does no longer cancel the whole context free phase(#453, @burnleydev1)
-
Sort embedded errors that are appended to the AST by location so the compiler reports the one closer to the beginning of the file first. (#463, @NathanReb)
-
Update
Attribute.getto ignoreloc_ghost. (#460, @ceastlund) -
Add API to manipulate attributes that are used as flags (#408, @dianaoigo)
-
Update changelog to use ISO 8061 date format: YYYY-MM-DD. (#445, @ceastlund)
-
Replace
CamlwithStdlib. (#427, @ceastlund) -
When a transformation raises, the last valid AST is used as input to the upcoming transformations. All such errors are collected and appended as extension nodes to the final AST (#447, @burnleydev1)
-
Fix a small mistake in the man pages: Embededding errors is done by default with
-as-pp, not with-dump-ast(#464, @pitag-ha) -
Set appropriate binary mode when writing to
stdoutespecially for Windows compatibility. (#466, @jonahbeckford)
We just released version 3.13.1 with some bugfixes.
See full changelog
-
Fix performance regression for incremental builds (#9769, fixes #9738, @rgrinberg)
-
Fix
dune ocaml top-moduleto 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.
See full changelog
Fixed
- Revert to outputing a file (without content) when rendering a hidden compilation unit. This fixes cases where the dune rules would fail. (@panglesd, #1069)
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.
Generate Conflicts File for Menhir Grammars (#9512, @nojb)
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.
Cached Directory Targets (#9535, @rleshchinskiy)
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.
Dynamic Module List (#9578, @nojb)
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.
See full changelog
Added
-
Add command
dune cache clearto completely delete all traces of the Dune cache. (#8975, @nojb) -
Allow to disable Coq 0.8 deprecation warning (#9439, @ejgallego)
-
Allow
OCAMLFIND_TOOLCHAINto be set per context in the workspace file through theenvstanza. (#9449, @rgrinberg) -
Menhir: generate
.conflictsfile 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 langis at least 3.13 (#9568, @gasche) -
Add
coqdoc_flagsfield tocoqfield ofenvstanza, allowing the setting of workspace-wide defaults forcoqdoc_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.adependency (#9302, fix #9300, @emillon)
Changed
- Check that package names in
(depends)and related fields indune-projectare well-formed. (#9472, fixes #9270, @ElectreAAS)
Fixed
-
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 theenvstanza 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
PATHargument todune init proj NAME PATH. An intermediate directory calledNAMEis no longer created ifPATHis supplied, sodune 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/installdirectory (#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_ifin binary install stanzas. Previously, we'd ignore the result ofenabled_ifwhen evaluating%{bin:..}(#9707, @rgrinberg)
We just released version 3.12.2 with 2 bugfixes.
See full changelog
Fixed
-
Fix version check in
runtest_aliasforcramstanza (#9454, @emillon) -
Fix stack overflow when a
(run)action can not be parsed. (#9530, fixes #9529, @gridbugs)
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:
- Compatibility with Odoc 2.3.0: This version is fully compatible with Odoc 2.3.0, introducing support for the latest syntax features like tables and "codeblock output."
- New Actions for Code Cleanup: You can now mark or remove unused elements such as 'open', types, for loop indexes, modules, match cases, 'rec', and constructors, making your code cleaner and more efficient.
- Auto-completion for 'in' Keyword: To address the long standing issue of the
inkeyword completing to other terms in the editor, we've added auto-completion for this keyword in OCaml LSP. Typinginwill now only suggest auto completion for theinkeyword.
See full changelog
Fixes
- Fix missing super & subscripts in markdown documentation. (#1170)
- Do not invoke dune at all if
--fallback-read-dot-merlinflag is on. (#1173) - Fix semantic highlighting of infix operators that contain '.'. (#1186)
- Disable highlighting unit as an enum member to fix comment highlighting bug. (#1185)
- Improve type-on-hover and type-annotate efficiency by only formatting the type of the first enclosing. (#1191, #1196)
- Fix the encoding of URI's to match how vscode does it (#1197)
- Fix parsing of completion prefixes (#1181)
Features
- Compatibility with Odoc 2.3.0, with support for the introduced syntax: tables, and "codeblock output" (#1184)
- Display text of references in doc strings (#1166)
- Add mark/remove unused actions for open, types, for loop indexes, modules, match cases, rec, and constructors (#1141)
- Offer auto-completion for the keyword
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.
🌟 Spotlight Feature of Odoc 2.4.0 : Search
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.
🤝 Join The Mission
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.
See full changelog
Added
- Add support for external search engines (@panglesd, @EmileTrotignon, #972) This includes the generation of an index and the display of the results in the UI (HTML only).
- Display 'private' keyword for private type extensions (@gpetiot, #1019)
- Allow to omit parent type in constructor reference (@panglesd, @EmileTrotignon, #933)
Fixed
- Warn and exit when table(s) is not closed (@lubegasimon, #1050)
- Hint when list(s) is not closed (@lubegasimon, #1050)
- Fix crash on functors returning an alias (@Julow, #1046)
- Fix rendering of polymorphic variants (@wikku, @panglesd, #971)
- Add references to extension declarations (@gpetiot, @panglesd, #949)
Changed
- Style: Adjusted line height in the TOC to improve readability (@sorawee, #1045)
- Style: Remove font fallback to Helvetica, Arial (@Julow, #1028)
- Style: Preformatted elements fallback to UA monospace (@toastal, #967)
- Style: Sidebar is now stuck to the left of the content instead of the left of the viewport (@EmileTrotignon, #999)