OCaml Changelog

RSS

Read the latest releases and updates from the OCaml ecosystem.

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-types and -no-unboxed-types as 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-node command for expanding PPX annotations (ocaml/merlin#1745)
    • Implement new inlay-hints command for adding hints on a source tree (ocaml/merlin#1812)
    • Implement new search-by-type command 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-reader ignoring 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)
    • Emacs:
      • Improve the way that result of polarity search is displayed (#1814)
      • Add merlin-search-by-type, merlin-search-by-polarity and change the behaviour of merlin-search to switch between by-type or by-polarity depending on the query (ocaml/merlin#1828)

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_ROOT that is used to resolve relative paths found in the indexes.
        • INDEX that is used to declare the list of index files Merlin should use when looking for occurrences.
    • A new UNIT_NAME configuration 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 a find_command_opt alternative to find_command that 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)
  • 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 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.commands library which disassociates the execution of commands from the new_protocol, from the binary, allowing it to be invoked from other projects (ocaml/merlin#1758)
    • merlin-lib.commands: Add a find_command_opt alternative to find_command that does not raise (ocaml/merlin#1778)

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)

Merlin 5.0

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.commands library that disassociates the execution of commands from the new_protocol, from the binary, allowing it to be invoked from other projects (#1758)
    • New occurrences backend: Don't index occurrences when merlin.hide attribute is present. (#1768)
    • Use the new uid_to_decl table in 5.2's CMT files to get documentation. (#1773)

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-ast use of invalid shell redirection when direct process launch on Windows. (#1723, fixes #1722)
    • Add a query_num field to the ocamlmerlin responses 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 the release of Merlin 4.13. This release comes with a number of bug fixes to the Merlin binary.

It also introduces a new -cache-lifespan flag that can be used to set cache invalidation periods. This flag allows for fine-tuning of cache invalidation periods, enabling users to customize Merlin's internal configurations for optimal performance in various project contexts.

Additionally, this release includes several improvements in editor modes. For more details, we encourage you to delve into the full changelog.

See full changelog
  • merlin binary
    • Fix a follow-up issue to the preference of non-ghost nodes introduced in #1660 (#1690, fixes #1689)
    • Add -cache-lifespan flag, that sets cache invalidation period. (#1698, #1705)
    • Fix Merlin locate not fallbacking on the correct file in case of ambiguity (@goldfirere, #1699)
    • Fix Merlin reporting errors provoked by the recovery itself (#1709, fixes #1704)
  • editor modes
    • vim: load merlin when Vim is compiled with +python3/dyn (e.g. MacVim)
    • emacs: highlight only first error line by default (#1693, fixes #1663)

Merlin 4.12 is a small patch release fixing regressions introduced in previous versions.

See full changelog
  • merlin binary
    • Fix issue with let operators and tuples (ocaml/merlin#1684, fixes ocaml/merlin#1683, fixes ocaml/ocaml-lsp#1182)
    • Fix an issue causing Merlin locate queries to hang (ocaml/merlin#1686, fixes ocaml/ocaml-lsp#1192)

We are pleased to announce the release of Merlin 4.11 for OCaml 4.14.1, 5.0, and 5.1.

This release brings official support for OCaml 5.1 and introduces some changes to Emacs' default bindings proposed by the community:

  • Unbind C-c C-r (to avoid shadowing tuareg-eval-region) and bind C-c C-v instead to merlin-error-check;
  • Rebind C-c C-d to merlin-document and bind C-c M-d and C-c | instead to merlin-destruct;
  • Bind C-u C-c C-t to merlin-type-expr.

Thanks to everyone involved!

See full changelog
  • Merlin binary
    • Improve error messages for missing configuration reader (ocaml/merlin#1669)
    • Fix regression causing crash when using PPXs under Windows (ocaml/merlin#1673)
    • Fix confusion between aliased modules and module types (ocaml/merlin#1676, fixes ocaml/merlin#1667)
    • Ignore hidden branches when listing occurrences (ocaml/merlin#1677, fixes ocaml/merlin#1671)
  • Editor modes
    • Emacs: fix/improve keybindings (ocaml/merlin#1668, fixes ocaml/merlin#1386): Unbind C-c C-r (to avoid shadowing tuareg-eval-region) and bind C-c C-v instead to merlin-error-check; rebind C-c C-d to merlin-document and bind C-c M-d and C-c | instead to merlin-destruct; bind C-u C-c C-t to merlin-type-expr.
    • Emacs: remove use of obsolete defadvice macro (ocaml/merlin#1675)

We're thrilled to announce the release of Merlin 4.10, which comes with many bug fixes and improvements.

One of the standout features of this release is the significantly enhanced support for binding operators like let+ and and+. You'll find that the results from type-enclosing on expressions that contain let bindings are now more precise.

See full changelog
  • merlin binary
    • Constrain socket path buffer size to avoid build warnings (#1631)
    • Handle concurrent server start (#1622)
    • Omit module prefixes for constructors and record fields in the construct command (#1618). Prefixes are still produced when warning 42 (disambiguated name) is active.
    • Correctly invalidate PPX cache when pipeline ran partially (#1650, fixes #1647)
    • Prevent short-path from looping in some cases related to recursive type definitions (#1645)
    • Support parsing negative numbers in sexps (#1655)
    • Fix construct not working with inline records (#1658)
    • Improve behavior of type-enclosing on let/and operators (#1653)
    • Fix occurrences of extension constructors (#1662)
    • Improve node selection when ghosts are present (#1664, fixes #1660)
  • editor modes
    • emacs: call merlin-client-logger with "interrupted" if the merlin binary itself is interrupted, not just the parsing of the result (#1626).
    • emacs: merlin-construct, with a prefix argument, now includes local values in the completion options. Alternatively, this behavior can be enabled permanently by customizing merlin-construct-with-local-values (#1644)
    • emacs: add support for opam-switch-mode (#1654, fixes #1591). See https://github.com/ProofGeneral/opam-switch-mode

Merlin 4.9

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.

See full changelog
  • merlin binary
    • Allow monadic IO in dot protocol (#1581)
    • Add a scope option to the occurrences command in preparation for the upcoming project-wide-occurrences feature (#1596)
    • Construct bool-typed holes as false instead of true in the construct command, for consistency (#1599).
    • Add a hook to configure system command for spawning ppxes when Merlin is used as a library. (#1585)
    • Implement an all-or-nothing cache for the PPX phase (#1584)
    • Cleanup functors caches when backtracking, to avoid memory leaks (#1609, fixes #1529 and ocaml-lsp#1032)
    • Fix construct results ordering for sum types sand poly variants (#1603)
    • Fix object method completion not working (#1606, fixes #1575)
    • Improve context detection for package types (#1608, fixes #1607)
    • Fix incorrect locations for string literals (#1574)
    • Fixed an issue that caused errors to erroneously alert about missing cmi files (#1577)
    • Prevent destruct from crashing on closed variant types (#1602, fixes #1601)
    • Improve longident parsing (#1612, fixes #945)
  • editor modes
    • emacs: call the user's configured completion UI in merlin-construct (#1598)
  • test suite
    • Add missing dependency to a test using ppxlib (#1583)
    • Add tests for the new PPX phase cache (#1584)
    • Add and update tests for construct ordering (#1603)

Merlin 4.8

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.

See full changelog
  • merlin binary
    • Update internal typer to match OCaml 4.14.1 release (#1557)
    • Improve type-enclosing behaviour when used on records' labels (#1565, fixes #1564)
    • Restore compatibility with some OCaml compiler's debug flags that were incorrectly rejected by Merlin (#1556)
    • Traverse aliases when jumping to declaration. This matches jump-to-definition's behavior (#1563)
    • Improve locate's behavior in various ill-typed expressions (#1546, fixes #1567 and partially #1543)
    • Correctly traverse patterns when looking for docs in the typedtree (#1572)
    • Get documentation when the declaration or definition is selected (#1542, fixes #1540)
    • On Windows, change to a harmless directory when launching server to avoid locking down current directory (#1569, fixes #1474)
  • test suite
    • Add multiple tests for locate over ill-typed expressions (#1546)
    • Add non-regression tests for other fixes in this release
See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

Merlin 4.7

See full changelog
  • merlin binary
    • Replace custom "holes" AST nodes by extensions. This restores binary compatibility and fixes issues with PPXs when using typed-holes. (#1503)
    • Do not change temporarily Merlin's cwd when starting a PPX (#1521, fixes #1420)
    • Fix a parsing issue when declaring the (??) custom prefix operator. (#1507, fixes #1506)
    • Fix variant constructors' comments grouping (#1516, @mheiber, fixes #1513)
    • Filter-out duplicates from the enclosing command result (#1512)
    • Add a new verbosity=smart mode for type enclosing that only expand modules' types (#1374, @ulugbekna)
    • Improve locate for labels' declarations in the current buffer. (#1505, fixes #1524)
    • Fix locate on module without implementation (#1522, fixes #1519)
    • Allow program name customization when merlin is used as a library. (#1532)
  • editor modes
    • vim: load the plugin when necessary if it wasn't loaded before (#1511)
    • emacs: xref works from context menus; better highlighting of xref matches; xref recognises operators and binding operators at the cursor position; bad locations are filtered out (#1385, fixes #1410)
    • emacs: update CI for newer releases and fix some warnings (#1454, @mattiase)
  • test suite
    • Add tests for constructors' documentation (#1511)
    • Add test cases for label comment documentation (#1526, @mheiber)
    • Add a test for the enclosing command (#1512)
    • Add tests for interactions between locate and record labels (#1505)
    • Add test showing an issue with locate and implicit transitive deps
See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

Merlin 4.6

See full changelog
  • merlin binary
    • make most library public and split merlin in two packages: the merlin-lib package that exposes merlin's internals and the merlin package with the frontend. (#1448, #1455, #1457, #1497, @rgrinberg, @tmattio, @kit-ty-kate)
    • Type printing: use best_module_path for paths from Mty_alias (#1470)
    • Attempt at finding the 'real' capitalization of files on windows (#1462 by @mlasson)
    • Use newer Seq-based API of Yojson 2.0, avoiding the need for the deprecated Stream module (#1475 by @Leonidas-from-XIV)
    • unify parsing of MERLIN_LOG (#1480 by @ulugbekna)
    • Fix type deduplication in type-enclosing results (#1483, fixes #1477)
    • Only weakly reduce the shapes to speed up the new Merlin locate implementation. (#1488)
    • Ignore unknown configuration tags from dune configuration provider but not from dot-merlin-reader (#1486)
    • typing recovery: recover at the granularity of core_type (#1484)
  • editor modes
    • add method imenu items for emacs (#1481, @mndrix)
    • emacs: Make the prefix argument to merlin-locate optional, both for consistency with Emacs convention and for backwards compatibility. (#1476, @antalsz)
    • emacs: fix duplicated prefix path in imenu entries (#1495, @bcc32)

Merlin 4.5

See full changelog
  • merlin binary
    • don't reset the environment when running merlin in single mode so that the parent environment is forwarded the the child processes (#1425)
    • filter dups in source paths (#1218)
    • improve load path performance (#1323)
    • fix handlink of ppx's under Windows (#1413)
    • locate: look for original source files before looking for preprocessed files (#1219 by @ddickstein, fixes #894)
    • handle = syntax in compiler flags (#1409)
    • expose all destruct exceptions in the api (#1437)
    • fix superfluous break in error reporting (#1432)
    • recognise binding operators in locate and occurrences (#1398, @mattiase)
    • remove dependency on Result (#1441, @kit-ty-kate)
    • use the new "shapes" generated by the compiler to perform precise jump-to-definition (#1431)
  • editor modes
    • fix an issue in Neovim where the current line jumps to the top of the window on repeated calls to MerlinTypeOf (#1433 by @ddickstein, fixes #1221)
    • add module, module type, and class imenu items for emacs (#1244, @ivg)
    • add prefix argument to force or prevent opening in a new buffer in locate command (#1426, @panglesd)
    • add type-on-hover functionality for vim (#1439, @nilsbecker)
    • add a dedicated buffer *merlin-errors* containing the last viewed error (#1414, @panglesd)
  • test suite
    • make merlin-wrapper create a default .merlin file only when there is no dune-project to let tests use dune ocaml-merlin reader. (#1425)
    • cover locate calls on module aliases with and without dune
    • Add a test expliciting the interaction between locate and Dune's generated source files (#1444)

Merlin 4.4

See full changelog
  • ocaml support
    • add support for 4.13
    • stopped actively supporting version older than 4.12
  • merlin binary
    • Mbrowse.select_leaf: correctly ignore merlin.hide (#1376)
    • enable occurences to work when looking for locally abstract types (#1382)
    • handle -alert compiler flag (#1401)
    • avoid a race condition when the process started to read a configuration file crashes/is not found (#1378, @antalsz)
    • log the backtrace even when the exception is a Failure (#1377, @antalsz)
    • ignore -error-style compiler flag (#1402, @nojb)
    • fix handling of record field expressions (#1375)
    • allow -pp to return an AST (#1394)
    • fix merlin crashing due to short-paths (#1334, fixes #1322)
  • editor modes
    • update quick setup instructions for emacs (#1380, @ScriptDevil)
  • test suite
    • improve record field destruction testing (#1375)
See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

See full changelog
  • merlin binary
    • recover ill-typed patterns (#1317, #1342)
    • more accurate type-enclosing for methods (#1328, fixes #1124)
    • fix location of patterns in Occurrences (#1324, fixes ocaml/ocaml-lsp#375)
    • fix location of module definitions done via functors (#1329, fixes #1199)
    • fix -cmt-path dirs mistakenly added to build path (#1330)
    • add new module holes that can replace module expressions (#1333)
    • add a new command construct that builds a list of possible terms when called on a typed hole (#1318)
    • refactor-open improvements (#1313, #1314, #1366, #1372)
      • do not make paths absolute, simply prefix with the identifier under the cursor
        open Foo (* calling refactor-open qualify on this open *)
        let _ = Foo.bar (* previously could result in [Dune__exe.Foo.bar] *)
        
      • do not return identical (duplicate) edits
      • do not return unnecessary edits that when applied do not change the document
      • handle record fields properly
      • handle multi-line paths
      • unqualify should not qualify
    • Handle Persistent_env.Error in Typemod.initial_env (#1355)
    • locate: reset global state from all entry points (#1364)
    • Windows: replace user name by its SID in socketnames (#1345, @ttamttam)
  • editor modes
    • vim: add a simple interface to the new construct command: MerlinConstruct. When several results are suggested, <c-i> and <c-u> can be use to change the depth of the recursive construction. (#1318)
    • vim: add support for the merlin-locate-type command: MerlinLocateType (#1359)
    • emacs: add a simple interface to the new construct command: merlin-construct. (#1352)
    • emacs: add support for the merlin-locate-type command. (#1359)
    • emacs: fix issue with merlin--highlight and various minor improvements (#1367, @mattiase)
  • test suite
    • cover the new construct command (#1318)
    • disable tests failing in Opam's CI due to nested dune projects (#1373)
See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

Merlin 4.2

See full changelog
  • merlin binary
    • external configuration reading:
      • use relative paths to communicate with Dune when possible. This solves issues related to symlinks on Unix and improve Windows support (#1271, fixes #1288)
      • make the workdir configuration value when using the dune ocaml-merlin configuration provider the same as when using dot-merlin-reader so that ppxes behaves in the same way as before (#1284, fixes ocaml/dune#4479, discussion in #1292)
    • destruct:
      • improve prefixing of generated constructors in Destruct by filtering opened modules (#1277)
      • make the destruct command more resilient to ill-typed expressions and when called without nodes (#1304, fixes #1300)
    • reintroduce some record recovery and improve completion (#1276)
    • introduce a new AST node for holes (_), allow correct typing of these holes and add a new holes command that returns the locations of all holes in the current file along with their types (#1242, #1289)
    • Mppx: don't restore cookies after invocation. Ppx are invoked only once so there is no need to manage cookies. This small change should increase performance and should not change any other behavior (#1309)
    • Windows: system command variant: do not open a window console when launching a ppx (#1270, fixes #714)
    • fix same file documentation bug (#1265 by @ulugbekna, fixes #1261)
  • editor modes
    • vim: Add MerlinNextHole and MerlinPreviousHole commands to navigate between holes. Jump to the first hole after destruct (#1287, #1303)
    • emacs: Add merlin-next-hole and merlin-previous-hole commands to navigate holes. Jump to the first hole after calling destruct. (#1291)
    • emacs: modernization of the elisp code and conformance with coding guidelines (#1247, #1310 by Steve Purcell )
    • vim & emacs : new client-side "merlin use package" commands, restoring previous behavior (#1272, fixes #1191)
  • test suite
    • cover constructor disambiguation and record fields (#1276)
    • cover the new holes command and AST node (#1242, #1289)
    • cover the document fix (#1265, #1315)
See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

Merlin 4.1

See full changelog
  • ocaml support Detailed list of changes on https://tarides.com/blog/2021-01-26-recent-and-upcoming-changes-to-merlin#dropping-support-for-old-versions-of-ocaml Summary:
    • any revision of Merlin now only supports one version of OCaml. Support for other versions will be found in other branches
    • stopped actively supporting version older than 4.11
    • add support for 4.12
  • merlin binary
    • add keyword completion (disabled by default) (#1243)
    • fix a bug which caused type-enclosing to sometimes look at an incorrect node (#1232, fixes #1226)
    • properly report leaked parsing error (#1223, fixes #1222)
    • wrap merlin_analysis and merlin_utils library
    • fix windows paths canonicalization (#1254)
    • fix hanging on windows (#1256, #1263)
  • editor modes
    • emacs: add missing mandatory argument for define-obsolete-function-alias (#1250, by Atharva Shukla, fixes #1234)
    • emacs: use "opam var" instead of "opam config var" (#1249, by Raja Boujbel)
    • vim: fix CursorMoved semantics (#1213, by @ddickstein)
    • vim: add :MerlinLocateImpl and :MerlinLocateIntf (#1208 by Matthew Ryan)
  • test suite
    • replace mdx usage by dune's cram mechanism
See full changelog
  • merlin binary
    • simplify local store implementation and API (#1188, #1184)
    • fix a destruct issue allowing ill-typed match completions (#1194)
See full changelog
  • dot-merlin-reader
    • fix issue when multiple packages with pxxes are declared in the configuration. (#1181, fixes #1179)
See full changelog
  • merlin binary
    • fix completion of pattern matchings with exception patterns (#1169)
    • delegate configuration reading to external programs via a simple protocol and create a new package dot-merlin-reader with a binary that reads .merlin files. (#1123, #1152)
See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

See full changelog
  • merlin binary
    • dune: restore compatibility with dune 1.8.0 (#1157, #1153)
See full changelog
  • merlin binary
    • dune: remove duplicated rules for profile=release (#1143)
  • test suite
    • fix a test that required Dune 2.5 (#1146)
    • fix another test that lacked reproducibility (#1146)
See full changelog
  • ocaml support
    • alerts are no-more ignored and are reported as warnings (#1138)
  • merlin binary
    • fix completion of names containing - (#1142)
    • fix several type-enclosing bugs by performing context-analysis (#1108)
    • lsp: add deprecation flag to outline items (#1087)
    • lsp: add go-to typedef (Locate_type) (#1067)
See full changelog
  • ocaml support
    • full support from OCaml 4.02 to OCaml 4.10 (#1117, #1127)
    • fix desynchronized cache (#1120)
    • short path for OCaml 4.09 and OCaml 4.10 (#1082, #1117)
    • catch and test environment initialization errors (#1083, #1130)
    • restore type levels after recovery (#1092)
  • merlin binary
    • fix syntax errors in 4.08 and 4.09 (#1081)
    • complete-prefix command accepts -kind option to filter results (#1071)
    • code cleanup (#1093, #1079, #1112)
    • better handling of expression and pattern extra nodes during browse tree traversal (#1091, #1121)
    • improve context detection (e.g. appropriate namespace for lookup) for various queries (#1104, #1110)
    • add stdlib to locate source path (#1085)
  • editor modes
    • vim: tweak heuristic to select python version (#1111)
    • emacs: marlin/call
    • lsp: move server to its own repository (#1069), https://github.com/ocaml/ocaml-lsp
  • test suite
    • dune rules for the test suite are now generated, deterministic and can be run individually (#1068, #1070, #1072)
    • fix incorrect command-line arguments in tests (#1073)
    • better coverage of frontend features (#1075, #1078, #1088, #1089, #1126)
  • Build no longer relies on implicit transitive_deps (#1065).

This is a preview release that adds support for OCaml 4.10. Short-path is disabled. Other versions of OCaml are not supported.

See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

See full changelog
  • backend
    • support OCaml 4.09 (#1055)
    • fix parse errors in 4.08 (#1037)
    • update 4.08 support to OCaml 4.08.1 (#1053)
    • support without_cmis
    • separate reading from caching in file-cache, use caching in Env.check_state_consistency (#1044)
    • simplify compiler state management (#1056, #1059)
    • fix creation of initial environment, improve compatibility with upstream 4.08 (#1052)
  • frontend
    • code re-organization (#1042)
    • error command: select which kind of errors to show (#995)
    • print value types in outline (#1014)
    • fix process handling in windows (#1005)
  • editor modes
    • emacs
      • bugfixes in merlin-imenu, merlin-xref (#1000, #1021, #1001)
      • show types in merlin-imenu (#1013)
      • reset buffer local configurations when resetting server (#1004)
      • remove merlin-use-tuareg-imenu
      • fix stack overflow (#1024)
      • fix merlin-occurrence (#1043)
    • vim
      • display warn-error warnings as errors (#1009)
  • testsuite
    • cover file-cache and check_state_consistency (#1044)
    • check inconsistent assumptions, test server versus single modes (#1047)
See full changelog
  • backend
    • ** globbing in .merlin won't look into hidden directories (starting with a '.') (by Daniel Bünzli, #990)
    • fallback to "/dev/null" configuration for findlib
    • better 4.08 support:
      • support for letop (let+, and+, ...) (#986)
      • fix parsing recovery for 4.08 constructions (#987)
      • catch an exception raised by 4.08 Printtyp trying to rename a persistent identifier (#991)
    • locate: treat local locations differently from external locations (coming from a cmi), this fixes "jump to definition" on mutually recursive bindings (#984)
    • when completing an infix operator in a sub-module, wrap with () (#992)
    • disable arity checks on externals (for Bucklescript compatibility)
    • remove parser preprocessing (simplify compilation for OCaml < 4.08) (#997)
  • editor modes
    • emacs
      • fix position computation in presence of tabs or multi-byte characters (#981)
      • log arguments in "merlin-debug-last-commands" (#981)
    • vim
      • install reason.vim file (by Hezekiah M. Carty, #974)

Special thanks to Rudi Grinberg for helping us in reviewing and merging pull-requests.

See full changelog
  • backend

    • interpret -pp flag
    • backtrack warnings in all versions, not just 4.06
    • silence C compiler warnings (by David Allsopp and Bernhard Schommer)
    • remove sturgeon support
    • allow to select sections to log
    • better error message on ocaml version mismatch
    • locate:
      • handle functors and functor applications
      • do not use the location coming from the environment
    • tweaked caching policy
    • fix environment when a file disappears
    • fix -short-paths handling of classes and class types (by Leo White)
    • don't select deprecated paths in -short-paths (by Leo White)
    • return type info in outline query (by Andrey Popp)
    • properly handle new lines in the lexer
    • better tracking of errors reported by the parser and by preprocessors
    • add support for OCaml 4.08
    • tweaked the recovery strategy in presence of syntax errors
    • timing information in replies now includes wall clock time.
    • dump command can new dump the parsetree post preprocessing
  • editors modes

    • emacs

      • fix merlin-xref.el install (by Emilio Jesus Gallego Arias)
      • keep labels matching the prefix the user has typed rather than dropping them (by Mitchell Plamann)
      • remove unused merlin--overlay function (by Wilfred Hughes)
      • show the number of errors in the modline (by Wilfred Hughes)
      • call a logger on the client side if one is defined
      • allow user to disable completion inside comments and strings
      • show errors and types even when buffer is narrowed (by Wilfred Hughes)
      • make sure PATH is updated when merlin-command is 'opam
    • vim

      • better FindBinary
      • make the log buffer a scratch buffer (by Tom Johnson)
      • execute buffer switching silently (by Fabian)
      • restore view after updating merlin type buffer (by Fabian)
  • testsuite

    • Switched to mdx with cram syntax.
See full changelog
  • Switched build to dune (thanks to @nojb).
  • Added support for 4.07.1
  • Various bugfixes in the backend and in the editor modes.
  • Fix build on OCaml 4.02 to 4.04

Thanks to the people who contributed to this release: ELLIOTTCABLE, Louis Roché, Rudi Grinberg, Yotam Barnoy, Leo White, Daniel Below, Andreas Hauptmann, Christophe Troestler, Bobby Priambodo, Milo Davis.

See full changelog
  • backend

    • new "polarity search" feature: provides a Hoogle-like type-based search for libraries that are in merlin's scope. See https://github.com/ocaml/merlin/blob/master/doc/features.md#polarity-search
    • new "open refactoring" feature: helps cleaning the code in the scope of an open statement. See https://github.com/ocaml/merlin/blob/master/doc/features.md#open-refactoring
    • spell-checking: a simple spell-checker has been added to suggest corrections when nothing can be directly completed.
    • type-driven record completion: merlin will now make use of type information from the context for narrowing and refining completion candidates.
    • support for #require directive in a source file, and will treat it as a package use
    • Add support for OCaml 4.07
    • locate: various minor bugfixes, as well as the following general improvements:
      • improved context detection
      • better tracking of namespaces
      • fixed support for local bindings
      • fixed support of disambiguated record fields and variant constructors
      • improved support for functors: merlin will now jump through functor application to the functor definitions and in some cases go back to the argument that was given (if it is simply reexported).
    • backport fixes of OCaml 4.06.1 to the 4.06 backend
    • various minor bugfixes
  • editor modes

    • emacs
      • proper handling of multibyte strings (by @Chris00)
      • bind "q" to close type buffer (by @MiloDavis)
      • make goto-point encoding independent
      • add reason-mode to the guessed favorite mode list (by @Khady)
      • sped up some tight loops (by @rgrinberg)
      • add support for x-ref backend (by @rgrinberg)
    • vim
      • fix support for Neomake (by @bobbypriambodo and @statianzo)
      • fix encoding issues in filepaths (by @Thelyria)
      • fix handling of enclosing-type cache (by @ELLIOTTCABLE)
      • add to prevent flashing when highlighting an enclosing (by @bluddy)

Add support for 4.06. Use Leo White's short-path for 4.05. Various bug fixes (in locate, in emacs serialization).

See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

The major change Windows support is contributed by David Allsopp.

Other changes are a bunch of fixes:

  • compilation on FreeBSD contributed by Malcolm Matalka
  • improvement to emacs mode contributed by Olivier Andrieu, Christophe Troestler and Steve Purcell
  • improvement to vim mode by Fabian Hemmer and Gregory Nisbet
  • fixes to ppx invocation by Keigo Imai
  • fixes to Merlin s-expr dialect to bring UTF-8 compatibility with Emacs (WIP)
See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

Bug fix after 3.0.1:

  • CMT magic number for 4.05 was wrong
  • handle merlin.focus, merlin.ignore, merlin.loc/merlin.relaxed-loc and merlin.syntax-error
  • missing include preventing build on some platforms contributed by Bernhard Schommer
See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

Bug fix release after 3.0.0 major release.

  • portability fixes by David Allsop in configure script and vim mode (tough Windows support is not ready yet)
  • preliminary support for findlib toolchains with FINDLIB_TOOLCHAIN .merlin directive
  • make ocamlmerlin.c frontend more portable
  • various fixes to the frontend
See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

The major change is a new protocol that moves process management inside Merlin codebase, saving a lot of pain in Emacs and Vim. There are not much new user facing features.

Windows support is not yet available.

In editor configuration is now done with merlin-flags, merlin-extensions and merlin-use in Emacs and :MerlinFlags, :MerlinExtensions and :MerlinPackages in Vim. In previous versions, enabled extensions, flags and packages were retained while now only the last command is remembered.

"M-x merlin-use a", "M-x merlin-use b" should be replaced by "M-x merlin-use a,b". ":MerlinUse a", ":MerlinUse b" should be replaced by ":MerlinUse a b".

The old protocol is still supported, so existing editor modes should not be affected (tested with Atom, Visual Studio and Sublime-text).

Other main changes:

  • Support for OCaml 4.05 was added
  • Merlin uses a new implementation of short-path by Leo White which addresses performance problems
  • Merlin now works with the upstream version of Menhir
  • numerous cleanup and refactoring to decrease the amount of changes to upstream typechecker
  • emacs-imenu feature was contributed by tddsg. It is similar the "outline" feature in vim for navigating in a buffer.

Thanks to the many contributors (Jochen Bartl, tddsg, Ximin Luo, Jason Staten, Leo White, Leandro Ostera, Jacob Bass, Xavier Guérin, Yotam Barnoy, Jacques Pascal Deplaix, David Allsopp, ...).

See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

Minor release.

See full changelog
  • handle hole in 4.04
  • bug fixes in emacs mode
  • introduce merlin-imenu

Minor release.

See full changelog
  • fix Windows build with MSVC (#605).
  • fix module level errors escaping
If you want to contribute to a new release announcement, check out the Contributing Guide on GitHub.