Attn: Development Editor, Latest OCaml Weekly News

Alan Schmitt <[email protected]>
Newsgroups gmane.comp.lang.caml.inria
Message-ID <[email protected]>
Hello

Here is the latest OCaml Weekly News, for the week of October 24 to 31,
2023.

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

asai 0.2.0 for compiler diagnostics
TSan support in OCaml 5.1 and blog post
Melange 2.0
dream-html 1.0.0
OCaml Platform Newsletter: September 2023
How-To: Buck 2 and OCaml - Build system
First release of ortac-core, ortac-runtime and ortac-qcheck-stm
opam-publish 2.3.0
Old CWN


asai 0.2.0 for compiler diagnostics
═══════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-asai-0-2-0-for-compiler-diagnostics/13305/1>


Favonia announced
─────────────────

  I am happy to announce [asai 0.2.0] for generating and printing
  compiler diagnostics. This is a major release: there are many
  improvements and (unfortunately) many backward-incompatible changes.
  Compared to the previous release, this version is significantly more
  stable, though we might still make big changes before 1.0.0. We have a
  [🔰 quickstart tutorial] for you to try out and would love to hear
  your feedback.

  The most significant change is the introduction of *structured
  reporters.* The library can thus be used in two different modes:

  1. Use *Reporter* (as the old *Logger*): its API is biased towards
     free-form explanations.
  2. Use *StructuredReporter:* its API is biased towards fully
     structured messages.

  Both modes share the same type of *diagnostics,* and thus, an
  application using structured messages can adopt a library using
  free-form explanations and vice versa. Great care has been taken to
  make sure the two modes can work together. The current tutorial
  focuses on *Reporter* and free-form explanations because that mode is
  slightly easier to set up.

  The second most significant change is that the TTY handler got an
  overhaul. The output is now more concise, informational, and
  beautiful. You can trivially produce an error message like this:

  <https://global.discourse-cdn.com/business7/uploads/ocaml/original/2X/3/3c19944f0880b524ac5d675c517136eba6908575.png>

  In case you are wondering, we intentionally did not implement the
  Rust-style ASCII art due to our obsession with Unicode emojis (see
  [our design philosophy]). However, our modular design makes it is very
  easy to connect our message reporting interface with other rendering
  libraries, for example the one tracked by [this GitHub issue.] _(The
  author said we should wait a bit before they finish the renderer, and
  that’s why we have not implemented it yet!)_

  Thanks to @viritrilbia for many valuable suggestions.


[asai 0.2.0] <https://ocaml.org/p/asai/latest/doc/index.html>

[🔰 quickstart tutorial]
<https://ocaml.org/p/asai/latest/doc/quickstart.html>

[our design philosophy]
<https://ocaml.org/p/asai/latest/doc/design.html>

[this GitHub issue.] <https://github.com/RedPRL/asai/issues/107>

Changelog
╌╌╌╌╌╌╌╌╌

◊ BREAKING CHANGES

  • *Span* is renamed to *Range*
  • *Logger* is renamed to *Reporter* and *Reporter.Code* is renamed to
     *Reporter.Message*
  • *Range:* the type `position' was changed to allow string (in-memory)
     sources
  • *Diagnostic:* the type `diagnostic' was changed and `message' was
     renamed to `loctext'
  • The LSP handler is separated out as a new package (not published
    yet)


◊ Bug Fixes

  • *Diagnostic:* fix and improve `string_of_text'
    • ([#83]) ([e32adc5])
    • ([b00d8cd])


  [#83] <https://github.com/RedPRL/asai/issues/83>

  [e32adc5]
  <https://github.com/RedPRL/asai/commit/e32adc5fbbd8cca6c2c0f633afa2ec1beb716f71>

  [b00d8cd]
  <https://github.com/RedPRL/asai/commit/b00d8cd2eee9e51ea89fed8d0988d20fb7964e00>


◊ Features

  • introduce *StructuredReporter* for fully structured messages
    • ([#97]) ([add65f8])
  • *Range:* allow string (in-memory) sources
    • ([#90]) ([ae62741])
    • ([#101]) ([4b6819a])
    • ([a944e66])
  • *Tty:* completely redesign the TTY output
    • ([#81]) ([9685bc9])
    • ([#91]) ([07fe241])
    • ([#93]) ([c3f0747])
    • ([39e7154])
    • ([a9caca1])
    • ([#114]) ([5d2066b])


  [#97] <https://github.com/RedPRL/asai/issues/97>

  [add65f8]
  <https://github.com/RedPRL/asai/commit/add65f81ddc6a37734d32c4363d7abf45d96aa3c>

  [#90] <https://github.com/RedPRL/asai/issues/90>

  [ae62741]
  <https://github.com/RedPRL/asai/commit/ae62741933f6881a1da8f53be45249d347918321>

  [#101] <https://github.com/RedPRL/asai/issues/101>

  [4b6819a]
  <https://github.com/RedPRL/asai/commit/4b6819a289c514f92f0fbb06bee6ac5bd79a0962>

  [a944e66]
  <https://github.com/RedPRL/asai/commit/a944e668ac16532059dff26064712c6300c3b15b>

  [#81] <https://github.com/RedPRL/asai/issues/81>

  [9685bc9]
  <https://github.com/RedPRL/asai/commit/9685bc92e0cc1fbff152814d9a7a340f14871be5>

  [#91] <https://github.com/RedPRL/asai/issues/91>

  [07fe241]
  <https://github.com/RedPRL/asai/commit/07fe24104404a33ea213c1910671d2fa4d14531c>

  [#93] <https://github.com/RedPRL/asai/issues/93>

  [c3f0747]
  <https://github.com/RedPRL/asai/commit/c3f07479254ad02823500262118de649666e6128>

  [39e7154]
  <https://github.com/RedPRL/asai/commit/39e7154b746b5444bc97a24bdbb26e55a83bd2d8>

  [a9caca1]
  <https://github.com/RedPRL/asai/commit/a9caca1f2e46e982d8fa56a69528df390dc6f1ef>

  [#114] <https://github.com/RedPRL/asai/issues/114>

  [5d2066b]
  <https://github.com/RedPRL/asai/commit/5d2066bf530c41e2a920b6258d905cffeeef9229>


TSan support in OCaml 5.1 and blog post
═══════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-tsan-support-in-ocaml-5-1-and-blog-post/13306/1>


Fabrice announced
─────────────────

  With *ThreadSanitizer* support to be part of *OCaml 5.2*, we (@otini
  and I) wanted to let you know about a couple of news on the subject.

  If you don’t already know about it, ThreadSanitizer (also known as
  TSan) is a special instrumentation added to your program to detect
  *data races*. /Quick pedantic reminder with the definition of a data
  race:/ :nerd_face:

        A data race is when two or more threads access the same
        memory location concurrently, and at least one of the
        accesses is a write. Data races can lead to particularly
        hard-to-debug problems.

  We are pleased to announce that we have *backported TSan to OCaml
  5.1*, so that you can start using it right away. This version benefits
  from a *more up-to-date compiler* than the 5.0 backport, and will also
  *perform better* as many improvements have been made to the TSan
  integration. The impact on your program runtime under TSan will be
  lower. :rocket:

  To get it running on your machine, it’s as simple as:

  ┌────
  │ opam update
  │ opam switch create 5.1.0+tsan
  └────

  :open_book: We had the opportunity to present TSan at the *ICFP 2023
  Ocaml Workshop*, unfortunately the recording isn’t available yet.
  :face_holding_back_tears: But if you’re interested in learning more of
  about *how TSan works*, and the challenges we faced in *integrating*
  it with the OCaml compiler we’ve written an *article* at
  [https://tarides.com/blog/2023-10-18-off-to-the-races-using-threadsanitizer-in-ocaml/]!

  :teacher: For a more *hands-on experience*, @jmid has also added a
  *tutorial* `Transitioning to Multicore with ThreadSanitizer', which
  walks you through the steps of installing TSan, using it to detect
  data races in one example, and addressing them. It’s available at
  [https://www.ocaml.org/docs/multicore-transition].

  Happy data race hunting, and have a fun with parallelism! :ninja:


[https://tarides.com/blog/2023-10-18-off-to-the-races-using-threadsanitizer-in-ocaml/]
<https://tarides.com/blog/2023-10-18-off-to-the-races-using-threadsanitizer-in-ocaml/>

[https://www.ocaml.org/docs/multicore-transition]
<https://www.ocaml.org/docs/multicore-transition>


Melange 2.0
═══════════

  Archive: <https://discuss.ocaml.org/t/ann-melange-2-0/13073/2>


Antonio Nuno Monteiro announced
───────────────────────────────

  We have since released Melange 2.1 with the following fixes and
  improvements:

  • Add TRMC (Tail Recursion Modulo Cons) support
    ([melange-re/melange#743])
  • [playground]: Add `melange.dom' to bundle ([melange-re/melange#779])
  • Fix `Sys.argv' runtime to match declared type
    ([melange-re/melange#791])
  • Make `'a Js.t' abstract (again), fixing a regression when bringing
    back OCaml-style objects from BuckleScript
    ([melange-re/melange#786])
  • Don’t issue “unused attribute” warning for well-formed
    `@@@mel.config' in interface files ([melange-re/melange#800])
  • Stop showing `Js__.Js_internal' in types and error messages
    ([melange-re/melange#798])
  • Fix printing of OCaml-style objects and uncurried application
    ([melange-re/melange#807])


[melange-re/melange#743]
<https://github.com/melange-re/melange/pull/743>

[melange-re/melange#779]
<https://github.com/melange-re/melange/pull/779>

[melange-re/melange#791]
<https://github.com/melange-re/melange/pull/791>

[melange-re/melange#786]
<https://github.com/melange-re/melange/pull/786>

[melange-re/melange#800]
<https://github.com/melange-re/melange/pull/800>

[melange-re/melange#798]
<https://github.com/melange-re/melange/pull/798>

[melange-re/melange#807]
<https://github.com/melange-re/melange/pull/807>


dream-html 1.0.0
════════════════

  Archive: <https://discuss.ocaml.org/t/ann-dream-html-1-0-0/12787/2>


Yawar Amin announced
────────────────────

  [ANN] dream-html 1.1.0

  Small update to add some minimal SVG support (PRs to add more SVG tags
  and attributes welcome). Also added `fetchpriority' attribute. E.g.

  ┌────
  │ open Dream_html
  │ 
  │ let osi_logo =
  │   let open SVG in
  │   svg [xmlns; viewbox ~min_x:0 ~min_y:0 ~width:100 ~height:100] [
  │     path [
  │       d "M34,93l11,-29a15,15 0,1,1 9,0l11,29a45,45 0,1,0 -31,0z";
  │       stroke "#142";
  │       stroke_width "2";
  │       fill "#4a5"] []
  │   ]
  │ 
  │ let unimportant =
  │   let open HTML in
  │   img [
  │     src "/images/in_viewport_but_not_important.svg";
  │     fetchpriority `low;
  │     alt "I'm an unimportant image!";
  │   ]
  └────


OCaml Platform Newsletter: September 2023
═════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-platform-newsletter-september-2023/13314/1>


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

  Welcome to the sixth edition of the OCaml Platform newsletter!

  Dive into the latest updates from September and discover how the
  [OCaml Platform] is evolving. Just like in [previous newsletters], it
  spotlights the recent developments and enhancements to the OCaml
  development workflows.

  In addition to the updates on the Platform team’s progress highlighted
  below, don’t hesitate to [share your feedback] on the upcoming
  Platform roadmap. We’ve just updated it based on the most recent
  feedback and are aiming to adopt it in the coming weeks, barring new
  concerns from the community.

  Happy reading!

  • Building Packages
    ‣ [Dune] Exploring Package Management in Dune
    ‣ [opam] Native Support for Windows in opam 2.2
    ‣ [Dune] Dune Terminal User Interface
    ‣ [Dune] Support on Niche Platforms
  • Generating Documentation
    ‣ [odoc] Add Search Capabilities to odoc
    ‣ [odoc] Syntax for Images and Assets in odoc
    ‣ [Dune] Generate Dependencies Documentation with Dune
  • Editing and Refactoring Code
    ‣ [Merlin] Support for Project-Wide References in Merlin
    ‣ [Merlin] Improving Merlin’s Performance


[OCaml Platform] <https://ocaml.org/docs/platform>

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

[share your feedback]
<https://discuss.ocaml.org/t/a-roadmap-for-the-ocaml-platform-seeking-your-feedback/12238>

Releases
╌╌╌╌╌╌╌╌

  Here are all the new versions of Platform tools that were released
  this month:

  • [Merlin 4.11]
  • [Merlin 4.12]
  • [OCamlFormat 0.26.1]
  • [MDX 2.3.1]

  For detailed release notes and announcements, explore the [OCaml
  Changelog].


[Merlin 4.11] <https://ocaml.org/changelog/2023-09-22-merlin-4.11>

[Merlin 4.12] <https://ocaml.org/changelog/2023-09-26-merlin-4.12>

[OCamlFormat 0.26.1]
<https://ocaml.org/changelog/2023-09-19-ocamlformat-0.26.1>

[MDX 2.3.1] <https://ocaml.org/changelog/2023-09-27-mdx-2.3.1>

[OCaml Changelog] <https://ocaml.org/changelog>


Building Packages
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

◊ *[Dune]* Exploring Package Management in Dune

  Contributors: @rgrinberg (Tarides), @Leonidas-from-XIV (Tarides),
  @gridbugs (Tarides), @kit-ty-kate (Tarides), @Alizter

  The biggest highlight from September is that the work to expose the
  compiler and libraries from packages installed by Dune to the rest of
  the project is now complete! This means that there is now a prototype
  of Dune package management that can be used to build projects that
  depend on (simple) opam packages! This is still an early prototype
  that’s not ready to be tested outside of the core team, but still a
  significant milestone: :tada:!

  In addition to this, work in September focussed on three areas:
  • Increasing coverage of opam features to support more opam packages
    from the `opam-repository'. This month, the Dune team added support
    for new fields, including `build-env', `setenv', and `subst', and
    they also added support for patching.
  • Designing and implementing a string manipulation DSL for Dune
    configurations. This will allow users to express the same amount of
    dynamism found in opam filters in Dune package lockfiles, which is
    necessary for converting opam `build' and `install' commands into
    Dune expressions.
  • Started working on support for custom opam repositories by making
    the `opam-repository' configurable in `dune-workspace'. The next
    step is to experiment on how opam repositories are stored and
    accessed. One idea is that all opam repositories would be stored in
    one revision storage that would supply all the data. This has the
    advantage that incremental updates are small, which work like
    pulling via Git. The repo doesn’t need to be uncompressed, thus less
    storage and inodes used.

  *Activities:*
  • Move packages to private context – [ocaml/dune#8467]
  • Translate `build-env' from opam file into lock dir –
    [ocaml/dune#8701]
  • Translate `setenv' from opam file into Dune lock dir –
    [ocaml/dune#8708]
  • Translate `substs' field of opam file into build action –
    [ocaml/dune#8669]
  • Add patching support to Dune pkg – [ocaml/dune#8654]
  • Copy files from opam repository to lock dir – [ocaml/dune#8648]
  • `dune.lock' is ignored in `--release' – [ocaml/dune#8761]
  • Opam repositories from `dune-workspace' – [ocaml/dune#8633]
  • Add `dune pkg outdated' command for showing outdated packages –
    [ocaml/dune#8773]
  • Experimental string list language – [ocaml/dune#8596]


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

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

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

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

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

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

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

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

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

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


◊ *[opam]* Native Support for Windows in opam 2.2

  Contributors: @rjbou (OCamlPro), @kit-ty-kate (Tarides), @dra27
  (Tarides), @AltGr (OCamlPro)

  In preparation for the upcoming release of opam 2.2~alpha3, the work
  has focussed on better handling of path rewriting for the `setenv' and
  `build-env' opam fields.

  The [proposed change] will allow users to specify, in the opam file,
  the path separator and format they want for each environment variable
  in `setenv~/~build-env'. This ensures the environment variables are
  correctly set and usable on Windows.

  The PR is in review and not quite ready to be merged, but this is the
  last issue scoped for opam 2.2~alpha3.

  *Activities:*
  • Path rewriting for `setenv:' and `build-env:' - [ocaml/opam#5636]


  [proposed change] <https://github.com/ocaml/opam/pull/5636>

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


◊ *[Dune]* Dune Terminal User Interface

  Contributors: @Alizter, @rgrinberg (Tarides)

  Following the merge of the PR to port Dune TUI to [Nottui] in August,
  and the addition of a few features, @Alizter continued the work on
  building a full-on Terminal User Interface for Dune with two pull
  requests, namely the addition of a [Jobs tab in `tui' mode], and
  support for [multiline status lines].

  *Activities:*
  • Add Jobs tab in `tui' mode – [ocaml/dune#8601]
  • Multiline status support – [ocaml/dune#8619]


  [Nottui] <https://github.com/let-def/lwd>

  [Jobs tab in `tui' mode] <https://github.com/ocaml/dune/pull/8601>

  [multiline status lines] <https://github.com/ocaml/dune/pull/8619>

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

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


◊ *[Dune]* Support on Niche Platforms

  Contributors: @Alizter

  Dune now builds on both [Haiku] and Android (using Termux)! This means
  it is now possible to build and install both OCaml and Dune on these
  platforms, which should pave the way for more native OCaml
  development.

  For reference, here is a table of Dune’s platform support (with `?'
  indicating that further testing is needed):

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Platform          Support  Watch  TUI  Cache  Sandboxing 
  ──────────────────────────────────────────────────────────
   Linux             Full     Yes    Yes  Yes    Yes        
   MacOS             Full     Yes    Yes  Yes    Yes        
   Windows (DKML)    Full     Yes    No*  Yes    Copy only  
   Windows (MinGW)   Limited  Yes    Yes  Yes    Yes        
   Windows (Cygwin)  Limited  Yes    Yes  Yes    Yes        
   Linux (Android)   Limited  Yes    Yes  ?      ?          
   FreeBSD           Limited  Yes    Yes  ?      ?          
   NetBSD            Limited  Yes    Yes  ?      ?          
   OpenBSD           Limited  ?      ?    ?      ?          
   Haiku             Limited  Yes    Yes  ?      ?          
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  If you’re working on one of these platforms, don’t hesitate to open
  issues on [Dune’s bug tracker] if you encounter any problem!

  *Activities:*
  • Add Haiku support – [ocaml/dune#8795]


  [Haiku] <https://www.haiku-os.org/>

  [Dune’s bug tracker] <https://github.com/ocaml/dune/issues>

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


Generating Documentation
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

◊ *[odoc]* Add Search Capabilities to `odoc'

  Contributors: @panglesd (Tarides), @EmileTrotignon (Tarides), @julow
  (Tarides), @jonludlam (Tarides)

  Work continues on adding search capabilities to `odoc' in order to
  improve the documentation browsing experience.

  In September, the `odoc' team continued reviewing the different pull
  requests started in August. Peer-reviews suggested several
  improvements to to the CLI and the library API.

  They also worked on client-side performance improvements by loading
  the search script only when the user clicks on the search bar, and
  they made quite a lot of progress on the UI overall.

  *Activities:*
  • Support for search in `odoc' – [ocaml/odoc#972]
  • Collect occurrences information – [ocaml/odoc#976]


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

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


◊ *[odoc]* Syntax for Images and Assets in `odoc'

  Contributors: @panglesd (Tarides)

  The effort to add support for images and assets to `odoc' and bring
  images to the OCaml.org package documentation continues!

  This month, @panglesd opened a PR with an [implementation for asset
  references].

  The exact syntax for medias went through several designs, in
  particular whether a media is a block, a nestable block, or an inline
  element. At the end of the month, @panglesd created a [PR] that builds
  on the asset references PR in order to add support for medias.

  For some time, there has been no official convention on how
  documentation for opam-installed packages should be built. With the
  added complexity of having assets, it was a good time to solve this. A
  [documentation PR] was opened for this. Warm thank you to @dbuenzli
  for the thourough review and participating in establishing these
  conventions!

  *Activities:*
  • Asset References – [ocaml/odoc#1002]
  • Medias in `odoc' – [ocaml/odoc#1005]
  • Document parent-child convention for installed packages –
    [ocaml/odoc#1011]


  [implementation for asset references]
  <https://github.com/ocaml/odoc/pull/1002>

  [PR] <https://github.com/ocaml/odoc/pull/1005>

  [documentation PR] <https://github.com/ocaml/odoc/pull/1011>

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

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

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


◊ *[Dune]* Generate Dependencies Documentation with Dune

  Contributors: @jonludlam (Tarides)

  Currently, Dune only knows how to build the documentation for the
  packages in your Dune workspace, meaning that you can only read the
  documentation of your dependencies from the [OCaml.org package site].
  Alternative `odoc' drivers, like [`odig'], build documentation for all
  the packages in your switch and have been the recommended solution for
  users who prefer to read the dependencies’ documentation locally.

  In an effort to improve the documentation generation experience with
  Dune, @jonludlam worked on a new version of Dune rules to generate the
  documentation. With these rules, Dune will gain the additional ability
  to build the combination of the two: a coherent set of docs that cover
  both switch-installed libraries and local libraries.

  The [PR] is in review and is set to be merged in the coming weeks.

  Future plans for the new rules include better integration with the
  rest of the platform, improvements in capabilities to cover the use
  cases that `dune build @doc' covers, integration of source rendering,
  and integration of search (once it lands in `odoc'!).

  *Activities:*
  • New `odoc' rule – [ocaml/dune#8803]


  [OCaml.org package site] <https://ocaml.org/packages>

  [`odig'] <https://erratique.ch/software/odig>

  [PR] <https://github.com/ocaml/dune/pull/8803>

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


Editing and Refactoring Code
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

◊ *[Merlin]* Support for Project-Wide References in Merlin

  Contributors: @voodoos (Tarides), @trefis (Tarides), @Ekdohibs
  (OCamlPro), @gasche (INRIA)

  In August, the Merlin team opened the PR on the compiler that adds the
  necessary information in the Shapes to implement project-wide
  references.

  The [PR] received reviews, so the team worked on taking the feedback
  into account while also continuing work on the rest of the stack
  (build system rules, the indexer and new locate, and occurrences
  backends for Merlin).

  They also consolidated a release plan and timeline. The plan is to
  first release an experimental 4.14-based variant of the compiler in
  order to gather feedback on this eagerly awaited feature before the
  end of the year. The current aim is to provide official project-wide
  occurrences support in OCaml 5.2.

  *Activities:*
  • Add support for project-wide occurrences to the compiler –
    [ocaml/ocaml#12508]
  • Use new compile information in CMT files to build and aggregate
    indexes – [voodoos/ocaml-uideps#5]
  • Dune orchestrates index generation – [voodoos/dune#1]
  • Use new CMT info to provide buffer occurrences and indexes for
    project-wide occurrences – [voodoos/merlin#7]
  • Support project-wide occurrences in `ocaml-lsp' –
    [voodoos/ocaml-lsp#1]


  [PR] <https://github.com/ocaml/ocaml/pull/12508>

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

  [voodoos/ocaml-uideps#5]
  <https://github.com/voodoos/ocaml-uideps/pull/5>

  [voodoos/dune#1] <https://github.com/voodoos/dune/pull/1>

  [voodoos/merlin#7] <https://github.com/voodoos/merlin/pull/7>

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


◊ *[Merlin]* Improving Merlin’s Performance

  Contributed by: @pitag-ha (Tarides), @3Rafal (Tarides), @voodoos
  (Tarides), @let-def (Tarides)

  The Merlin team continues work on improving Merlin performance.

  Before diving into specific performance optimisation, they worked on a
  benchmarking CI to catch performance regressions and measure
  improvements. While at it, they’ve also worked on a fuzzy testing CI
  to catch behaviour regressions.

  In September, following the Proof of Concept (PoC) of the
  fuzzy-testing CI (from the work in July), the team continued their
  work on addressing the limitations of the current CI implementation
  that would prevent it from being merged in Merlin. Specifically, they
  focussed on finding a solution to store the fuzzy testing results in a
  way that wouldn’t bloat the Merlin repository. The current approach is
  to store the data in a separate Git repository and pull it when
  running the fuzzy-testing CI. They’ve created a GitHub action workflow
  that implements this behaviour.

  Next, the plan is to complete the work on the Merlin CI before
  gradually shifting focus to performance optimisations.

  *Activities:*
  • PoC for the Behavior CI – [ocaml/merlin#1657]


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


How-To: Buck 2 and OCaml - Build system
═══════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/how-to-buck-2-and-ocaml-build-system/13334/1>


Roland Csaszar announced
────────────────────────

  I’ve just made a repo containing examples on how to use [Buck 2] with
  OCaml using the [ocaml-scripts]:

  [OCaml-Buck-2-Examples - GitHub] The example projects do also contain
  Dune files, so you can compare them.

  All questions, suggestions and corrections are welcome, also for
  Meta’s OCaml scrips.

  Why Buck 2 and not Bazel?

  First: I have never tried Bazel (or the OCaml support), so I cannot
  say anything about it. I’ve chosen Buck 2 because OCaml support is
  included by Facebook itself, the [Prelude] contains all language rules
  of Buck 2, there are no “build in” and “external” languages as with
  Bazel. Buck 2 is written in Rust (which I use, so no extra tooling
  needed to build it), Bazel in Java. And Bazel is by Google.

  But I would just look at the support of each for the languages you
  want to/need to/must use.


[Buck 2] <https://buck2.build/>

[ocaml-scripts] <https://github.com/facebook/ocaml-scripts>

[OCaml-Buck-2-Examples - GitHub]
<https://github.com/Release-Candidate/OCaml-Buck-2-Examples>

[Prelude] <https://github.com/facebook/buck2/tree/main/prelude>


Henry Till said
───────────────

  Very cool.

  Evidently, a couple of the creators of Buck2 gave a talk about this
  subject at ICFP this year.

  <https://icfp23.sigplan.org/details/ocaml-2023-papers/1/Buck2-for-OCaml-Users-Developers>

  The slide deck for the talk is available `~there~' [here].

  Hopefully we’ll see a video of the presentation on YouTube soon as
  well. :crossed_fingers:


[here]
<https://ndmitchell.com/downloads/slides-buck2_for_ocaml_users_and_developers-09_sep_2023.pdf>


Roland Csaszar said
───────────────────

  Yes, this is a good idea. The official OCaml examples (which do not
  use Opam packages/the ocaml-scripts) which this talk is about are
  located in the Buck 2 repository, in the examples subdirectory [OCaml
  examples].

  Btw. Neil Mitchell is the person behind [Shake] and the [Build Systems
  a la Carte] paper.


[OCaml examples]
<https://github.com/facebook/buck2/tree/main/examples/with_prelude/ocaml>

[Shake] <https://github.com/ndmitchell/shake>

[Build Systems a la Carte]
<https://www.microsoft.com/en-us/research/uploads/prod/2018/03/build-systems.pdf>


First release of ortac-core, ortac-runtime and ortac-qcheck-stm
═══════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-first-release-of-ortac-core-ortac-runtime-and-ortac-qcheck-stm/13335/1>


Nicolas Osborne announced
─────────────────────────

  We are very happy to announce the initial release of `ortac-core',
  ortac-runtime~ and `ortac-qcheck-stm'.

  Ortac is a runtime assertion checking tool for OCaml based on Gospel
  specification language.

  `ortac-core' package exposes a library to translate a subset of Gospel
  specification language into OCaml terms. It also provides the `ortac'
  command-line tool. You will need to have one of Ortac plugins
  installed to use the `ortac' command-line tool.

  `ortac-runtime' provides runtime environment that the translated terms
  depend on. In particular, it provides an implementation of the
  executable subset of the Gospel standard library.

  `ortac-qcheck-stm' provides a plugin for Ortac. It generates
  QCheck-STM tests for a module specified with Gospel. QCheck-STM is a
  model-based testing framework and Ortac/QCheck-STM relies on the
  Gospel models you gave in the specifications to build the QCheck-STM
  tests. See the [documentation] for more details on how to write the
  specifications and how to uses the tool to test your libraries.


[documentation]
<https://ocaml-gospel.github.io/ortac/ortac-qcheck-stm/index.html>


opam-publish 2.3.0
══════════════════

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


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

  Hi everyone,

  We’re pleased to announce the release of opam-publish 2.3.0.

  This release, apart from a couple of light improvements, mainly
  consists of the following new option:
  • You can now use opam-publish with the `--no-confirmation' argument
    for use in automated pipeline. Use this option with extreme caution
    if you do use it.

  The full changelog is available [here].

  Enjoy, The opam team.


[here] <https://github.com/ocaml-opam/opam-publish/releases/tag/2.3.0>


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:[email protected]>

[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/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.