OCaml Weekly News

Previous Week Up Next Week

Hello

Here is the latest OCaml Weekly News, for the week of January 16 to 23, 2024.

Table of Contents

The OCaml community is signed up for Outreachy!

Sonja Heinze announced

Hello everyone :wave:

Very good news: The OCaml community is signed up for the next Outreachy round with four slots again!

Outreachy is a non-profit providing an over-arching structure for open-source communities to offer three months long remote internships to folks from underrepresented backgrounds in open-source. Participating in Outreachy is a great opportunity for any open-source community to work with new people, to increase its outreach, and to open a first door to more diversity in the community.

The OCaml community has a long history of participating in that wonderful initiative. There have been all kinds of OCaml projects that interns have worked on, shaped, and given input to every year since 2014 (with the exception of 2017/18). And also this (Northern hemisphere) winter, we’re having three amazing interns with us.

So, as a first point, I want to say: Thank you, everyone! :heart: I myself have started being involved in the OCaml Outreachy organization only recently, while the whole community has been driving this for a long time now. And that’s one of the many things that’s really really nice about OCaml: There are nice industrial users, in this case Jane Street and Tarides, who’re willing to fund these kinds of efforts, and there’s a whole lot of community members who’re willing to (and enjoy!) getting involved, come up with projects, and mentor.

And that brings me to my second point: Do reach out to us if you also want to form part of this. It’s up to you whether you want to write in this thread or to DM @patricoferris and/or me (@pitag). Just like in the last couple of rounds, I already have a few concrete people in mind to reach out to for the upcoming round. However, I don’t know and can’t know everyone in the community in person. So me reaching out to people is working well so far, but people reaching out to us would be much easier and a lot less restrictive.

PD: I’ll post here with the relevant dates for the next round once they become more relevant. To already give one date: The deadline for OCaml community members to submit internship projects is Feb. 23, 2024.

OCaml.org Newsletter: November and December 2023

Sabine Schmaltz announced

Welcome to the November and December 2023 edition of the OCaml.org newsletter! This update has been compiled by the OCaml.org team. You can find previous updates on Discuss.

Our goal is to make OCaml.org the best resource for anyone who wants to get started and be productive in OCaml. The OCaml.org newsletter provides an update on our progress towards that goal and an overview of the changes we are working on.

We couldn’t do it without all the amazing OCaml community members who help us review, revise, and create better OCaml documentation. Your feedback enables us to better prioritise our work and make progress towards our goal. Thank you!

This newsletter covers:

  • Learn Area: We made substantial changes to the Learn Area UI, introducing a new landing page and improving various elements on the Learn Area’s subpages. Work on a documentation search feature is in progress, and new documentation has been added or substantially improved!
  • Upcoming Dark Mode: We completed the UI designs for the upcoming dark mode and our Outreachy intern has

started to implement the changes.

  • Announcing the Outreachy Interns: We’re happy to welcome two interns to work on OCaml projects!
  • General Improvements: As usual, we also worked on general maintenance and improvements based on user feedback, so we’re highlighting some of our work below.

Open Issues for Contributors

We created many issues for external contributors. The majority of them are suitable for OCaml beginners, and we’re happy to review and provide feedback on your pull requests!

You can find open issues for contributors here!

Learn Area

Upcoming Dark Mode

In December, oyenuga17 started to implement the new dark mode on OCaml.org. Plans are to complete and activate the dark mode based on browser / operating system preferences by early March.

We continuously merge small patches into ocaml.org, and you can take a look at completed dark mode pages on https://staging.ocaml.org. We placed a button at the bottom of the page to toggle the dark mode on staging (this is not going to be released, it is only a means for us to review the dark mode pages).

Relevant Activities and PRs:

  • Implement dark mode on learn area landing page - ocaml/ocaml.org#1836
  • UI design for dark mode on all OCaml.org pages, and resulting Design System changes

Announcing the Outreachy Interns

In November, we reviewed and rated the Outreachy contributions for the dark mode project and the GUI project and selected the two interns. @oyenuga17 is working with the OCaml.org team on implementing the dark mode, while @IdaraNabuk has been selected for the GUI project. Congratulations @IdaraNabuk and @oyenuga17!

Since the Outreachy application period ended in October, we list all the remaining pull requests done on Outreachy Issues in the “General Improvements” section below.

General Improvements

Most Important Changes TLDR:

Many thanks go out to the many contributors who helped improve OCaml.org in November and December. Find them listed below!

Relevant PRs and Activities:

Discussions on the future of the opam repository

Raphaël Proust announced

The default opam repository has been getting larger and larger with an ever increasing number of packages. This is somewhat of a good sign for the active community of OCaml developers. But it is also a challenge for its use, for its maintenance, and for the execution of its CI.

A discussion on the future of the opam repository is happening and we (the opam repository maintainers) would like to invite OCaml developers at large to participate.

You can read the dedicated github issue Requests for comments: how does opam-repository scale? and share opinions there.

You can also join the public meeting held Wednesday 2024-01-24 at 14:00 GMT on https://meet.jit.si/opam-repo-meeting.

Please do prefer the issue (rather than this thread) to discuss the issue (to keep the discussion in a central location).

dune 3.13

Etienne Millon announced

We’re happy to announce that Dune 3.13.0 is now available. This feature is packed with fixes and new features that you can find in the changelog.

There are a few new features that we would like to specially highlight.

Generate Conflicts File for Menhir Grammars (#9512, @nojb)

When menhir is used to generate code from .mly files, there are sometimes issues with the grammar itself, such as shift-reduce conflicts.

Menhir has an option to generate a “conflicts” file using its --explain flag, but until now this was not exposed by Dune. Starting from this version, this file will be generated automatically to help developers debug their grammars.

Cached Directory Targets (#9535, @rleshchinskiy)

Dune’s global cache is a way to save the result of intermediate build results, even across projects. Previously, it would only work with file targets. With this change, it now supports Dune’s experimental directory targets.

Dynamic Module List (#9578, @nojb)

In several places in the Dune language, it is possible to pass a list of modules. For example in a (library) stanza, if for some reason the default of picking all the source files in the current directory is not the right thing to do, it is possible to pass (module A B C) to only attach these modules to the library.

An important limitation has been that the list of modules needed to be static: written as is in the dune file. This limitation has now been lifted and it is possible to use (:include) or %{read-lines:file} in this field and similar ones.

LexiFi’s use case is a system of static plug-ins: a program is extended by selecting which modules are linked to the application core. This list of modules can now be emitted by a generator that reads a configuration file.

Previously, this required using OCaml syntax for the dune file, which has several issues, including incompatibility with features like (include_subdirs) and poor performance because Dune does not know the dependencies of the generator and needs to re-run the build more times than necessary.

Here is the full changelog:

Added

  • Add command dune cache clear to completely delete all traces of the Dune cache. (#8975, @nojb)
  • Allow to disable Coq 0.8 deprecation warning (#9439, @ejgallego)
  • Allow OCAMLFIND_TOOLCHAIN to be set per context in the workspace file through the env stanza. (#9449, @rgrinberg)
  • Menhir: generate .conflicts file by default. Add new field to the (menhir) stanza to control the generation of this file: (explain <blang expression>). Introduce (menhir (flags ...) (explain ...)) field in the (env) stanza, delete (menhir_flags) field. All changes are guarded under a new version of the Menhir extension, 3.0. (#9512, @nojb)
  • Directory targets can now be cached. (#9535, @rleshchinskiy)
  • It is now possible to use special forms such as (:include) and variables %{read-lines:} in (modules) and similar fields. Note that the dependencies introduced in this way (ie the files being read) must live in a different directory than the stanza making use of them. (#9578, @nojb)
  • Remove warning 30 from default set for projects where dune lang is at least 3.13 (#9568, @gasche)
  • Add coqdoc_flags field to coq field of env stanza allowing the setting of workspace-wide defaults for coqdoc_flags. (#9280, fixes #9139, @Alizter)
  • ctypes: fix an error where (ctypes) with no (function_description) would cause an error trying refer to a nonexistent _stubs.a dependency (#9302, fix #9300, @emillon)

Changed

  • Check that package names in (depends) and related fields in dune-project are well-formed. (#9472, fixes #9270, @ElectreAAS)

Fixed

  • Do not ignore (formatting ..) settings in context or workspace files (#8447, @rgrinberg)
  • Fixed a bug where Dune was incorrectly parsing the output of coqdep when it was escaped, as is the case on Windows. (#9231, fixes #9218, @Alizter)
  • Copying mode for sandboxes will now follow symbolic links (#9282, @rgrinberg)
  • Forbid the empty (binaries ..) field in the env stanza in the workspace file unless language version is at least 3.2. (#9309, @rgrinberg)
  • [coq] Fix bug in computation of flags when composed with boot theories. (#9347, fixes #7909, @ejgallego)
  • Fixed a bug where the (select) field of the (libraries) field of the (test) stanza wasn’t working properly. (#9387, fixes #9365, @Alizter)
  • Fix handling of the PATH argument to dune init proj NAME PATH. An intermediate directory called NAME is no longer created if PATH is supplied, so dune init proj my_project . will now initialize a project in the current working directory. (#9447, fixes #9209, @shonfeder)
  • Experimental doc rules: Correctly handle the case when a package depends upon its own sublibraries (#9461, fixes #9456, @jonludlam)
  • Resolve various public binaries to their build location, rather than to where they’re copied in the _build/install directory (#9496, fixes #7908, @rgrinberg).
  • Correctly ignore warning flags in vendored projects (#9515, @rgrinberg)
  • Use watch exclusions in watch mode on MacOS (#9643, fixes #9517, @PoorlyDefinedBehaviour)
  • Fix merlin configuration for (include_subdirs qualified) modules (#9659, fixes #8297, @rgrinberg)
  • Fix handling of enabled_if in binary install stanzas. Previously, we’d ignore the result of enabled_if when evaluating %{bin:..} (#9707, @rgrinberg)

opam 2.2.0~beta1

Kate announced

On behalf of the opam dev team, I’m happy to announce the first beta release of opam 2.2.0.

What’s new in this beta?

  • opam init on Windows now requires you to choose which Git to use. Git for Windows is now recommended by default, though Cygwin’s Git can of course still be used. See the blog post linked below for more info on why choose one over the other.
  • when compiling opam on Windows with MinGW, the resulting opam binary now contains libstdc++ instead of requiring the DLL to be distributed alongside it or to be present in the environment during compilation
  • fix opam env containing carriage return on Cygwin - eval $(opam env) now works from a Cygwin bash terminal
  • as well as a bunch of bug fixes and improvements

You’ll find these features presented in the blog post, and for some extra details you can take a look at the release note or the changelog.

We encourage you to try out this beta release, instructions are detailed in the blog post, in particular if you’re using Windows for which we provide a – still experimental – pre-built binary.

On Unix-like systems though, to upgrade, simply run:

bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh) --version
2.2.0~beta1"

Happy hacking, <> <> The opam team <> <> :camel:

Zipc 0.1.0

Daniel Bünzli announced

Zipc 0.2.0 has been released to the opam-repository.

It provides a few encoding bug fixes courtesy of Valentin Gatien-Baron’s investigations on round tripping docx files with zipc.

He also suggested not to ignore zip’s declared metadata about decompression size to allow clients to easily cap memory consumption for decoding untrusted zip files (breaking change).

The details are in the release notes and many thanks to him.

Other OCaml News

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.