WIP INTERNAL TO OCAML PLATFORM TEAM - DO NOT SHARE
Welcome to the seventh edition of the OCaml Platform newsletter!
In this October edition, we 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:
Releases:
Contributed by: @rgrinberg (Tarides), @Leonidas-from-XIV (Tarides), @gridbugs (Tarides), @kit-ty-kate (Tarides), @Alizter
Why: Unify OCaml tooling under a single command line for all development workflows. This addresses one of the most important pain points reported by the community.
What: Prototyping the integration of package management into Dune by using opam as a library. We're adding a new dune pkg lock
command to generate a lock file and extend dune build
to support downloading and building dependencies specified in the lock file. Read the Dune RFC for more details.
Activities:
$ dune pkg outdated
command to view all the outdated packages in a lock directory. β ocaml/dune#8773$ dune describe pkg lock
to print lock directories. This gives users a nice overview of whatβs available in the lock directory's build plan. β ocaml/dune#8841lockdir
to make sure opam variables are also available at build and install time β ocaml/dune#8973cmdliner
on Windows! :windows: Next, we're working on making build work on Windows as well. β ocaml/dune#9048dune-package
β ocaml/dune#8953Contributed by: @rjbou (OCamlPro), @kit-ty-kate (Tarides), @dra27 (Tarides), @AltGr (OCamlPro)
Why: Opam and opam-repository
currently don't support Windows natively. This effectively makes OCaml a very niche candidate on Windows, as users either have to (1) not use a package manager or (2) use a fork of opam and the opam-repository
. Making opam and the opam-repository
compatible with Windows will make OCaml a better choice for Windows users and help us grow the community. More Windows users able to use opam leads to more contributors, more testing, more Windows friendly packages, and more packages in the end.
What: Releasing opam 2.2 with native support for Windows and making the official opam-repository
usable on Windows.
Activities:
setenv
& build-env
environment variables update handling on Windows - ocaml/opam#5636odoc
] Add Search Capabilities to odoc
(W25)Contributed by: @panglesd (Tarides), @EmileTrotignon (Tarides), @julow (Tarides), @jonludlam (Tarides)
Why: The in-package search added in OCaml.org's central package documentation has been very well received by the community and improves how users navigate and discover OCaml documentation. We're upstreaming it to odoc
to bring it into the local documentation as well and provide more advanced features, like searching by type.
What: We're adding support in odoc
for pluging in a search engine! odoc
provides the UI (a search bar) and will generate a search index (that can also be used to be integrated into other search engine like Elasticsearch). We're also building a default client-side search engine based on Sherlodoc.
Activities:
odoc
2.4.0.odoc
search engine based on Sherlodoc βart-w/sherlodoc#4.odoc
] Syntax for Images and Assets in odoc
(W25)Contributed by: @panglesd (Tarides), @jonludlam (Tarides), @dbuenzli, @gpetiot (Tarides)
Why: Allow package authors to write rich documentation, making it more useful and improving OCaml developer experience by providing an ecosystem of high-quality documentation for OCaml packages.
What: We're adding support for assets and new syntax to embed medias (images, audio, and videos).
Activities:
Contributed by: @jonludlam (Tarides)
Why: Make locally-generated documentation more useful by allowing users to navigate to their dependencies' documentation from their package docs. Currently users can use odig
, which provides a similar workflow. We're adding support for this in Dune directly.
What: We're writing new Dune rules for odoc
that (1) use the new odoc
CLI to enable performance improvement and caching opportunities and (2) generate the documentation of every opam packages in your switch, allowing users to navigate to their dependencies' documentation from their local docs.
Activities:
findlib
directories; better support for system switches; and a more robust method for translating from findlib
paths to local paths. β ocaml/dune#8803Contributed by: @voodoos (Tarides), @trefis (Tarides), @Ekdohibs (OCamlPro), @gasche (INRIA)
Why: Project-wide reference as an editor feature is a great way for developers to navigate their codebase and understand it better. It's also a feature that users expect to have coming from other ecosystems, so having support for it in Merlin and OCaml LSP will both improve OCaml editor experience and make it on par with other languages.
What: We're adding a new merlin single occurrences
command and support for the LSP textDocument/references
request. To do that, we're extending the compiler's Shapes to support global occurences, building a tool that generates an index of identifiers in a codebase and adding support for it in Dune, Merlin, and OCaml LSP.
Activities:
Contributed by: @pitag (Tarides), @Engil (Tarides), @3Rafal (Tarides)
Why: Some Merlin queries have been shown to scale poorly in large codebases, making the editor experience subpar, with users reporting that they sometime must wait for a few seconds to get the answer for Merlin. This is obviously a major issue that hurts developer experience, so we're working on improving Merlin performance when it falls short.
What: We're building benchmarking and fuzzy-testing CIs to continuously benchmark and test Merlin. We're addressing the performance bottlenecks identified from profiling Merlin and analysing benchmarking results.
Activities:
cmi-cache
and cmt-cache
. For that, we're adding information about Merlin's memory usage to its telemetry. Furthermore, we've looked into refining the typer cache granularity and have analysed its challenges.