[Caml-list] Attn: Development Editor, Latest OCaml Weekly News

Alan Schmitt
2024-09-24T13:18:49Z

[-- Attachment #1: Type: text/plain, Size: 43716 bytes --]

Hello

Here is the latest OCaml Weekly News, for the week of September 17 to
24, 2024.

Table of Contents
─────────────────

ocaml-trace 0.8
qcheck-lin and qcheck-stm 0.2
3rd editor tooling dev-meeting: 26th of September 🧙
First release of hachis
OCaml Platform Newsletter: June-August 2024
First alpha release of OCaml 5.3.0
Ascend - Dungeon RPG for your terminal
first release of ppx_deriving_jsonschema
opam 2.3.0~alpha1
Other OCaml News
Old CWN

ocaml-trace 0.8
═══════════════

Archive: <https://discuss.ocaml.org/t/ann-ocaml-trace-0-8/15298/1>

Simon Cruanes announced
───────────────────────

[ocaml-trace 0.8] was just released. It features a new trace collector
for multiprocess programs, and a new library, `trace.subscriber', for
handling events in a more modular, compositional way.

For background, `trace' is a lightweight library that can be used to
instrument your code (libraries or executable), either by hand or
using `ppx_trace', and offers a `collector' abstraction to actually
collect/handle/store/write the trace events somewhere. The overhead
when no collector is installed is low. There are also several
collectors in `trace-tef', `trace-fuchsia', and (in a separate repo)
`tracy-client'. See the [github repo] for more details.

[ocaml-trace 0.8]
<https://github.com/c-cube/ocaml-trace/releases/tag/v0.8>

[github repo] <https://github.com/c-cube/ocaml-trace/>

qcheck-lin and qcheck-stm 0.2
═════════════════════════════

Archive:
<https://discuss.ocaml.org/t/ann-qcheck-lin-and-qcheck-stm-0-2/12301/3>

Jan Midtgaard announced
───────────────────────

I'm happy to share the 0.4 release of `qcheck-lin', `qcheck-stm', and
`qcheck-multicoretests-util':
<https://github.com/ocaml-multicore/multicoretests/releases/tag/0.4>

The testing libraries are useful for testing your OCaml code for
parallelism safety:
• `qcheck-lin' offer a low effort approach, requiring little more than
type signatures of the target interface (example above)
• `qcheck-stm' offers stronger correctness guarantees by comparing the
observed behaviour to a functional model description - under both
sequential and parallel usage.

The 0.4 release brings two new "stress test" functions and also
adjusts the cmd list distribution of `STM_sequential':

• #415: Remove `--verbose' in internal `mutable_set_v5' expect test to
avoid a test failure on a slow machine
• #443: Add `Lin_domain.stress_test' as a lighter stress test, not
requiring an interleaving search.
• #462: Add `STM_domain.stress_test_par', similar to
`Lin_domain.stress_test' for STM models.
• #472: Switch `arb_cmds' to use an exponential distribution with a
mean of 10, avoiding lists of up to 10000 cmds in `STM_sequential'
(reported by @nikolaushuber).

Happy testing! :smiley:

3rd editor tooling dev-meeting: 26th of September 🧙
════════════════════════════════════════════════════

Archive:
<https://discuss.ocaml.org/t/ann-3rd-editor-tooling-dev-meeting-26th-of-september/15308/1>

vds announced
─────────────

The meeting is back! We are organizing the next one on next Thursday,
the 26th of September at 5pm CEST (sorry, still no timezone rotation,
but we probably will for the next one). Whether you are a long time
maintainer, an occasional contributor, a new comer, or simply a
curious passer-by, please feel free to attend!

:sparkles: For this session, @jchavarri is going to present [Melange],
a toolchain that compiles ocaml/reason to javascript, and its
integration in the tooling ecosystem.

:clipboard: Meeting agenda:

• A tour-de-table to allow the participants that wish to do so to
present themselves and mention issues / prs they are interested in.
• Talk and Q&A
• Discuss issues and pull requests that were tagged in advance or
mentioned during the tour-de-table.

We’re looking forward to meeting you!

Meeting link: [https://meet.google.com/nzt-owbh-yoo ]

Previous meeting notes are available in [Merlin’s repository wiki].

[Melange] <https://github.com/melange-re/melange>

[https://meet.google.com/nzt-owbh-yoo ]
<https://meet.google.com/nzt-owbh-yoo>

[Merlin’s repository wiki]
<https://github.com/ocaml/merlin/wiki/Public-dev%E2%80%90meetings>

First release of hachis
═══════════════════════

Archive:
<https://discuss.ocaml.org/t/ann-first-release-of-hachis/15309/1>

François Pottier announced
──────────────────────────

It is my pleasure to announce the first release of `hachis', a library
that offers hash sets and hash maps.

These data structures handle collisions via linear probing, a
technique that relies on linear searches within an array. All of the
data is stored within one large array (for hash sets) or two large
arrays (for hash maps). As a result, these data structures offer good
locality.

Some benchmarks suggest that `hachis' can consistently outperform the
standard library's hash maps (`Hashtbl').

To install the library, type `opam update && opam install hachis'.

For more details, see the [documentation].

[documentation] <https://cambium.inria.fr/~fpottier/hachis/doc/hachis/>

Simon Cruanes then added
────────────────────────

The code is [here] for those who are curious to see how the sausage is
done :-)

[here] <https://github.com/fpottier/hachis>

OCaml Platform Newsletter: June-August 2024
═══════════════════════════════════════════

Archive:
<https://discuss.ocaml.org/t/ocaml-platform-newsletter-june-august-2024/15312/1>

Thibaut Mattio announced
────────────────────────

Welcome to the twelfth edition of the OCaml Platform newsletter!

In this June-August 2024 edition, we are excited to bring you the
latest on the OCaml Platform, continuing our tradition of highlighting
recent developments as seen in [previous editions]. To understand the
direction we're headed, especially regarding development workflows and
user experience improvements, check out our [roadmap].

*Highlights:*

• *Dune package management soon in public beta:* [Developer Preview
Program] expands with 60+ interviews, NPS soaring from +9 to +28!
Public beta coming soon with exciting features like automatic
dependency locking and dev tool management. [See it in action]!
• *Opam 2.2 is out:* [Native Windows support is here]! Seamless setup
with `opam init', `opam-repository' compatible with Windows. OCaml
on Windows is now a reality.
• *Odoc 3.0 gets close to a release:* New features like global
sidebars and media support are ready in odoc. Integration with Dune
and OCaml.org pipeline in progress - get ready to test the new
documentation experience soon! [Check out the RFCs].
• *Project-wide references is live:* Merlin 5.1 and OCaml LSP 1.18.0
bring powerful code navigation to your editor. Built on years of
compiler work, it's a game-changer for large codebases.
• *Starting to bridge the gap between Merlin and OCaml LSP:* New LSP
queries for type enclosing, documentation, and more. We’re working
towards consistent, feature-rich experience across all editors
powered by OCaml LSP.

*Releases:*

• [opam 2.2.0~beta3]
• [opam 2.2.0~rc1]
• [opam 2.2.0]
• [opam 2.2.1]
• [Dune 3.16.0]
• opam-publish 2.3.1
• [Merlin 5.1]
• [Merlin 4.16]
• [Merlin 4.15]
• [OCaml LSP 1.19.0]
• [OCaml LSP 1.18.0]
• [Ppxlib 0.33.0]

[previous editions] <https://discuss.ocaml.org/tag/platform-newsletter>

[roadmap] <https://ocaml.org/docs/platform-roadmap>

[Developer Preview Program]
<https://discuss.ocaml.org/t/ann-dune-developer-preview-updates/15160>

[See it in action] <https://mas.to/deck/@leostera/112988841207690720>

[Native Windows support is here]
<https://discuss.ocaml.org/t/ann-opam-2-2-0-is-out/14893>

[Check out the RFCs] <https://github.com/ocaml/odoc/discussions/1097>

[opam 2.2.0~beta3]
<https://ocaml.org/changelog/2024-06-10-opam-2-2-0-beta3>

[opam 2.2.0~rc1] <https://ocaml.org/changelog/2024-06-21-opam-2-2-0-rc1>

[opam 2.2.0] <https://ocaml.org/changelog/2024-07-01-opam-2-2-0>

[opam 2.2.1] <https://ocaml.org/changelog/2024-08-22-opam-2-2-1>

[Dune 3.16.0] <https://ocaml.org/changelog/2024-06-17-dune.3.16.0>

[Merlin 5.1] <https://ocaml.org/changelog/2024-06-24-merlin-5.1>

[Merlin 4.16] <https://ocaml.org/changelog/2024-06-12-merlin-4.16>

[Merlin 4.15] <https://ocaml.org/changelog/2024-06-03-merlin-54.15>

[OCaml LSP 1.19.0]
<https://ocaml.org/changelog/2024-07-31-ocaml-lsp-1.19.0>

[OCaml LSP 1.18.0]
<https://ocaml.org/changelog/2024-07-11-ocaml-lsp-1.18.0>

[Ppxlib 0.33.0] <https://ocaml.org/changelog/2024-07-25-ppxlib-0.33.0>

*Dune Package Management ([W4])*
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

*Contributed by:* @rgrinberg (Tarides), @Leonidas-from-XIV (Tarides),
@gridbugs (Tarides), @Alizter

*Synopsis:* Integrating package management into Dune, making it the
sole tool needed for OCaml development. This unification eliminates
installation time (just download Dune's pre-built binary), automates
external tool management (e.g., for `dune fmt' or `dune ocamllsp'),
and significantly reduces build times through caching (packages and
compiler are built only once across projects).

*Summary:*

Following our announcement of reaching the Minimal Viable Product
(MVP) stage for Dune's package management in the [last newsletter],
we've made substantial progress on our stated goals. As promised,
we've shifted our focus from prototyping to user testing and refining
the developer experience (DX).

The Developer Preview Program (see [latest update]) has expanded
significantly from its early stages. We've conducted approximately 60
developer interviews, representing a diverse cross-section of the
OCaml community. The interviewees include both newcomers and
experienced OCaml users. Notably, about 40% of participants have over
3 years of OCaml experience, while 35% are relative newcomers with
less than a year of experience. The majority come from Linux and macOS
environments, with participants representing various sectors including
tech companies, research institutions, and independent developers.

These sessions have provided crucial feedback and driven
improvements. This extensive user testing has paid off, with the Net
Promoter Score jumping from +9 to an estimated +28 - a clear sign that
the community is excited about the improvements we've made.

Key developments since the last update include:
• A nightly binary distribution of Dune with package management
enabled, which will be made available publicly in the coming weeks.
• We started work on automated handling of developer tools
(ocamlformat, ocamllsp, odoc) – users will be able run `dune fmt',
or `dune ocamllsp', and Dune will take care of installing
OCamlFormat and OCaml LSP automatically if they are not available.
• Implementation of automatic dependency locking when project’s
dependency changes – you can now run Dune in watch mode and let it
install your dependencies without any intervention after updating
your dune-project
• We’ve enabled Dune cache by default, which works with your package
dependencies. With this change, Dune will not recompile dependencies
more than once when building new projects, including the compiler!

The team has moved beyond just testing with OCaml.org and Bonsai, now
conducting broader compatibility tests across the opam
repository. Initial results show about 50% of packages can be authored
using Dune with package management, with ongoing efforts to increase
the coverage (we expect resolution of a few issues on a select few
foundational packages to significantly increase that percentage).

In line with the commitment to prepare for a first release, the team
plans to launch a public beta in the coming weeks. This marks a
significant step from our current private Developer Preview testing
with selected beta testers, to a broader community release.

Stay tuned for the upcoming announcement, and in the meantime, have a
look a the demos and some enthusiastic messages from beta testers:
• Demo on [Mastodon] or [X]
• “Just did the dune package management preview, it’s looking very
sharp” – [https://x.com/ckarmstrong/status/1830937156434747566]
• “Really looking forward to this! No more switches, no more opam,
just dune behaving like a modern package manager. Having played
around with it, it's just so so nice. The focus on DX really makes
me hopeful about OCaml's future.” –
[https://x.com/synecdokey/status/1825533523283079474]

*Activities:*

• Implemented workaround to avoid unstable compilers –
[ocaml/dune#10668]
• Added support for multiple checksums ([ocaml/dune#10624],
[ocaml/dune#10791])
• Began upstreaming the Dune toolchain feature ([ocaml/dune#10639],
[ocaml/dune#10719])
• Added implicit relock when dependencies change – [ocaml/dune#10641]
• Improved dependency solving and constraint handling
([ocaml/dune#10726])
• Added developer preview features and configuration options
([ocaml/dune#10627])
• Implemented progress indicators for package builds and lockfile
generation ([ocaml/dune#10802], [ocaml/dune#10803])
• Improved error messages and logging ([ocaml/dune#10662])
• Created extensive test suite for new package management features
([ocaml/dune#10798])
• Resolved issues with building specific packages (e.g., seq, lwt)
([ocaml/dune#10788], [ocaml/dune#10839])
• Enable cache on fetch actions for faster builds ([ocaml/dune#10850])
• Improved handling of dev tools like ocamlformat ([ocaml/dune#10647])
• Developed tools for testing package compatibility coverage on
opam-repository

[W4] <https://ocaml.org/docs/platform-roadmap#w4-build-a-project>

[last newsletter]
<https://discuss.ocaml.org/t/ocaml-platform-newsletter-march-may-2024/14765>

[latest update]
<https://discuss.ocaml.org/t/ann-dune-developer-preview-updates/15160>

[Mastodon] <https://mas.to/deck/@leostera/112988841207690720>

[X] <https://x.com/leostera/status/1825519465527673238>

[https://x.com/ckarmstrong/status/1830937156434747566]
<https://x.com/ckarmstrong/status/1830937156434747566>

[https://x.com/synecdokey/status/1825533523283079474]
<https://x.com/synecdokey/status/1825533523283079474>

[ocaml/dune#10668] <https://github.com/ocaml/dune/pull/10668>

[ocaml/dune#10624] <https://github.com/ocaml/dune/pull/10624>

[ocaml/dune#10791] <https://github.com/ocaml/dune/pull/10791>

[ocaml/dune#10639] <https://github.com/ocaml/dune/pull/10639>

[ocaml/dune#10719] <https://github.com/ocaml/dune/pull/10719>

[ocaml/dune#10641] <https://github.com/ocaml/dune/pull/10641>

[ocaml/dune#10726] <https://github.com/ocaml/dune/pull/10726>

[ocaml/dune#10627] <https://github.com/ocaml/dune/pull/10627>

[ocaml/dune#10802] <https://github.com/ocaml/dune/pull/10802>

[ocaml/dune#10803] <https://github.com/ocaml/dune/pull/10803>

[ocaml/dune#10662] <https://github.com/ocaml/dune/pull/10662>

[ocaml/dune#10798] <https://github.com/ocaml/dune/pull/10798>

[ocaml/dune#10788] <https://github.com/ocaml/dune/issues/10788>

[ocaml/dune#10839] <https://github.com/ocaml/dune/issues/10839>

[ocaml/dune#10850] <https://github.com/ocaml/dune/pull/10850>

[ocaml/dune#10647] <https://github.com/ocaml/dune/pull/10647>

*Native Support for Windows in opam 2.2 ([W5])*
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

*Contributed by:* @rjbou (OCamlPro), @kit-ty-kate (Ahrefs), @dra27
(Tarides), @AltGr (OCamlPro)

*Synopsis:* Releasing opam 2.2 with native Windows support to enhance
OCaml's viability on Windows, making the official `opam-repository'
usable on Windows and encouraging more Windows-friendly packages.

*Summary:*

The release of opam 2.2.0, [announced on Discuss] early July, marks a
significant milestone for the OCaml ecosystem. This version brings
native support for both the opam client and compiler packages in
`opam-repository' on Windows, opening new possibilities for OCaml
development on this platform.

opam 2.2.0 officially supports Cygwin and is compatible with
MSYS2. Windows users can now run `opam init' in their preferred
console for a guided setup, resulting in a fully functional OCaml
environment. This release represents the culmination of a [multi-year
effort] involving extensive contributions from the community.

The OCaml ecosystem is already adapting to this new capability. A [CI
check for Windows compilation] has been added to opam-repository, and
the [GitHub Action ocaml/setup-ocaml] now uses opam 2.2.0,
facilitating OCaml development on Windows in GitHub projects.

Community members are actively working to improve Windows
compatibility across the ecosystem. Notable efforts include [Hugo
Heuzard's] work on [OCamlBuild] and several other [Windows-related
PRs].

We encourage package authors to set up Windows CI for their projects
and address Windows-related issues. This collective effort will be
crucial in expanding OCaml's reach and usability on the Windows
platform.

*Activities:*

• Opam binary:
‣ Fixed issues with `opam init' on Windows – [ocaml/opam#5991],
[ocaml/opam#5992], [ocaml/opam#5993], [ocaml/opam#5994],
[ocaml/opam#5995], [ocaml/opam#5996], [ocaml/opam#5997],
[ocaml/opam#5998], [ocaml/opam#6000]
‣ Improved status display during slow operations on Windows –
[ocaml/opam#5977]
‣ Enabled opam to work with Windows usernames containing spaces –
[ocaml/opam#5457]
‣ Fixed `opam init -yn' to handle menus in the release candidate –
[ocaml/opam#6033]
‣ Updated PowerShell script for installing opam from GitHub
releases: [ocaml/opam#5906]
‣ Fixed hang issue with `setup-ocaml' and depexts –
[ocaml/opam#6046]
• Update opam-repository to be compatible with Windows:
‣ Updated `opam-repository' Windows CI –
[ocaml/opam-repository#26081], [ocaml/opam-repository#26073],
[ocaml/opam-repository#26080]
‣ Added backport of MSVC in OCaml-variants.5.2.0+msvc –
[ocaml/opam-repository#26082]
‣ Updated native Cygwin depexts – [ocaml/opam-repository#26130]
‣ Updated opam-repository with Windows-specific package information:
‣ Added Windows compiler packages ([ocaml/opam-repository#25861])
‣ Fixed issues with OCaml variants on Windows
([ocaml/opam-repository#26033])
‣ Updated and released mingw-w64-shims.0.2.0 to fix setup-ocaml
issues ([ocaml/opam-repository#26123])
• Released stable version of opam 2.2.0 with full Windows support 🎉
([announcement])

[W5] <https://ocaml.org/docs/platform-roadmap#w5-manage-dependencies>

[announced on Discuss]
<https://discuss.ocaml.org/t/ann-opam-2-2-0-is-out/14893>

[multi-year effort]
<https://github.com/ocaml/opam/issues/246#issuecomment-2166133625>

[CI check for Windows compilation]
<https://github.com/ocaml/opam-repository/pull/26069>

[GitHub Action ocaml/setup-ocaml]
<https://github.com/ocaml/setup-ocaml/releases/tag/v3.0.0>

[Hugo Heuzard's] <https://github.com/hhugo>

[OCamlBuild] <https://github.com/ocaml/opam-repository/pull/26164>

[Windows-related PRs]
<https://github.com/ocaml/opam-repository/pulls?q=is%3Apr+windows+created%3A%3E2023-06-01>

[ocaml/opam#5991] <https://github.com/ocaml/opam/pull/5991>

[ocaml/opam#5992] <https://github.com/ocaml/opam/pull/5992>

[ocaml/opam#5993] <https://github.com/ocaml/opam/pull/5993>

[ocaml/opam#5994] <https://github.com/ocaml/opam/pull/5994>

[ocaml/opam#5995] <https://github.com/ocaml/opam/pull/5995>

[ocaml/opam#5996] <https://github.com/ocaml/opam/pull/5996>

[ocaml/opam#5997] <https://github.com/ocaml/opam/pull/5997>

[ocaml/opam#5998] <https://github.com/ocaml/opam/pull/5998>

[ocaml/opam#6000] <https://github.com/ocaml/opam/pull/6000>

[ocaml/opam#5977] <https://github.com/ocaml/opam/pull/5977>

[ocaml/opam#5457] <https://github.com/ocaml/opam/pull/5457>

[ocaml/opam#6033] <https://github.com/ocaml/opam/pull/6033>

[ocaml/opam#5906] <https://github.com/ocaml/opam/pull/5906>

[ocaml/opam#6046] <https://github.com/ocaml/opam/pull/6046>

[ocaml/opam-repository#26081]
<https://github.com/ocaml/opam-repository/pull/26081>

[ocaml/opam-repository#26073]
<https://github.com/ocaml/opam-repository/pull/26073>

[ocaml/opam-repository#26080]
<https://github.com/ocaml/opam-repository/pull/26080>

[ocaml/opam-repository#26082]
<https://github.com/ocaml/opam-repository/pull/26082>

[ocaml/opam-repository#26130]
<https://github.com/ocaml/opam-repository/pull/26130>

[ocaml/opam-repository#25861]
<https://github.com/ocaml/opam-repository/pull/25861>

[ocaml/opam-repository#26033]
<https://github.com/ocaml/opam-repository/pull/26033>

[ocaml/opam-repository#26123]
<https://github.com/ocaml/opam-repository/pull/26123>

[announcement] <https://ocaml.org/changelog/2024-01-18-opam-2-2-0-beta1>

*Upgrading OCaml Package Documentation with Odoc 3.0 ([W25])*
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

*Contributed by:* @jonludlam (Tarides), @julow (Tarides), @panglesd
(Tarides), @EmileTrotignon (Tarides), Luke Maurer (Jane Street)

*Synopsis:* Upgrading OCaml package documentation experience with odoc
3, featuring improved navigation, cross-package referencing, media
support, and more. This upgrade aims to improve the documentation
experience both locally and on OCaml.org, encouraging higher-quality
package documentation.

*Summary:*

Following the completion and community review of the RFCs for odoc
3.0, we've made significant strides in implementing the new design and
features. Our progress over the past few months has brought us close
to a complete implementation of the odoc 3.0 feature set. As we
finalize development and approach the first release, our focus is
shifting towards integration with the rest of the ecosystem.

Key Developments in the past months include:

• Adding new options to the `odoc' CLI to begin the implementation of
the `odoc' 3 CLI
• Implementing new syntax such as path-references
• Developing the global sidebar with a TOC featuring standalone pages
and package module hierarchy

As we near completion of the core odoc 3.0 feature set, our focus is
shifting towards finalizing integration with Dune and the OCaml.org
documentation pipeline. We're excited to get all of these improvements
in your hands and get your feedback on the new documentation
experience. Stay tuned for announcements regarding testing
opportunities and the upcoming release of odoc 3.0!

*Activities:*

• Added `path-references' lookup functionality – [ocaml/odoc#1150]
• Added the `--current-package' option – [ocaml/odoc#1151]
• Fixed hierarchical pages being given wrong parent ID –
[ocaml/odoc#1148]
• Parsing of `path-references' to pages and modules
([ocaml/odoc#1142])
• Support for assets and media in documentation ([ocaml/odoc#1184])
• Implemented "Global" sidebar feature ([ocaml/odoc#1145])
• Added support for external pages and non-package documentation
([ocaml/odoc#1183])
• Improved CSS for better visual presentation ([ocaml/odoc#1159])
• Add a marshalled output for index generation ([ocaml/odoc#1084])
• Implemented Voodoo/Dune driver for improved integration
([ocaml/odoc#1168])
• Added frontmatter support to mld pages ([ocaml/odoc#1187])
• Improved breadcrumbs to show packages and libraries
([ocaml/odoc#1190])

[W25]
<https://ocaml.org/docs/platform-roadmap#w25-generate-documentation>

[ocaml/odoc#1150] <https://github.com/ocaml/odoc/pull/1150>

[ocaml/odoc#1151] <https://github.com/ocaml/odoc/pull/1151>

[ocaml/odoc#1148] <https://github.com/ocaml/odoc/pull/1148>

[ocaml/odoc#1142] <https://github.com/ocaml/odoc/pull/1142>

[ocaml/odoc#1184] <https://github.com/ocaml/odoc/pull/1184>

[ocaml/odoc#1145] <https://github.com/ocaml/odoc/pull/1145>

[ocaml/odoc#1183] <https://github.com/ocaml/odoc/pull/1183>

[ocaml/odoc#1159] <https://github.com/ocaml/odoc/pull/1159>

[ocaml/odoc#1084] <https://github.com/ocaml/odoc/pull/1084>

[ocaml/odoc#1168] <https://github.com/ocaml/odoc/pull/1168>

[ocaml/odoc#1187] <https://github.com/ocaml/odoc/pull/1187>

[ocaml/odoc#1190] <https://github.com/ocaml/odoc/pull/1190>

*Project-Wide References in OCaml Editors ([W19])*
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

*Contributed by:* @vds (Tarides)

*Synopsis:* Introducing project-wide reference features in Merlin and
OCaml LSP to enhance code navigation and refactoring capabilities,
bringing OCaml's editor experience in line with other modern
programming languages.

*Summary:*

As [announced] in June, Merlin project-wide references is now
available in Merlin 5.1 and the preview of OCaml LSP 1.18.0. Users of
LSP-powered editors (like VSCode with the OCaml Platform extension)
and classic Emacs and Vim plugins can now query project-wide
references of OCaml terms. This requires building the index with the
new Dune alias `@ocaml-index'.

This release represents the culmination of a multiyear effort by the
Merlin team, including extensive work on the compiler to provide the
necessary information for implementing this feature in Merlin.

We're thrilled to share this feature with the community and look
forward to your feedback.

While the feature should work well in most cases, we're aware of some
limitations. Our next steps include adding support for interface files
and module paths. Stay tuned!

*Activities:*

• Completed work on incremental occurrences indexation and related
Dune rules – [ocaml/dune#10422]
• Fixed issues with querying from interface files –
[ocaml/merlin#1779], [ocaml/merlin#1781]
• Improved behavior when cursor is on label/constructor declarations –
[ocaml/merlin#1785]
• Released `Merlin.5.1-502', `ocaml-index.1.0', and a new preview of
`ocaml-lsp-server' with project-wide occurrences support –
[ocaml/opam-repository#26114]
• Announced the release on Discuss – [Project-wide occurrences in
Merlin and LSP]
• Wrote a [wiki page] for project-wide occurrences
• Updated [the Merlin website]
• Updated the [platform changelog]
• Improved handling of label and constructor declarations
([ocaml/merlin#1785])
• Contributed compiler improvements:
• Implemented distinct unique identifiers for implementations and
interfaces ([ocaml/ocaml#13286])
• Developed a system for linking unique identifiers of declarations
([ocaml/ocaml#13308])
• Contributed to improvements in longident locations
([ocaml/ocaml#13302])

[W19] <https://ocaml.org/docs/platform-roadmap#w19-navigate-code>

[announced]
<https://discuss.ocaml.org/t/ann-project-wide-occurrences-in-merlin-and-lsp/14847>

[ocaml/dune#10422] <https://github.com/ocaml/dune/pull/10422>

[ocaml/merlin#1779] <https://github.com/ocaml/merlin/pull/1779>

[ocaml/merlin#1781] <https://github.com/ocaml/merlin/pull/1781>

[ocaml/merlin#1785] <https://github.com/ocaml/merlin/pull/1785>

[ocaml/opam-repository#26114]
<https://github.com/ocaml/opam-repository/pull/26114>

[Project-wide occurrences in Merlin and LSP]
<https://discuss.ocaml.org/t/ann-project-wide-occurrences-in-merlin-and-lsp/14847>

[wiki page]
<https://github.com/ocaml/merlin/wiki/Get-project%E2%80%90wide-occurrences>

[the Merlin website]
<https://ocaml.github.io/merlin/editor/emacs/#search-for-an-identifiers-occurrences>

[platform changelog] <https://github.com/ocaml/ocaml.org/pull/2580>

[ocaml/ocaml#13286] <https://github.com/ocaml/ocaml/pull/13286>

[ocaml/ocaml#13308] <https://github.com/ocaml/ocaml/pull/13308>

[ocaml/ocaml#13302] <https://github.com/ocaml/ocaml/pull/13302>

*Bridging the Gap Between Merlin and OCaml LSP ([W19])*
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

*Contributed by:* @xvw (Tarides), @vds (Tarides)

*Synopsis:* Working towards feature parity between Merlin and OCaml
LSP to provide a consistent, feature-rich development experience
across all editors, making OCaml LSP the comprehensive backend for
OCaml editor support.

*Summary:*

In June, we started work on bridging the gap between OCaml LSP and
Merlin. We've started with exposing Merlin's type-enclosing request in
OCaml LSP. The feature is now available as `ocamllsp/typeEnclosing'
and we will work on editor integration next.

As a reminder, Merlin's `type-enclosing' feature allows users to get
the type of the identifier under the cursor. It highlights the
identifier and displays its type. Users can climb the typed-tree to
display the type of larger expressions surrounding the cursor.

Since June, we’ve worked on a number of new LSP queries and code
actions, including:
• A custom `ocamllsp/getDocumentation' query to request the `odoc'
documentation
• A custom `ocamllsp/construct' query to browse and fill typed holes
(`_')
• A code-action for syntactic and semantic movement shortcuts based on
Merlin's Jump command

*Activities*

• Added custom queries for type enclosing and documentation retrieval:
‣ Type enclosing query ([ocaml/ocaml-lsp#1304])
‣ Documentation query ([ocaml/ocaml-lsp#1336])
• Created a custom construct query ([ocaml/ocaml-lsp#1348])
• Implemented semantic and syntactic movement shortcuts
([ocaml/ocaml-lsp#1364])
• Backported and released Merlin 4.16 with necessary commands
([opam-repository PR])
• Refactored usage of `Typedtree' from `ocaml-lsp' to `merlin-lib'
([ocaml/merlin#1811], [ocaml/merlin#1812])

[W19] <https://ocaml.org/docs/platform-roadmap#w19-navigate-code>

[ocaml/ocaml-lsp#1304] <https://github.com/ocaml/ocaml-lsp/pull/1304>

[ocaml/ocaml-lsp#1336] <https://github.com/ocaml/ocaml-lsp/pull/1336>

[ocaml/ocaml-lsp#1348] <https://github.com/ocaml/ocaml-lsp/pull/1348>

[ocaml/ocaml-lsp#1364] <https://github.com/ocaml/ocaml-lsp/pull/1364>

[opam-repository PR]
<https://github.com/ocaml/opam-repository/pull/26052>

[ocaml/merlin#1811] <https://github.com/ocaml/merlin/pull/1811>

[ocaml/merlin#1812] <https://github.com/ocaml/merlin/pull/1812>

First alpha release of OCaml 5.3.0
══════════════════════════════════

Archive:
<https://discuss.ocaml.org/t/first-alpha-release-of-ocaml-5-3-0/15315/1>

octachron announced
───────────────────

Four months after the release of OCaml 5.2.0, the set of new features
for the future version 5.3.0 of OCaml has been frozen. We are thus
happy to announce the first alpha release for OCaml 5.3.0.

This alpha version is here to help fellow hackers join us early in our
bug hunting and opam ecosystem fixing fun (see below for the
installation instructions). More information about the whole release
process is now available in the [compiler repository].

The progresses on stabilizing the ecosystem are tracked on the [opam
readiness for 5.3.0 meta-issue].

The full release is expected around November, see the [new prospective
calendar] for more information.

If you find any bugs, please report them on [OCaml's issue tracker].

If you are interested in the ongoing list of new features and bug
fixes, the updated change log for OCaml 5.3.0 is available [on
GitHub].

[compiler repository]
<https://github.com/ocaml/ocaml/blob/trunk/release-info/introduction.md>

[opam readiness for 5.3.0 meta-issue]
<https://github.com/ocaml/opam-repository/issues/26596>

[new prospective calendar]
<https://github.com/ocaml/ocaml/blob/trunk/release-info/calendar.md>

[OCaml's issue tracker] <https://github.com/ocaml/ocaml/issues>

[on GitHub] <https://github.com/ocaml/ocaml/blob/5.3/Changes>

Installation Instructions
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

The base compiler can be installed as an opam switch with the
following commands on opam 2.1 and later:

┌────
│ opam update
│ opam switch create 5.3.0~alpha1
└────

The source code for the alpha is also available at these addresses:

• [GitHub]
• [OCaml archives at Inria]

[GitHub] <https://github.com/ocaml/ocaml/archive/5.3.0-alpha1.tar.gz>

[OCaml archives at Inria]
<https://caml.inria.fr/pub/distrib/ocaml-5.3/ocaml-5.3.0~alpha1.tar.gz>

◊ Fine-Tuned Compiler Configuration

If you want to tweak the configuration of the compiler, you can switch
to the option variant with:

┌────
│ opam update
│ opam switch create <switch_name> ocaml-variants.5.3.0~alpha1+options <option_list>
└────

where `option_list' is a space separated list of `ocaml-option-*'
packages. For instance, for a flambda and no-flat-float-array switch:

┌────
│ opam switch create 5.3.0~alpha1+flambda+nffa ocaml-variants.5.3.0~alpha1+options ocaml-option-flambda ocaml-option-no-flat-float-array
└────

All available options can be listed with `opam search ocaml-option'.

Ascend - Dungeon RPG for your terminal
══════════════════════════════════════

Archive:
<https://discuss.ocaml.org/t/ann-ascend-dungeon-rpg-for-your-terminal/15319/1>

eir announced
─────────────

Announcing the first release of *[ascend]*!

Venture into the depths to retrieve the stolen artifact, and hopefully
escape with your life… NetHack lite.

*Get it via:*
┌────
│ opam install ascend
│ ascend
└────

Rievax the Revelator is recruiting you for some "manual testing".

[ascend] <https://github.com/m-laniakea/ascend>

first release of ppx_deriving_jsonschema
════════════════════════════════════════

Archive:
<https://discuss.ocaml.org/t/ann-first-release-of-ppx-deriving-jsonschema/15320/1>

Louis Roché announced
─────────────────────

It is my pleasure to announce the first release of
[ppx_deriving_jsonschema]. Source repo is
<https://github.com/ahrefs/ppx_deriving_jsonschema/>

This small ppx should help you generate a (hopefully valid) json
schema from an ocaml type.

Generally the derivation tries to produce a schema which looks
natural, and that would also be compatible with the existing derivers
for json out there. Basically you should be able to change the
annotation to `[@@deriving jsonschema, yojson]' (or `json' instead of
`yojson') and to read/write json values that are matching the
schema. There is a bit of tension on things like variants, which are
represented as arrays by ppx_yojson_conv and ppx_deriving_yojson, but
represented as enums by ppx_deriving_jsonschema. I plan to add a way
to switch between the two behaviors soon.

┌────
│ type address = {
│ street: string;
│ city: string;
│ zip: string;
│ } [@@deriving jsonschema]
│
│ type t = {
│ name: string;
│ age: int;
│ email: string option;
│ address: address;
│ } [@@deriving jsonschema]
│
│ let schema = Ppx_deriving_jsonschema_runtime.json_schema t_jsonschema
└────

Will be turned into this schema
┌────
│ {
│ "$schema": "https://json-schema.org/draft/2020-12/schema",
│ "type": "object",
│ "properties": {
│ "address": {
│ "type": "object",
│ "properties": {
│ "zip": { "type": "string" },
│ "city": { "type": "string" },
│ "street": { "type": "string" }
│ },
│ "required": [ "zip", "city", "street" ]
│ },
│ "email": { "type": "string" },
│ "age": { "type": "integer" },
│ "name": { "type": "string" }
│ },
│ "required": [ "address", "age", "name" ]
│ }
└────

Some more advanced functionalities are documented in the readme.

Please let me know if you see any important feature missing, if there
are bugs, or if you have ideas of improvements.

This project was originally started during a Ahrefs dojo, in parallel
to the ICFP conference in Milan, as a way to learn how to write a
ppx. I can't recommend enough
<https://github.com/pedrobslisboa/ppx-by-example> to get going.

[ppx_deriving_jsonschema]
<https://ocaml.org/p/ppx_deriving_jsonschema/latest>

opam 2.3.0~alpha1
═════════════════

Archive: <https://discuss.ocaml.org/t/ann-opam-2-3-0-alpha1/15325/1>

Kate announced
──────────────

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 happy to announce the first alpha release of opam
2.3.0.

[our talk at the OCaml Workshop 2024]
<https://icfp24.sigplan.org/details/ocaml-2024-papers/10/Opam-2-2-and-beyond>

What's new?
╌╌╌╌╌╌╌╌╌╌╌

• 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. :warning: If you maintain an opam repository,
please read our [blog post] to make sure your repository stays
compatible.
• *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
• *`opam list --latests-only'*: a new option to list only the latest
versions of packages
• *`--verbose-on'*: a new option to enable verbose output for
specified package names.
• *`opam switch import --deps-only'*: a new option to install only the
dependencies of the root packages listed in the opam switch export
file
• *`opam switch list-available'* will now not display compilers
flagged with `avoid-version~/~deprecated' unless `--all' is given,
meaning that the "trunk" build of OCaml no longer appears to be the
latest version
• *The `builtin-0install' solver was improved* and should now be
capable of being your default solver instead of
`builtin-mccs+glpk'. If you wish to give it a try, simply call
`opam option solver=builtin-0install'
• Most of the *unhelpful conflict messages were fixed* :flashlight:

Various performance and other improvements were made and bugs were
fixed. :open_book: You can read our [blog post] for more information
about these changes and more, and for even more details you can take a
look at the [release note] or the [changelog].

[blog post] <https://opam.ocaml.org/blog/opam-2-3-0-alpha1/>

[release note] <https://github.com/ocaml/opam/releases/tag/2.3.0-alpha1>

[changelog] <https://github.com/ocaml/opam/blob/2.3.0-alpha1/CHANGES>

Try it!
╌╌╌╌╌╌╌

The upgrade instructions are unchanged:

For Unix systems
┌────
│ bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh) --version 2.3.0~alpha1"
└────
or from PowerShell for Windows systems
┌────
│ Invoke-Expression "& { $(Invoke-RestMethod https://raw.githubusercontent.com/ocaml/opam/master/shell/install.ps1) } -Version 2.3.0~alpha1"
└────

Please report any issues to [the bug-tracker].

[the bug-tracker] <https://github.com/ocaml/opam/issues>

Other OCaml News
════════════════

>From the ocaml.org blog
───────────────────────

Here are links from many OCaml blogs aggregated at [the ocaml.org
blog].

• [Upcoming OCaml Events (Sep 22, 2024 and onwards)]
• [Eio From a User's Perspective: An Interview With Simon Grondin]
• [Introducing the `odoc' Cheatsheet: Your Handy Guide to OCaml
Documentation]

[the ocaml.org blog] <https://ocaml.org/blog/>

[Upcoming OCaml Events (Sep 22, 2024 and onwards)]
<https://ocaml.org/events>

[Eio From a User's Perspective: An Interview With Simon Grondin]
<https://tarides.com/blog/2024-09-19-eio-from-a-user-s-perspective-an-interview-with-simon-grondin>

[Introducing the `odoc' Cheatsheet: Your Handy Guide to OCaml
Documentation]
<https://tarides.com/blog/2024-09-17-introducing-the-odoc-cheatsheet-your-handy-guide-to-ocaml-documentation>

Old CWN
═══════

If you happen to miss a CWN, you can [send me a message] and I'll mail
it to you, or go take a look at [the archive] or the [RSS feed of the
archives].

If you also wish to receive it every week by mail, you may subscribe
to the [caml-list].

[Alan Schmitt]

[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[caml-list] <https://sympa.inria.fr/sympa/info/caml-list>

[Alan Schmitt] <https://alan.petitepomme.net/>

[-- Attachment #2: Type: text/html, Size: 55720 bytes --]