CINXE.COM

OCaml Changelog

<!DOCTYPE html> <html lang="en"> <head id="htmx-head"> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content="Read the latest releases and updates from the OCaml ecosystem."> <meta name="twitter:title" content="OCaml Changelog"> <meta name="twitter:description" content="Read the latest releases and updates from the OCaml ecosystem."> <meta name="twitter:image" content="https://ocaml.org/_/MWIyY2ZmMWM5YzdkYWNmYWI4NGQ0MDBjOGFiZTYxOTg/ocaml_org_social_media.png"> <meta property="og:site_name" content="OCaml"> <meta property="og:type" content="object"> <meta property="og:title" content="OCaml Changelog"> <meta property="og:description" content="Read the latest releases and updates from the OCaml ecosystem."> <meta name="og:image" content="https://ocaml.org/_/MWIyY2ZmMWM5YzdkYWNmYWI4NGQ0MDBjOGFiZTYxOTg/ocaml_org_social_media.png"> <meta name="theme-color" content="#fff" > <meta name="color-scheme" content="white"> <meta name="ahrefs-site-verification" content="6ff715b377cdcd566334b44ae8888791189ce24640c8a403eacdc3bcbaa9449b"> <link rel="canonical" href="https://ocaml.org/changelog"> <link rel="icon" type="image/x-icon" href="/_/ZDJmMjgzN2NkZmJlMzgxNGQxMTMxNGVlMzk1NzZkN2I/favicon.ico"> <link rel="manifest" href="/manifest.json"> <link rel="stylesheet" href="/_/M2QzNTJkMGFlMzUxZDFkZDE4MDdjYzljNThkN2U1YjQ/css/main.css"> <link rel="stylesheet" href="/_/NmFjYjY5ZmIxYWRhMWQxMTQxODM4ZDEwYTgwMDcwNmI/vendors/font-files/inter.css"> <link rel="stylesheet" href="/_/YjM3OGY4YzIwN2E2ZmUxZTczOWVkNDQwZWRhMDU0MGM/vendors/font-files/roboto-mono.css"> <script defer src="/_/OWYyZDQyZjg4MTFlNWEzZjE4ZGY0YWM0OTU1NGEzYTI/vendors/alpine-clipboard.js"></script> <script defer src="/_/NGI1NjQzZjdkODY0MTY2MmViNThhM2VlZTYwMDk3NTI/vendors/alpine.min.js"></script> <script defer src="/_/YTNhODI2Yzg0Yzk4M2ZiNDcxYmRiYzdhY2FiN2Y0OWQ/vendors/htmx.min.js"></script> <script defer data-domain="ocaml.org" src="https://plausible.ci.dev/js/script.js"></script> <link rel="search" href="/opensearch.xml" type="application/opensearchdescription+xml" title="OCaml"> <title>OCaml Changelog</title> </head> <body> <script> if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches)) { document.body.classList.add("dark"); } else { document.body.classList.remove("dark"); } </script> <header class="h-20 flex items-center bg-sand dark:bg-dark-background_navigation" x-data="{ open: false }"> <nav class="container-fluid wide header flex justify-between items-center gap-5 xl:gap-8"> <ul class="order-0 space space-x-5 xl:space-x-8 items-center flex text-content font-medium dark:text-title dark:text-opacity-60 dark:font-semibold"> <li style="width:132px"> <a href="/" class="block pb-2"> <img src="/_/MDBjN2M4YjIxY2Y1YWExZWE3Njk4M2FiZTg1NWZjNTM/logo-with-name.svg" width="132" alt="OCaml logo" class="dark:hidden"> <img src="/_/MTE3YWE5YzJlZmExNmYyMmI3ZmEwYjliMDEwNDBkMDY/logo-with-name-white.svg" width="132" alt="OCaml logo" class="hidden dark:inline"> </a> </li> </ul> <ul class="order-2 hidden lg:flex items-center"> <li> <form x-data="{ row: null, col: 0, max: 0, total: 0 }" @submit="if (row !== null) { window.location = document.getElementById('package-autocomplete-'+row+'-'+col).getAttribute('href'); $event.stopPropagation(); $event.preventDefault(); return false }" action="/packages/search" method="GET"> <div class="dropdown-container flex items-center justify-center h-10 rounded-md focus-within:outline-primary_25 dark:focus-within:outline-dark-primary_40 focus-within:outline focus-within:outline-2 lg:w-56 xl:w-80" tabindex="0"> <label for="q" class="sr-only">Search OCaml packages</label> <input type="search" name="q" placeholder="Search OCaml packages" @keydown.escape="$event.target.blur()" class="bg-white dark:bg-dark-card text-title dark:text-dark-title h-full w-full font-normal focus:border-primary dark:focus:border-dark-primary focus:ring-0 border-primary dark:border-dark-primary rounded-md rounded-r-none px-3 py-1 placeholder-text-content dark:placeholder:text-dark-content appearance-none focus:outline-none" @keydown.stop @keyup.down="if (row === null) { row = 0; col = 0; } else { row +=1; if (row > max) { row = max } }" @keyup.up="if (row !== null) { row -=1; if (row < 0) { row = null } }" @keyup.right="if (col < 1) col++" @keyup.left="if (col >= 1) col--" :aria-activedescendant="row !== null ? 'package-autocomplete-'+row+'-'+col : null" hx-get="/packages/autocomplete" hx-params="q" hx-trigger="keyup changed, search" hx-target="#header-search-results" hx-indicator="#header-search-indicator" autocomplete="off" > <button aria-label="search" class="h-full flex items-center justify-center rounded-r-md bg-primary dark:bg-dark-primary text-white dark:text-dark-white px-4" type="submit" ><svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" /> </svg> </button> <div class="dropdown w-full lg:w-[32rem] xl:w-[32rem] z-10 absolute rounded-md mt-12 shadow-2xl top-1 p-2 bg-background dark:bg-dark-background shadow-3xl dark:outline dark:outline-1 dark:outline-primary"> <div id="header-search-results" aria-live="polite"></div> <a class="flex py-2 px-2 mx-2 gap-4 hover:bg-primary_nav_block_hover_10 dark:hover:bg-dark-primary_nav_block_hover_10 font-normal rounded-md text-primary dark:text-dark-primary" href="/api"> Standard Library API <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path> </svg> </a> </div> </div> </form> </li> </ul> <ul class="order-1 mr-auto items-center hidden lg:flex font-medium dark:text-white dark:text-opacity-60 dark:font-semibold"> <li><a href="/docs" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primary text-title dark:text-dark-title">Learn</a> </li> <li><a href="/tools" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primary text-title dark:text-dark-title">Tools</a> </li> <li><a href="/packages" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primary text-title dark:text-dark-title">Packages</a> </li> <li><a href="/community" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primary text-title dark:text-dark-title">Community</a> </li> <li><a href="/changelog" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primary text-primary dark:text-dark-primary underline">News</a> </li> <li><a href="/play" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primary text-title dark:text-dark-title">Play</a> </li> </ul> <ul class="order-3 hidden lg:flex items-center"> <li><a href="/docs/get-started" class="border border-primary dark:border-dark-primary text-primary dark:text-dark-primary font-bold py-2.5 px-7 whitespace-nowrap rounded">Get Started</a></li> </ul> <ul class="order-1 lg:hidden flex items-center"> <li class="h-12 w-12 hover:bg-primary_25 dark:hover:bg-primary_20 flex items-center justify-center rounded-full text-content dark:text-dark-title"> <button aria-label="open menu" @click="open = ! open"> <svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 10h16M4 14h16M4 18h16" /> </svg> </button> </li> </ul> </nav> <div class="bg-black fixed w-full h-full left-0 top-0 opacity-60 z-40" x-show='open' x-cloak></div> <nav class="z-50 h-full fixed right-0 top-0 max-w-full w-96 bg-background dark:bg-dark-background shadow-lg" x-show="open" x-cloak @click.away="open = false" x-transition:enter="transition duration-200 ease-out" x-transition:enter-start="translate-x-full" x-transition:leave="transition duration-100 ease-in" x-transition:leave-end="translate-x-full"> <ul class="text-content p-6 font-semibold"> <li class="flex justify-between items-center"> <a href="/"> <img src="/_/MDBjN2M4YjIxY2Y1YWExZWE3Njk4M2FiZTg1NWZjNTM/logo-with-name.svg" width="132" alt="OCaml logo" class="dark:hidden"> <img src="/_/MTE3YWE5YzJlZmExNmYyMmI3ZmEwYjliMDEwNDBkMDY/logo-with-name-white.svg" width="132" alt="OCaml logo" class="hidden dark:inline"> </a> <div class="" x-on:click="open = false"> <button aria-label="close" class="text-content dark:text-dark-title"> <svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" /> </svg> </button> </div> </li> <li class="mt-6 mb-3"> <form action="/packages/search" method="GET"> <div class="dropdown-container flex items-center justify-center h-10 rounded-md focus-within:outline-primary_25 dark:focus-within:outline-dark-primary_40 focus-within:outline focus-within:outline-2 " tabindex="0"> <label for="q" class="sr-only">Search OCaml packages</label> <input type="search" name="q" placeholder="Search OCaml packages" @keydown.escape="$event.target.blur()" class="bg-white dark:bg-dark-card text-title dark:text-dark-title h-full w-full font-normal focus:border-primary dark:focus:border-dark-primary focus:ring-0 border-primary dark:border-dark-primary rounded-md rounded-r-none px-3 py-1 placeholder-text-content dark:placeholder:text-dark-content appearance-none focus:outline-none" > <button aria-label="search" class="h-full flex items-center justify-center rounded-r-md bg-primary dark:bg-dark-primary text-white dark:text-dark-white px-4" type="submit" ><svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" /> </svg> </button> </div> </form> </li> <li><a href="/docs" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primaryblock text-title dark:text-dark-title">Learn</a> </li> <li><a href="/tools" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primaryblock text-title dark:text-dark-title">Tools</a> </li> <li><a href="/packages" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primaryblock text-title dark:text-dark-title">Packages</a> </li> <li><a href="/community" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primaryblock text-title dark:text-dark-title">Community</a> </li> <li><a href="/changelog" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primaryblock text-primary dark:text-dark-primary underline">News</a> </li> <li><a href="/play" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primaryblock text-title dark:text-dark-title">Play</a> </li> <li> <a href="/api" class="flex py-3 px-1 gap-4 font-semibold text-primary dark:text-dark-primary">Standard Library API<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path> </svg> </a> </li> <li class="mt-3 mb-6"> <a href="/docs/get-started" class="w-full rounded font-normal py-3 px-7 flex items-center justify-center bg-primary dark:bg-dark-primary text-white dark:text-dark-title">Get started</a> </li> <li> <div class="space-x-6 text-2xl flex items-center"> <a aria-label="OCaml's Discord" href="https://discord.gg/cCYQbqN" class="opacity-60 hover:opacity-100 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path fill-rule="evenodd" d="M18.9419 5.29661C17.6473 4.69088 16.263 4.25066 14.8157 4C14.638 4.32134 14.4304 4.75355 14.2872 5.09738C12.7487 4.86601 11.2245 4.86601 9.7143 5.09738C9.57116 4.75355 9.3588 4.32134 9.17947 4C7.73067 4.25066 6.3448 4.6925 5.05016 5.29982C2.43887 9.24582 1.73099 13.0938 2.08493 16.8872C3.81688 18.1805 5.49534 18.9662 7.14548 19.4804C7.55291 18.9196 7.91628 18.3235 8.22931 17.6953C7.63313 17.4688 7.06211 17.1892 6.52256 16.8647C6.6657 16.7586 6.80571 16.6478 6.94098 16.5337C10.2318 18.0729 13.8074 18.0729 17.0589 16.5337C17.1958 16.6478 17.3358 16.7586 17.4774 16.8647C16.9362 17.1908 16.3637 17.4704 15.7675 17.697C16.0805 18.3235 16.4423 18.9212 16.8513 19.4819C18.503 18.9678 20.183 18.1822 21.915 16.8872C22.3303 12.4897 21.2056 8.67705 18.9419 5.29661ZM8.67765 14.5543C7.68977 14.5543 6.87963 13.632 6.87963 12.509C6.87963 11.3859 7.67247 10.4621 8.67765 10.4621C9.68285 10.4621 10.493 11.3843 10.4757 12.509C10.4772 13.632 9.68285 14.5543 8.67765 14.5543ZM15.3223 14.5543C14.3344 14.5543 13.5243 13.632 13.5243 12.509C13.5243 11.3859 14.3171 10.4621 15.3223 10.4621C16.3275 10.4621 17.1376 11.3843 17.1203 12.509C17.1203 13.632 16.3275 14.5543 15.3223 14.5543Z" clip-rule="evenodd" /> </svg> </a> <a aria-label="The OCaml Compiler on GitHub" href="https://github.com/ocaml/ocaml" class="opacity-60 hover:opacity-100 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path fill-rule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" clip-rule="evenodd" /> </svg> </a> <a aria-label="The OCaml Language Twitter Account" href="https://twitter.com/ocaml_org" class="opacity-60 hover:opacity-100 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84" /> </svg> </a> </div> </li> </ul> </nav> </header> <script> window.addEventListener('keydown', function(event) { if (event.key === "/") { event.preventDefault(); document.querySelector("input[type='search']").focus() } }) </script> <main class="bg-background dark:bg-dark-background"><nav aria-label="breadcrumbs" class="px-4 flex bg-title dark:bg-[#111827] text-white dark:text-dark-title md:hidden"> <ul> <li class="inline-block"> <a href="/changelog" class="flex items-center px-2 py-2 border-transparent border-2 border-b-4"> News <span> <svg xmlns="http://www.w3.org/2000/svg" class="w-3 h-3 ml-2" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" /> </svg> </span> </a> </li> <li class="inline-block"> <select onchange="location = this.value;" class="appearance-none border-2 border-b-4 bg-transparent bg-none font-bold border-none w-auto p-0 m-0 cursor-pointer focus:outline-none focus:ring-0"> <option value="/changelog" selected> Changelog </option> <option value="/ocaml-planet" > OCaml Planet </option> <option value="/news" > Newsletters </option> </select> <span class="text-primary dark:text-dark-primary cursor-pointer">&#x25BE;</span> </li> </ul> </nav> <div class="bg-title dark:bg-[#111827] hidden md:flex"> <nav class="container-fluid wide flex flex-wrap"> <a href="/changelog" class="justify-start px-4 py-2 text-white dark:text-dark-title items-center font-normal border-2 border-b-4 border-transparent rounded border-b-primary dark:border-b-dark-primary"> Changelog </a> <a href="/ocaml-planet" class="justify-start px-4 py-2 text-white dark:text-dark-title items-center font-normal border-2 border-b-4 border-transparent rounded opacity-80 hover:text-primary dark:hover:text-dark-primary"> OCaml Planet </a> <a href="/news" class="justify-start px-4 py-2 text-white dark:text-dark-title items-center font-normal border-2 border-b-4 border-transparent rounded opacity-80 hover:text-primary dark:hover:text-dark-primary"> Newsletters </a> </nav> </div> <div class="bg-background dark:bg-dark-background"> <div class="flex-1 z-0 z- min-w-0 pb-12"> <div class="intro-section-simple dark:dark-intro-section-simple py-12"> <div class="container-fluid"> <div class="flex items-center"> <h1 class="m-0 font-sans text-3xl font-extrabold tracking-normal leading-8 capitalize lg:text-5xl lg:tracking-tight md:text-4xl text-title dark:text-dark-title"> OCaml Changelog </h1> <a href="/changelog.xml" class="text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary ml-4 lg:ml-6"> <span class="sr-only">RSS</span> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 md:h-8 md:w-8 lg:h-10 lg:w-10" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path fill-rule="evenodd" d="M15.2692 22H11.3846C11.3846 16.8462 7.11538 12.6154 2 12.6154V8.73077C9.26923 8.73077 15.2692 14.7308 15.2692 22ZM18 22C18 13.2308 10.7692 6 2 6V2C12.9615 2 22 11.0385 22 22H18Z" clip-rule="evenodd" /> <path fill-rule="evenodd" d="M4.73077 22C6.23893 22 7.46154 20.7774 7.46154 19.2692C7.46154 17.7611 6.23893 16.5385 4.73077 16.5385C3.22261 16.5385 2 17.7611 2 19.2692C2 20.7774 3.22261 22 4.73077 22Z" clip-rule="evenodd" /> </svg> </a> </div> <p class="text-lg text-content dark:text-dark-content mt-6">Read the latest releases and updates from the OCaml compiler, OCaml infrastructure and the OCaml Platform Tools.</p> <div class="flex flex-wrap gap-2 mt-6"> <a href="?t=ocaml" class="group whitespace-nowrap h-12 flex p-3 px-4 items-center bg-white dark:bg-dark-card hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl border-primary dark:border-dark-primary border-2 rounded-lg text-title dark:text-dark-title text-sm"> <span class="flex-grow">Compiler</span> </a> <a href="?t=platform" class="group whitespace-nowrap h-12 flex p-3 px-4 items-center bg-white dark:bg-dark-card hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl border-primary dark:border-dark-primary border-2 rounded-lg text-title dark:text-dark-title text-sm"> <span class="flex-grow">Platform</span> </a> <a href="?t=developer-preview" class="group whitespace-nowrap h-12 flex p-3 px-4 items-center bg-white dark:bg-dark-card hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl border-primary dark:border-dark-primary border-2 rounded-lg text-title dark:text-dark-title text-sm"> <span class="flex-grow">Developer Preview</span> </a> <a href="?t=infrastructure" class="group whitespace-nowrap h-12 flex p-3 px-4 items-center bg-white dark:bg-dark-card hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl border-primary dark:border-dark-primary border-2 rounded-lg text-title dark:text-dark-title text-sm"> <span class="flex-grow">Infrastructure</span> </a> <a href="?t=ocaml-org" class="group whitespace-nowrap h-12 flex p-3 px-4 items-center bg-white dark:bg-dark-card hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl border-primary dark:border-dark-primary border-2 rounded-lg text-title dark:text-dark-title text-sm"> <span class="flex-grow">OCaml.org</span> </a> </div> </div> </div> <div class="bg-background dark:bg-dark-background py-12"> <div class="leading-5 text-content dark:text-dark-content"> <div class="mx-auto max-w-screen-xl px-6 leading-5 text-content dark:text-dark-content sm:px-10 lg:px-6"> <form action="/changelog" method="GET"> <label for="t" class="sr-only">Tag</label> <select id="t" name="t" onchange="this.form.submit()" class="mt-2 block w-48 rounded-md border-0 py-1.5 pl-3 pr-10 text-content dark:text-dark-content ring-1 ring-inset bg-white dark:bg-dark-card ring-separator_20 dark:ring-dark-separator_30 focus:ring-2 focus:ring-primary dark:focus:ring-dark-primary sm:text-sm sm:leading-6"> <option value="" selected>All Tags</option> <option value="developer-preview" >developer-preview</option> <option value="dune" >dune</option> <option value="dune-release" >dune-release</option> <option value="infrastructure" >infrastructure</option> <option value="mdx" >mdx</option> <option value="merlin" >merlin</option> <option value="ocaml" >ocaml</option> <option value="ocaml-lsp" >ocaml-lsp</option> <option value="ocamlformat" >ocamlformat</option> <option value="ocp-indent" >ocp-indent</option> <option value="odoc" >odoc</option> <option value="omp" >omp</option> <option value="opam" >opam</option> <option value="opam-publish" >opam-publish</option> <option value="platform" >platform</option> <option value="ppxlib" >ppxlib</option> <option value="utop" >utop</option> </select> </form> </div> </div> <div class="container-fluid"> <div class="mt-20 md:pl-8 md:border-l-2 border-separator_20 dark:border-dark-separator_30"> <div class="flex flex-col gap-6 lg:gap-8 mx-auto"> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2025-04-03-dune.3.18.0">Dune 3.18.0</a> </h2> <time datetime="2025-04-03" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">03 Apr 2025</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=dune" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">dune</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>The Dune Team is happy to announce the release of Dune <code>3.18.0</code>!</p> <p>This release contains changes to support the new <code>x-maintenance-intent</code> field by default. It also contains some changes regarding the cache about how it handles file permissions. It introduces a new <code>(format-dune-file ...)</code> stanza with the intention to formalize the <code>dune format-dune-file</code> command as an inside rule. Finally, it includes various bug fixes for Dune.</p> <details> <summary>See full changelog</summary> <h3>Fixed</h3> <ul> <li> <p>Support HaikuOS: don't call <code>execve</code> since it's not allowed if other pthreads have been created. The fact that Haiku can't call <code>execve</code> from other threads than the principal thread of a process (a team in haiku jargon), is a discrepancy to POSIX and hence there is a <a href="https://dev.haiku-os.org/ticket/18665">bug about it</a>. (@Sylvain78, #10953)</p> </li> <li> <p>Fix flag ordering in generated Merlin configurations (#11503, @voodoos, fixes ocaml/merlin#1900, reported by @vouillon)</p> </li> </ul> <h3>Added</h3> <ul> <li> <p>Add <code>(format-dune-file &lt;src&gt; &lt;dst&gt;)</code> action. It provides a replacement to <code>dune format-dune-file</code> command. (#11166, @nojb)</p> </li> <li> <p>Allow the <code>--prefix</code> flag when configuring dune with <code>ocaml configure.ml</code>. This allows to set the prefix just like <code>$ dune install --prefix</code>. (#11172, @rgrinberg)</p> </li> <li> <p>Allow arguments starting with <code>+</code> in preprocessing definitions (starting with <code>(lang dune 3.18)</code>). (@amonteiro, #11234)</p> </li> <li> <p>Support for opam <code>(maintenance_intent ...)</code> in dune-project (#11274, @art-w)</p> </li> <li> <p>Validate opam <code>maintenance_intent</code> (#11308, @art-w)</p> </li> <li> <p>Support <code>not</code> in package dependencies constraints (#11404, @art-w, reported by @hannesm)</p> </li> </ul> <h3>Changed</h3> <ul> <li> <p>Warn when failing to discover root due to reads failing. The previous behavior was to abort. (@KoviRobi, #11173)</p> </li> <li> <p>Use shorter path for inline-tests artifacts. (@hhugo, #11307)</p> </li> <li> <p>Allow dash in <code>dune init</code> project name (#11402, @art-w, reported by @saroupille)</p> </li> <li> <p>On Windows, under heavy load, file delete operations can sometimes fail due to AV programs, etc. Guard against it by retrying the operation up to 30x with a 1s waiting gap (#11437, fixes #11425, @MSoegtropIMC)</p> </li> <li> <p>Cache: we now only store the executable permission bit for files (#11541, fixes #11533, @ElectreAAS)</p> </li> <li> <p>Display negative error codes on Windows in hex which is the more customary way to display <code>NTSTATUS</code> codes (#11504, @MisterDA)</p> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2025-03-26-freebsd-14.2">FreeBSD 14.2 Upgrade</a> </h2> <time datetime="2025-03-26" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">26 Mar 2025</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=infrastructure" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">infrastructure</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p><a href="https://github.com/ocurrent/obuilder">OBuilder</a> workers for FreeBSD have been updated to FreeBSD 14.2. See <a href="https://github.com/ocurrent/freebsd-infra/commit/e9062f1b5a89bce9b26a1f79d09e88b5477a7f65">ocurrent/freebsd-infra</a></p> <p>From today, <a href="https://ocaml.ci.dev">ocaml-ci</a> and <a href="https://opam.ci.ocaml.org">opam-repo-ci</a> will test against FreeBSD 14.2 rather than 14.1.</p> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2025-03-24-recent-ocaml-versions">OCaml-version 4.0.0 released</a> </h2> <time datetime="2025-03-24" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">24 Mar 2025</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=infrastructure" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">infrastructure</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>Following a post on <a href="https://discuss.ocaml.org/t/docker-base-images-and-ocaml-ci-support-for-ocaml-4-08/16229">discuss.ocaml.org</a>, there has been a new release of <a href="https://github.com/ocurrent/ocaml-version">ocurrent/ocaml-version</a> that moves the minimum version of OCaml, considered as <em>recent</em>, from 4.02 to 4.08.</p> <pre><code><span class='ocaml-keyword'>let</span><span class='ocaml-source'> </span><span class='ocaml-entity-name-function-binding'>recent</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>=</span><span class='ocaml-source'> </span><span class='ocaml-source'>[</span><span class='ocaml-source'> </span><span class='ocaml-source'>v4_08</span><span class='ocaml-keyword-other-ocaml punctuation-separator-terminator punctuation-separator'>;</span><span class='ocaml-source'> </span><span class='ocaml-source'>v4_09</span><span class='ocaml-keyword-other-ocaml punctuation-separator-terminator punctuation-separator'>;</span><span class='ocaml-source'> </span><span class='ocaml-source'>v4_10</span><span class='ocaml-keyword-other-ocaml punctuation-separator-terminator punctuation-separator'>;</span><span class='ocaml-source'> </span><span class='ocaml-source'>v4_11</span><span class='ocaml-keyword-other-ocaml punctuation-separator-terminator punctuation-separator'>;</span><span class='ocaml-source'> </span><span class='ocaml-source'>v4_12</span><span class='ocaml-keyword-other-ocaml punctuation-separator-terminator punctuation-separator'>;</span><span class='ocaml-source'> </span><span class='ocaml-source'>v4_13</span><span class='ocaml-keyword-other-ocaml punctuation-separator-terminator punctuation-separator'>;</span><span class='ocaml-source'> </span><span class='ocaml-source'>v4_14</span><span class='ocaml-keyword-other-ocaml punctuation-separator-terminator punctuation-separator'>;</span><span class='ocaml-source'> </span><span class='ocaml-source'>v5_0</span><span class='ocaml-keyword-other-ocaml punctuation-separator-terminator punctuation-separator'>;</span><span class='ocaml-source'> </span><span class='ocaml-source'>v5_1</span><span class='ocaml-keyword-other-ocaml punctuation-separator-terminator punctuation-separator'>;</span><span class='ocaml-source'> </span><span class='ocaml-source'>v5_2</span><span class='ocaml-keyword-other-ocaml punctuation-separator-terminator punctuation-separator'>;</span><span class='ocaml-source'> </span><span class='ocaml-source'>v5_3</span><span class='ocaml-source'> </span><span class='ocaml-source'>]</span><span class='ocaml-source'> </span></code></pre> <p>This change has far reaching side effects as <a href="https://github.com/ocurrent/ocaml-ci">OCaml-CI</a>, <a href="https://github.com/ocurrent/opam-repo-ci">opam-repo-ci</a>, <a href="https://github.com/ocurrent/docker-base-images">Docker base image builder</a> among other things, use this to determine the set of versions of OCaml to test against. As these services are updated, testing on the old releases will be removed.</p> <details> <summary>See full changelog</summary> <ul> <li>ocaml-version 4.0.0 released (by ~mtelvers, https://github.com/ocurrent/ocaml/version)</li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2025-03-05-ppxlib-0.36.0">Ppxlib 0.36.0</a> </h2> <time datetime="2025-03-05" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">05 Mar 2025</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=ppxlib" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">ppxlib</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We are happy to announce the release of ppxlib.0.36.0!</p> <p>With this release, the internal AST that ppxlib targets has been bumped to the AST of OCaml 5.2. Ppx authors can now use features from OCaml 5.2. Ppxlib still supports any OCaml compiler after and including 4.08.0.</p> <p>Many ppxes will be broken by changes made to the representation of functions. Authors are encouraged to read <a href="https://github.com/ocaml-ppx/ppxlib/wiki/Upgrading-to-ppxlib-0.36.0">the upgrade guide</a>.</p> <details> <summary>See full changelog</summary> <ul> <li> <p>Change <code>Location.none</code> to match the compiler's <code>Location.none</code> as of OCaml 4.08. This fixes a bug in <code>loc_of_attribute</code> (#540, @ncik-roberts, @patricoferris)</p> </li> <li> <p>Bump ppxlib's AST to 5.2.0 (#514, @patricoferris)</p> </li> <li> <p>Add the <code>[@@@expand_inline]</code> transformation and support for floating attribute context free transformations. (#560, @jaymody)</p> </li> <li> <p>Add a <code>-raise-embedded-errors</code> flag to the driver. Setting this flag raises the first <code>ocaml.error</code> embedded in the final AST.</p> </li> <li> <p>Export <code>Ast_pattern.fail</code>. (#563, @ceastlund)</p> </li> <li> <p>Make <code>Ast_traverse.sexp_of</code> more concise, and add a test. (#561, @ceastlund)</p> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2025-02-04-ppxlib-0.35.0">Ppxlib 0.35.0</a> </h2> <time datetime="2025-02-04" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">04 Feb 2025</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=ppxlib" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">ppxlib</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We are happy to announce the release of ppxlib.0.35.0!</p> <p>The main feature of this release is improved support for OCaml 5.3, allowing ppx users to have ppx rewriters operate on files with the new effect syntax.</p> <p>Note that ppx-es and the effect syntax can cohabit but it is possible that ppx rewriters will error out if they encounter effect syntax node in their extension's payload or in the items they generate code from.</p> <p>This feature also comes with a new <code>--use-compiler-pp</code> driver flag. This flag is required to preserve the effect syntax when the ppxlib driver outputs source code instead of marshalled AST. Note that the vast majority of users won't need to use this flag but it can come in handy in some more advanced use cases.</p> <details> <summary>See full changelog</summary> <ul> <li> <p>Allow use of effect syntax in preprocessed files without causing migration failures. (#552, @hhugo, @NathanReb)</p> </li> <li> <p>Remove support for compilers older than 4.08 (#556, @NathanReb)</p> </li> <li> <p>Add a <code>--use-compiler-pp</code> flag to the standalone driver. This flag can be set when the driver outputs source code to make it use the compiler's <code>Pprintast</code> instead of ppxlib's. (#555, @NathanReb)</p> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2025-01-23-dune.3.17.2">Dune 3.17.2</a> </h2> <time datetime="2025-01-23" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">23 Jan 2025</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=dune" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">dune</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>The Dune team is happy to announce the release of Dune 3.17.2!</p> <p>This patch release includes some bug fixes. It brings some fixes for Melange and Wasm_of_ocaml. It also fixes a bug that prevents the experimental feature, package management, to build with <code>ocaml.5.3.0</code>.</p> <details> <summary>See full changelog</summary> <h3>Fixed</h3> <ul> <li>Fix a crash in the Melange rules that would prevent compiling public library implementations of virtual libraries. (@anmonteiro, #11248)</li> <li>Pass <code>melange.emit</code>'s <code>compile_flags</code> to the JS emission phase. (@anmonteiro, #11252)</li> <li>Disallow private implementations of public virtual libs in melange mode. (@anmonteiro, #11253)</li> <li>Wasm_of_ocaml: fix the execution of tests in a sandbox. (#11304, @vouillon)</li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2025-01-08-ppxlib-0.34.0">Ppxlib 0.34.0</a> </h2> <time datetime="2025-01-08" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">08 Jan 2025</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=ppxlib" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">ppxlib</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We’re happy to announce that we just released ppxlib.0.34.0.</p> <p>The full patch notes are available on the release page over here.</p> <p>The main features are OCaml 5.3 compatibility, new AST pretty-printing utilities and the ppxlib-tools package, support for [@@deriving ...] on class types and the addition of missing Pprintast entry points.</p> <h2>Changes summary</h2> <h3>5.3 compatibility</h3> <p>ppxlib.0.34.0 is the first official ppxlib release that’s compatible with the new 5.3 compiler.</p> <p>The ppxlib driver now also comes with a <code>-keywords</code> CLI option, similar to the compiler’s that allow you to compile and preprocess with the 5.3 compiler code that uses effect as an identifier. This is pretty niche but it’s there should you need it.</p> <p>Please note that means you can use ppx-es with a 5.3 compiler but not that ppx-es can consume/produce 5.3 language features. We’re currently working on a fix allowing you to use the effect syntax in files that require preprocessing as it’s not possible with 0.34.0. The fix should be released in the next few days as 0.34.1.</p> <h3>AST pretty-printing</h3> <p>We added a new <code>Pp_ast</code> module that allows you to pretty print AST fragments.</p> <p>The only way ppxlib would print ASTs before were as S-expressions. In practice we found that it was not always helpful and wanted a more readable and human friendly way of displaying the AST.</p> <p>The default output of those printer is a simplified version of the AST to keep things clear and avoid cluttering the output with information that is not always useful. For example, if you run <code>Ppxlib.Pp_ast.Default.expression</code> on the AST for <code>x + 2</code>, you’ll get the following:</p> <pre><code>Pexp_apply ( Pexp_ident (Lident &quot;+&quot;) , [ ( Nolabel, Pexp_ident (Lident &quot;x&quot;)) ; ( Nolabel, Pexp_constant (Pconst_integer ( &quot;2&quot;, None))) ] ) </code></pre> <p>The alert reader will note that there are no locations or attributes and that the expression record layer is omitted here.</p> <p>You can of course configure the printer to display more information if you need to.</p> <p>We’ve been using these new printers internally to debug migration code and they have been a huge help so we hope they will make working with ppxlib easier for you too.</p> <p>In addition to this new module, we also added a command line utility called <code>ppxlib-pp-ast</code> to pretty print ASTs from source files, source code fragments or even marshalled AST files. It is very similar to the old <code>ppx_tools</code>’s <code>dumpast</code>.</p> <p>Note that it will print ppxlib’s internal AST after it’s been migrated from the installed compiler’s version. This is something that we could not simply achieve with OCaml’s own <code>-dparsetree</code>.</p> <p>This should be a useful tool for debugging ppx related bugs or learning about the AST and we hope ppx authors and users will like it.</p> <h3>Other changes</h3> <p>As mentioned above, we also added some missing <code>Pprintast</code>* entries such as <code>binding</code>, <code>longident</code> and <code>payload</code>.</p> <p>It is now possible to use <code>[@@deriving ...]</code> on class type declarations and therefore to write derivers for class types.</p> <p>*: <em>To the confused readers: Pprintast is entirely different from Pp_ast mentioned above as it prints the source code corresponding to a given AST.</em></p> <h2>Special thanks</h2> <p>We wanted to thank our external contributors for this release: @hhugo, @nojb and @dra27 for their help on the 5.3 compat and @mattiasdrp for bringing the Pprintast module up to speed.</p> <p>Special thanks as well to @pedrobslisboa who started integrating their excellent ppx-by-example into ppxlib’s documentation.</p> <p>Finally, I’d also like to thank the OCaml Software Foundation who’s been funding all my work on ppxlib and made this release possible!</p> <p>Happy preprocessing to you all!</p> <details> <summary>See full changelog</summary> <ul> <li> <p>Add initial OCaml 5.3 support (#487, @NathanReb, @hhugo, @nojb)</p> </li> <li> <p>Initialise OCaml 5.3's lexer with the <code>keywords</code> setting from <code>OCAMLPARAM</code> or the new <code>-keywords</code> driver's CLI option to allow the standalone ppx driver to process old packages using <code>effect</code> as an identifier (#535, @dra27, @NathanReb)</p> </li> <li> <p>Add <code>Pprintast.binding</code>, <code>longident</code> and <code>payload</code> (#542, @mattiasdrp)</p> </li> <li> <p>Fix <code>deriving_inline</code> round-trip check so that it works with 5.01 &lt;-&gt; 5.02 migrations (#519, @NathanReb)</p> </li> <li> <p>Add ppxlib's AST pretty-printing utilities in <code>Ppxlib.Pp_ast</code> and a <code>ppxlib-pp-ast</code> executable in a new separate <code>ppxlib-tools</code> package (#517, #525, #537, @NathanReb)</p> </li> <li> <p>Change <code>-dparsetree</code> from a sexp output to a pretty printed AST, closer to what the compiler's <code>-dparsetree</code> is. (#530, @NathanReb)</p> </li> <li> <p>Add Parsetree documentation comments to <code>Ast_builder</code> functions (#518, @patricoferris)</p> </li> <li> <p>Support class type declarations in derivers with the new, optional arguments <code>{str,sig}_class_type_decl</code> in <code>Deriving.add</code> (#538, @patricoferris)</p> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2025-01-08-ocaml-5.3.0">Release of OCaml 5.3.0</a> </h2> <time datetime="2025-01-08" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">08 Jan 2025</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=ocaml" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">ocaml</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We have the pleasure of announcing the release of OCaml version 5.3.0. dedicated to the memory of John William Mauchly and Paul Verlaine on the anniversary of their death.</p> <blockquote> <p>De la musique avant toute chose, Et pour cela préfère l’Impair</p> </blockquote> <blockquote> <p>(Music first and foremost of all! Choose your measure of odd not even)</p> </blockquote> <p>Some of the highlights in OCaml 5.3.0 are:</p> <ul> <li> <p>Syntax for deep effect handlers</p> <p>There is now a dedicated syntax for installing deep effect handler</p> <pre><code><span class='ocaml-keyword-other'>match</span><span class='ocaml-source'> </span><span class='ocaml-source'>f</span><span class='ocaml-source'> </span><span class='ocaml-constant-language-unit'>()</span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>with</span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>|</span><span class='ocaml-source'> </span><span class='ocaml-source'>x</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>-&gt;</span><span class='ocaml-source'> </span><span class='ocaml-source'>x</span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>|</span><span class='ocaml-source'> </span><span class='ocaml-source'>effect</span><span class='ocaml-source'> </span><span class='ocaml-constant-language-capital-identifier'>Random_float</span><span class='ocaml-keyword-other-ocaml punctuation-comma punctuation-separator'>,</span><span class='ocaml-source'> </span><span class='ocaml-source'>k</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>-&gt;</span><span class='ocaml-source'> </span><span class='ocaml-constant-language-capital-identifier'>Effect</span><span class='ocaml-keyword-other-ocaml punctuation-other-period punctuation-separator'>.</span><span class='ocaml-constant-language-capital-identifier'>Deep</span><span class='ocaml-keyword-other-ocaml punctuation-other-period punctuation-separator'>.</span><span class='ocaml-source'>continue</span><span class='ocaml-source'> </span><span class='ocaml-source'>k</span><span class='ocaml-source'> </span><span class='ocaml-source'>(</span><span class='ocaml-constant-language-capital-identifier'>Random</span><span class='ocaml-keyword-other-ocaml punctuation-other-period punctuation-separator'>.</span><span class='ocaml-support-type'>float</span><span class='ocaml-source'> </span><span class='ocaml-constant-numeric-decimal-float'>1.0</span><span class='ocaml-source'>)</span><span class='ocaml-source'> </span></code></pre> <p>This new syntax adds a new <code>effect</code> keyword, which may break existing code. To improve backward compatibility, this new keyword can be disabled with the new <code>-keywords</code> flags if needed for backward compatibility.</p> </li> <li> <p>Restored MSVC port</p> <p>It is now possible to use the MSVC toolchain on Windows, restoring the last missing port from OCaml 4 (except for the native compiler support for 32-bit architectures which is not planned)</p> </li> <li> <p>Re-introduced statistical memory profiling (statmemprof)</p> <p>The submodule <code>Gc.memprof</code> is restored with a slightly different API. This submodule can be used to monitor memory allocation statistics inside a program. In OCaml 5, each domain can be monitored independently while child domains inherit the parent domain profiling profile (if there is one active).</p> </li> <li> <p>utf-8 encoded Unicode source files and modest support of Unicode identifiers</p> <pre><code><span class='ocaml-keyword-other'>type</span><span class='ocaml-source'> </span><span class='ocaml-source'>saison</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>=</span><span class='ocaml-source'> </span><span class='ocaml-constant-language-capital-identifier'>Hiver</span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>|</span><span class='ocaml-source'> </span><span class='ocaml-constant-language-capital-identifier'>Été</span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>|</span><span class='ocaml-source'> </span><span class='ocaml-constant-language-capital-identifier'>Printemps</span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>|</span><span class='ocaml-source'> </span><span class='ocaml-constant-language-capital-identifier'>Automne</span><span class='ocaml-source'> </span></code></pre> <p>The OCaml lexer has been extended to support a modest subset of Unicode characters in identifiers. This is mostly intended for pedagogical use. This extended support requires source files to be utf-8 encoded Unicode text.</p> </li> <li> <p>More space-efficient implementation of Dynarray</p> <p>The internal implementation of <code>Dynarray</code> now uses an unboxed representation which avoids the need of storing items wrapped in a <code>Some x</code> block and thus saves some spaces and indirections.</p> </li> <li> <p>Improved metadata on the pairs of declarations and definitions for merlin.</p> <p>The metadata stored inside cmt files has been improved to better distinguish the provenance of identifiers (previous versions could confuse an interface and implementation identifier). Similarly, the metadata now tracks more precisely the association between declarations and definitions. For instance, in</p> <pre><code><span class='ocaml-keyword-other'>module</span><span class='ocaml-source'> </span><span class='ocaml-constant-language-capital-identifier'>X</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>=</span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>struct</span><span class='ocaml-source'> </span><span class='ocaml-keyword'>let</span><span class='ocaml-source'> </span><span class='ocaml-entity-name-function-binding'>x</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>=</span><span class='ocaml-source'> </span><span class='ocaml-constant-numeric-decimal-integer'>0</span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>end</span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>module</span><span class='ocaml-source'> </span><span class='ocaml-constant-language-capital-identifier'>M</span><span class='ocaml-keyword-other-ocaml punctuation-other-colon punctuation'>:</span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>sig</span><span class='ocaml-source'> </span><span class='ocaml-source'> </span><span class='ocaml-keyword'>val</span><span class='ocaml-source'> </span><span class='ocaml-entity-name-function-binding'>x</span><span class='ocaml-source'>: int </span><span class='ocaml-keyword-other'>end</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>=</span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>struct</span><span class='ocaml-source'> </span><span class='ocaml-source'> </span><span class='ocaml-keyword'>let</span><span class='ocaml-source'> </span><span class='ocaml-entity-name-function-binding'>x</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>=</span><span class='ocaml-source'> </span><span class='ocaml-constant-numeric-decimal-integer'>1</span><span class='ocaml-source'> </span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>include</span><span class='ocaml-source'> </span><span class='ocaml-constant-language-capital-identifier'>X</span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>end</span><span class='ocaml-source'> </span></code></pre> <p>Merlin can now determine that the definition of the <code>M.x</code> value lies inside the module <code>X</code>.</p> </li> </ul> <p>And a lot of incremental changes:</p> <ul> <li>Around 20 new functions in the standard library (in the <code>Domain</code>, <code>Dynarray</code> <code>Format</code>, <code>List</code>, <code>Queue</code>, <code>Sys</code>, and <code>Uchar</code> modules).</li> <li>Many fixes and improvements in the runtime</li> <li>Improved error messages for first-class modules, functors, labelled arguments, and type clashes.</li> <li>Numerous bug fixes</li> </ul> <p>Please report any unexpected behaviours on the <a href="https://github.com/ocaml/ocaml/issues">OCaml issue tracker</a> and post any questions or comments you might have on our <a href="https://discuss.ocaml.org">discussion forums</a>.</p> <p>The full list of changes can be found in the full changelog.</p> <hr> <h2>Installation Instructions</h2> <p>The base compiler can be installed as an opam switch with the following commands:</p> <pre><code><span class='bash-source'>opam update </span><span class='bash-source'>opam switch create 5.3.0 </span></code></pre> <p>The source code for the release is also directly available on:</p> <ul> <li><a href="https://github.com/ocaml/ocaml/releases/download/5.3.0/ocaml-5.3.0.tar.gz">GitHub</a></li> <li><a href="https://caml.inria.fr/pub/distrib/ocaml-5.3/ocaml-5.3.0.tar.gz">OCaml archives at Inria</a></li> </ul> <h3>Fine-Tuned Compiler Configuration</h3> <p>If you want to tweak the configuration of the compiler, you can switch to the option variant with:</p> <pre><code><span class='bash-source'>opam update </span><span class='bash-source'>opam switch create </span><span class='bash-keyword-operator-redirect'>&lt;</span><span class='bash-source'>switch_name</span><span class='bash-keyword-operator-redirect'>&gt;</span><span class='bash-source'> ocaml-variants.5.3.0+options </span><span class='bash-keyword-operator-redirect'>&lt;</span><span class='bash-source'>option_list</span><span class='bash-keyword-operator-redirect'>&gt;</span><span class='bash-source'> </span></code></pre> <p>where <code>&lt;option_list&gt;</code> is a space separated list of <code>ocaml-option-*</code> packages. For instance, for a <code>flambda</code> and <code>no-flat-float-array</code> switch:</p> <pre><code><span class='bash-source'>opam switch create 5.3.0+flambda+nffa ocaml-variants.5.3.0+options ocaml-option-flambda ocaml-option-no-flat-float-array </span></code></pre> <details> <summary>See full changelog</summary> <p>(Changes that can break existing programs are marked with a &quot;*&quot;)</p> <h3>Restored backend:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12954">#12954</a>: Restore the MSVC port (David Allsopp, Antonin Décimo, Samuel Hym, and Miod Vallat, review by Nicolás Ojeda Bär)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13093">#13093</a>: Allow building the MSVC port with clang-cl. (Antonin Décimo, review by Nicolás Ojeda Bär, Samuel Hym, David Allsopp and Sébastien Hinderer)</p> </li> </ul> <h3>Language features:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12309">#12309</a>, <a href="https://github.com/ocaml/ocaml/issues/13158">#13158</a>: Add syntax support for deep effect handlers (Leo White, Tom Kelly, Anil Madhavapeddy, KC Sivaramakrishnan, Xavier Leroy and Florian Angeletti, review by the same, Hugo Heuzard, and Ulysse Gérard)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/11736">#11736</a>, <a href="https://github.com/ocaml/ocaml/issues/12664">#12664</a>, <a href="https://github.com/ocaml/ocaml/issues/13628">#13628</a>: Support utf-8 encoded source files and latin-9 compatible identifiers. (Xavier Leroy and Florian Angeletti, review by Daniel Bünzli and Jules Aguillon)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12828">#12828</a>, <a href="https://github.com/ocaml/ocaml/issues/13283">#13283</a>: Add short syntax for dependent functor types <code>(X:A) -&gt; ...</code> (Jeremy Yallop, review by Nicolás Ojeda Bär and Gabriel Scherer)</p> </li> </ul> <h3>Type system</h3> <ul> <li><a href="https://github.com/ocaml/ocaml/issues/11891">#11891</a>, <a href="https://github.com/ocaml/ocaml/issues/12507">#12507</a>: Allow to name new locally abstract types in constructor type annotations. (Jacques Garrigue, report and review by Gabriel Scherer and Florian Angeletti)</li> </ul> <h3>Runtime system:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/11911">#11911</a>, <a href="https://github.com/ocaml/ocaml/issues/12923">#12923</a>: Multicore statistical memory profiling. This restores a notable OCaml 4 feature that was missing in OCaml 5. (Nick Barnes, review by Stephen Dolan, Jacques-Henri Jourdan and Guillaume Munch-Maccagnoni).</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13419">#13419</a>: Fix memory bugs in runtime events system. (B. Szilvasy and Nick Barnes, review by Miod Vallat, Nick Barnes, Tim McGilchrist, and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13364">#13364</a>: Emit major slice counters in the runtime events. (KC Sivaramakrishnan and Sadiq Jaffer, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13382">#13382</a>: Add more documentation for Runtime_events types (Sadiq Jaffer, review by Tim McGilchrist, Miod Vallat and KC Sivaramakrishnan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13370">#13370</a>: Fix a low-probability crash when calling Gc.counters. (Demi Marie Obenour, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13272">#13272</a>: Allow maximum number of domains to be specified as a OCAMLRUNPARAM parameter. (KC Sivaramakrishnan, review by Guillaume Munch-Maccagnoni, Miod Vallat, Gabriel Scherer, David Allsopp, request by Zachary Yedidia).</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12579">#12579</a>: OS-based Synchronisation for Stop-the-World Sections (B. Szilvasy, review by Miod Vallat, Nick Barnes, Olivier Nicole, Gabriel Scherer and Damien Doligez)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12789">#12789</a>: Restore caml_unregister_frametable from OCaml 4 (Frédéric Recoules, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13003">#13003</a>: new, more consistent names for array-creation C functions (Gabriel Scherer, review by Olivier Nicole)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13013">#13013</a>: introduce a <code>caml_result</code> type to supersede the use of 'encoded exception values' in the FFI. (Gabriel Scherer, review by Damien Doligez, Guillaume Munch-Maccagnoni and Xavier Leroy, suggested by Guillaume Munch-Maccagnoni)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12407">#12407</a>, <a href="https://github.com/ocaml/ocaml/issues/13226">#13226</a>: Resource-handling improvements: add exception-returning variants for all exception-raising functions in <code>caml/fail.h</code>, for the purpose of cleaning-up state and resources before raising. (Guillaume Munch-Maccagnoni, review by Damien Doligez, Xavier Leroy and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13086">#13086</a>: Avoid spurious major GC slices. (Damien Doligez, report by Stephen Dolan, review by Gabriel Scherer and Stephen Dolan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/11779">#11779</a>, <a href="https://github.com/ocaml/ocaml/issues/13117">#13117</a>: Improve logic for fiber stack alignment. (Miod Vallat, report by Damien Doligez, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12839">#12839</a>: Remove ATOMIC_UINTNAT_INIT from camlatomic.h (as part of a larger cleanup of camlatomic.h) (David Allsopp, review by Antonin Décimo, Sébastien Hinderer, Samuel Hym, Guillaume Munch-Maccagnoni and Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13163">#13163</a>: Enable frame pointers on macOS x86_64 (Tim McGilchrist, review by Sébastien Hinderer and Fabrice Buoro)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12951">#12951</a>: Constify constructors and flags tables in C code (take 2). Now these tables will go in the readonly segment, where they belong. (Antonin Décimo, review by David Allsopp)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/10696">#10696</a>: Introduce __has_attribute and __has_c_attributes in &lt;caml/misc.h&gt; to test the support of specific attributes in C code. Introduce fallthrough as a wrapper around the fallthrough attribute. (Antonin Décimo, review by Nicolás Ojeda Bär, Xavier Leroy, and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13083">#13083</a>: Use macros from limits.h to avoid signed-integer wrap-around. Introduce CAML_{U,}INTNAT_{MIN,MAX} macros to expose {u,}intnat limits. (Antonin Décimo, review by Nick Barnes, Xavier Leroy, Gabriel Scherer, and Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13239">#13239</a>: Check whether the compiler supports the labels as values extension to enable threaded code interpretation. (Antonin Décimo, review by Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13238">#13238</a>: Enable software prefetching on x86 and x86_64 when building with MSVC or clang-cl. (Antonin Décimo, review by Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13241">#13241</a>, <a href="https://github.com/ocaml/ocaml/issues/13261">#13261</a>, <a href="https://github.com/ocaml/ocaml/issues/13271">#13271</a>: Add CFI_SIGNAL_FRAME to ARM64 and RiscV runtimes, for the purpose of displaying backtraces correctly in GDB. (Tim McGilchrist, review by Miod Vallat, Gabriel Scherer and KC Sivaramakrishnan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13139">#13139</a>: Simplify CAMLalign to always use C23/C++11 alignas or C11 _Alignas. Ensures that stat data is always aligned to the best boundary. (Antonin Décimo, review by Miod Vallat and Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13280">#13280</a>: Check for support of compiler attributes. Allows using compiler attributes with clang-cl. (Antonin Décimo, review by Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13243">#13243</a>: Enable C compiler warnings internally when building with clang-cl or MSVC. Provide fixes too. (Antonin Décimo, review by Miod Vallat and Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13242">#13242</a>: Define and use unreachable and trap annotation, and clean-up some runtime assertions. (Antonin Décimo, review by Miod Vallat, Gabriel Scherer, and David Allsopp)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13402">#13402</a>, <a href="https://github.com/ocaml/ocaml/issues/13512">#13512</a>, <a href="https://github.com/ocaml/ocaml/issues/13549">#13549</a>, <a href="https://github.com/ocaml/ocaml/issues/13553">#13553</a>: Revise bytecode implementation of callbacks so that it no longer produces dangling registered bytecode fragments. (Xavier Leroy, report by Jan Midtgaard, analysis by Stephen Dolan, review by Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13407">#13407</a>: Add Runtime_events.EV_EMPTY_MINOR (Thomas Leonard)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13522">#13522</a>: Confirm runtime events ring is still active after callback. (KC Sivaramakrishnan, review by Sadiq Jaffer and Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13529">#13529</a>: Do not write to event ring after going out of stw participant set. (KC Sivaramakrishnan, review by Sadiq Jaffer)</p> </li> </ul> <h3>Code generation and optimizations:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13014">#13014</a>: Enable compile-time option -function-sections on all previously unsupported native backends (POWER, riscv64 and s390x) (Miod Vallat, review by Nicolás Ojeda Bär)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/7241">#7241</a>, <a href="https://github.com/ocaml/ocaml/issues/12555">#12555</a>, <a href="https://github.com/ocaml/ocaml/issues/13076">#13076</a>, <a href="https://github.com/ocaml/ocaml/issues/13138">#13138</a>, <a href="https://github.com/ocaml/ocaml/issues/13338">#13338</a>, <a href="https://github.com/ocaml/ocaml/issues/13152">#13152</a>, <a href="https://github.com/ocaml/ocaml/issues/13153">#13153</a>, <a href="https://github.com/ocaml/ocaml/issues/13154">#13154</a>: fix a soundness bug in the pattern-matching compiler when side-effects mutate the scrutinee during matching. (Gabriel Scherer, review by Nick Roberts)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13341">#13341</a>: a warning when the pattern-matching compiler pessimizes code because side-effects may mutate the scrutinee during matching. (This warning is disabled by default, as this rarely happens and its performance impact is typically not noticeable.) (Gabriel Scherer, review by Nick Roberts, Florian Angeletti and David Allsopp)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13179">#13179</a>: Fix evaluation of toplevel lets in classes containing local opens (Vincent Laviron, review by Hugo Heuzard, Nathanaëlle Courant and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13543">#13543</a>: Remove some String-Bytes conversion from the stdlib to behave better with js_of_ocaml (Hugo Heuzard, review by Gabriel Scherer)</p> </li> </ul> <h3>Standard library:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12885">#12885</a>: move Dynarray to an unboxed representation (Gabriel Scherer, suggestions by Vincent Laviron, review by Olivier Nicole and Simon Cruanes, Yann Leray, Alain Frisch)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12884">#12884</a>: Add <code>Queue.drop</code> (Léo Andrès, review by Nicolás Ojeda Bär and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13168">#13168</a>: In Array.shuffle, clarify the code that validates the result of the user-supplied function <code>rand</code>, and improve the error message that is produced when this result is invalid. (François Pottier, review by Florian Angeletti, Daniel Bünzli and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12133">#12133</a>: Expose support for printing substrings in Format (Florian Angeletti, review by Daniel Bünzli, Gabriel Scherer and Nicolás Ojeda Bär)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12869">#12869</a>: Add List.take, List.drop, List.take_while and List.drop_while (Kate Deplaix and Oscar Butler-Aldridge, review by Nicolás Ojeda Bär, Craig Ferguson and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13047">#13047</a>: Add Sys.poll_actions to (only) run pending runtime actions. (Nick Barnes, review by Gabriel Scherer, Guillaume Munch-Maccagnoni, and Vincent Laviron)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13144">#13144</a>: Dynarray.{equal, compare} (Gabriel Scherer, review by Jeremy Yallop, Daniel Bünzli and Olivier Nicole, request by Olivier Nicole)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13171">#13171</a>: expose <code>Domain.self_index : unit -&gt; int</code> (a somewhat-dense indexing of currently-running domains) for advanced use-cases of domain-indexed concurrent data structures. (Gabriel Scherer, review by KC Sivaramakrishnan, Miod Vallat and Nicolás Ojeda Bär, report by Vesa Karvonen)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13197">#13197</a>: Dynarray.blit, which allows to extend the destination dynarray (0 &lt;= dst_pos &lt;= dst_length). (Gabriel Scherer, report by Hazem Elmasry, review by Olivier Nicole, Hazem Elmasry and Nicolás Ojeda Bär)</p> </li> </ul> <ul> <li>(<em>breaking change</em>) <a href="https://github.com/ocaml/ocaml/issues/13240">#13240</a>: Add Uchar.seeded_hash, Change Uchar.hash implementation. Previously, Uchar.hash was aliased to Uchar.to_int. If you need that behavior, change your module instantiation from eg <code>module HT = Hashtbl.Make(Uchar)</code> to <pre><code> module HT = Hashtbl.Make(struct ... let hash = Uchar.to_int end) </code></pre> If the current implementation is desired, and you have a hashtable module <code>HT</code> (produced with the <code>Make</code> functor) in persistent storage, use <code>HT.rebuild</code> to ensure it doesn't break when reading from or writing to buckets. (Hazem ElMasry, review by Gabriel Scherer and Nicolás Ojeda Bär)</li> </ul> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13318">#13318</a>: Fix regression in GC alarms, and fix them for flambda. (Guillaume Munch-Maccagnoni, report by Benjamin Monate, review by Vincent Laviron and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13296">#13296</a>: Add mem, memq, find_opt, find_index, find_map and find_mapi to Dynarray. (Jake H, review by Gabriel Scherer and Florian Angeletti)</p> </li> </ul> <h3>Other libraries:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/11996">#11996</a>: release the dependency of dynlink on compilerlibs. (Sébastien Hinderer and Stephen Dolan, review by Damien Doligez and Hugo Heuzard)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13326">#13326</a>: Implement Unix.O_APPEND on windows. (Romain Beauxis, review by Miod Vallat, Gabriel Scherer and Antonin Décimo)</p> </li> </ul> <h3>Tools:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/11716">#11716</a>: ocamllex: mismatched parentheses and curly brackets are now caught by ocamllex, instead of causing invalid OCaml code to be generated. (Demi Marie Obenour, review by Damien Doligez and Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12904">#12904</a>: Run the testsuite with ThreadSanitizer on a PR when label <code>run-thread-sanitizer</code> is added (Olivier Nicole, suggested by Sébastien Hinderer and David Allsopp, review by Gabriel Scherer)</p> </li> </ul> <ul> <li>(<em>breaking change</em>) <a href="https://github.com/ocaml/ocaml/issues/13114">#13114</a>: Support ocamldebug remote debugging over IPv6 on all platforms, and over Unix domain sockets on Windows. (Antonin Décimo, review by Gabriel Scherer and Miod Vallat)</li> </ul> <ul> <li><a href="https://github.com/ocaml/ocaml/issues/13136">#13136</a>: Rewrite GDB extensions and macros in debugger-agnostic Python, and add LLDB support for them. (Nick Barnes, review by Tim McGilchrist and Gabriel Scherer)</li> </ul> <h3>Toplevel:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12891">#12891</a>: Improved styling for initial prompt (Florian Angeletti, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13053">#13053</a>: Improved display of builtin types such as <code>_ list</code> when aliased. (Samuel Vivien, review by Florian Angeletti)</p> </li> </ul> <h3>Manual and documentation:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13370">#13370</a>: Document that that temporary variables holding GCd pointers must not be live across a GC. (Demi Marie Obenour)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12298">#12298</a>: Manual: emphasize that Bigarray.int refers to an OCaml integer, which does not match the C int type. (Edwin Török, review by Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12868">#12868</a>: Manual: simplify style colours of the post-processed manual and API HTML pages, and fix the search button icon (Yawar Amin, review by Simon Grondin, Gabriel Scherer, and Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12949">#12949</a>: document OCaml release cycles and version strings in <code>release-info/introduction.md</code>. (Florian Angeletti, review by Fabrice Buoro, Kate Deplaix, Damien Doligez, and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12976">#12976</a>: Manual: use webman/<version>/*.html and webman/<version>/api/ for OCaml.org HTML manual generation (Shakthi Kannan, review by Hannes Mehnert, and Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13045">#13045</a>: Emphasize caution about behaviour of custom block finalizers. (Nick Barnes)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13216">#13216</a>: document the new <code>caml_result</code> type in the FFI chapter of the manual. (Gabriel Scherer, review by Miod Vallat, Daniel Bünzli, Nick Barnes, Guillaume Munch-Maccagnoni and Antonin Décimo)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13287">#13287</a>: stdlib/sys.mli: Update documentation on Sys.opaque_identity following <a href="https://github.com/ocaml/ocaml/issues/9412">#9412</a>. (Matt Walker, review by Guillaume Munch-Maccagnoni and Vincent Laviron)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13295">#13295</a>: Use syntax for deep effect handlers in the effect handlers manual page. (KC Sivaramakrishnan, review by Anil Madhavapeddy, Florian Angeletti and Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13424">#13424</a>: Fix <code>Gc.quick_stat</code> documentation to clarify that returned fields <code>live_words</code>, <code>live_blocks</code>, <code>free_words</code>, and <code>fragments</code> are not zero. (Jan Midtgaard, review by Damien Doligez and KC Sivaramakrishnan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13440">#13440</a>: Update documentation of <code>Gc.{control,get,set}</code> to reflect fields not currently supported on OCaml 5. (Jan Midtgaard, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13469">#13469</a>, <a href="https://github.com/ocaml/ocaml/issues/13474">#13474</a>, <a href="https://github.com/ocaml/ocaml/issues/13535">#13535</a>: Document that [Hashtbl.create n] creates a hash table with a default minimal size, even if [n] is very small or negative. (Antonin Décimo, Nick Bares, report by Nikolaus Huber and Jan Midtgaard, review by Florian Angeletti, Anil Madhavapeddy, Gabriel Scherer, and Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13666">#13666</a>: Rewrite parts of the example code around nested lists in Chapter 6 (Polymorphism and its limitations -&gt; Polymorphic recursion) giving the &quot;depth&quot; function [in the non-polymorphically-recursive part of the example] a much more sensible behavior; also fix a typo and some formatting. (Frank Steffahn, review by Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13668">#13668</a>: Document the basic support for unicode identifiers and the switch to UTF-8 encoded Unicode text for OCaml source file (Florian Angeletti, review by Nicolás Ojeda Bär and Daniel Bünzli)</p> </li> </ul> <h3>Compiler user-interface and warnings:</h3> <ul> <li>(<em>breaking change</em>) <a href="https://github.com/ocaml/ocaml/issues/12084">#12084</a>, <a href="https://github.com/ocaml/ocaml/issues/13669">#13669</a>, <a href="https://github.com/ocaml/ocaml/issues/13673">#13673</a>: Check link order when creating archive and when using ocamlopt. (Hugo Heuzard, review by Stefan Muenzel and Sébastien Hinderer)</li> </ul> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12980">#12980</a>: Explain type mismatch involving first-class modules by including the module level error message (Florian Angeletti, review by Vincent Laviron)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12985">#12985</a>, <a href="https://github.com/ocaml/ocaml/issues/12988">#12988</a>: Better error messages for partially applied functors. (Florian Angeletti, report by Arthur Wendling, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13034">#13034</a>, <a href="https://github.com/ocaml/ocaml/issues/13260">#13260</a>: Better error messages for mismatched function labels (Florian Angeletti, report by Daniel Bünzli, review by Gabriel Scherer and Samuel Vivien)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13051">#13051</a>: Add a &quot;Syntax error&quot; to error messages for invalid package signatures. (Samuel Vivien, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13099">#13099</a>: Fix erroneous loading of cmis for some module type errors. (Nick Roberts, review by Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13151">#13151</a>, name conflicts explanation as a footnote (Florian Angeletti, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13228">#13228</a>: Re-export Cmt2annot.{iterator,binary_part} which had become hidden since <a href="https://github.com/ocaml/ocaml/issues/11288">#11288</a> and broke ocamlbrowser. (David Allsopp, report by Jacques Garrigue, review by Sébastien Hinderer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13251">#13251</a>: Register printer for errors in Emitaux (Vincent Laviron, review by Miod Vallat and Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13255">#13255</a>: Re-enable warning 34 for unused locally abstract types (Nick Roberts, review by Chris Casinghino and Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12182">#12182</a>: Improve the type clash error message. For example, this message: This expression has type ... is changed into: The constant &quot;42&quot; has type ... (Jules Aguillon, review by Gabriel Scherer and Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13471">#13471</a>: add <code>-keywords &lt;version?+list&gt;</code> flag to define the list of keywords recognized by the lexer, for instance <code>-keywords 5.2</code> disable the <code>effect</code> keyword. (Florian Angeletti, review by Gabriel Scherer)</p> </li> </ul> <h3>Internal/compiler-libs changes:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13286">#13286</a>: Distinguish unique identifiers <code>Shape.Uid.t</code> according to their provenance: either an implementation or an interface. (Ulysse Gérard, review by Florian Angeletti and Leo White)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13308">#13308</a>: keep track of relations between declaration in the cmt files. This is useful information for external tools for navigation and analysis purposis. (Ulysse Gérard, Florian Angeletti, review by Florian Angeletti and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/11129">#11129</a>, <a href="https://github.com/ocaml/ocaml/issues/11148">#11148</a>: enforce that ppxs do not produce <code>parsetree</code>s with an empty list of universally quantified type variables (<code>. int -&gt; int</code> instead of <code>'a . int -&gt; int'</code>) (Florian Angeletti, report by Simmo Saan, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12534">#12534</a>: document and refactor Matching.mk_failaction_pos (Gabriel Scherer, review by Vincent Laviron and Nick Roberts)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13076">#13076</a>: change the handling of Match_failure exits in the pattern-matching compiler, to prepare for a complete fix for <a href="https://github.com/ocaml/ocaml/issues/7241">#7241</a> (Gabriel Scherer, review by Thomas Refis and Nick Roberts)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12896">#12896</a>: Simplify the compilation of custom bytecode runtimes by explicitly compiling the primitives file before calling the linker. Tidy-up both the generating code and the output itself for C code being generated by the bytecode linker in <code>-custom</code> and <code>-output-*</code> modes. (David Allsopp, Antonin Décimo and Samuel Hym, review by Vincent Laviron)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12932">#12932</a>: Remove useless code in Typecore.type_label_exp (was a fix for <a href="https://github.com/ocaml/ocaml/issues/4862">#4862</a>) (Jacques Garrigue, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12943">#12943</a>: Make transient_expr.scope a bitfield, and use it to store marks. Marks are automatically allocated, and removed when leaving their scope. Falls back to using TransientTypeSet when marks are exhausted. (Jacques Garrigue and Takafumi Saikawa, review by Basile Clément)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12946">#12946</a>: Make generalization automatic when leaving scope. As a result, the <code>Ctype.generalize*</code> and <code>Ctype.correct_levels</code> functions were removed. The latter is now called <code>Ctype.duplicate_type</code>. (Jacques Garrigue and Takafumi Saikawa, review by Richard Eisenberg)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12968">#12968</a>: Attach location to constants in the parsetree (Jules Aguillon, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12959">#12959</a>, <a href="https://github.com/ocaml/ocaml/issues/13055">#13055</a>: Avoid an internal error on recursive module type inconsistency (Florian Angeletti, review by Jacques Garrigue and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13049">#13049</a>: graphical debugging printer for types (Florian Angeletti, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13074">#13074</a>, <a href="https://github.com/ocaml/ocaml/issues/13082">#13082</a>, <a href="https://github.com/ocaml/ocaml/issues/13084">#13084</a>: refactoring in the pattern-matching compiler (Gabriel Scherer, review by Thomas Refis, Vincent Laviron and Nick Roberts)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13067">#13067</a>: rework volatile memory access rules under TSan to consider properly aligned smaller-than-register read operations as atomic, which gets rid of false positives on s390x (Miod Vallat, review by Fabien Buoro)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13162">#13162</a>: Use quoted strings to clarify code being generated. (Antonin Décimo, review by Miod Vallat and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13015">#13015</a>: Emit floating-point literals in .rodata section on ELF arm64 platforms (Linux, *BSD). (Miod Vallat, review by Nicolás Ojeda Bär)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13169">#13169</a>, <a href="https://github.com/ocaml/ocaml/issues/13311">#13311</a>: Introduce a document data type for compiler messages rather than relying on <code>Format.formatter -&gt; unit</code> closures. (Florian Angeletti, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13193">#13193</a>: Remove the unused env_init field from class blocks (Vincent Laviron, review by Jacques Garrigue)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13257">#13257</a>: integrate MetaOCaml in the Menhir grammar to ease MetaOCaml maintenance. This is a purely internal change: there is no support in the lexer, so no change to the surface OCaml grammar. (Oleg Kiselyov, Gabriel Scherer and Florian Angeletti, review by Jeremy Yallop)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13289">#13289</a>: Use C99 for loop to reduce the scope of the for loop iterator. (Antonin Décimo, review by Miod Vallat and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13336">#13336</a>: compiler-libs, split the <code>Printtyp</code> in three to only keep &quot;user-friendly&quot; functions in the <code>Printtyp</code> module. (Florian Angeletti, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13361">#13361</a>: split runtime/array.c functions to consistently expose uniform_array and floatarray versions, use floatarray versions in Float.Array. (Gabriel Scherer, review by Nicolás Ojeda Bär)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13507">#13507</a>: A small refactoring to [free_vars] to make it a bit faster by not allocating a list when the list is not necessary. (Richard Eisenberg, review by Jacques Garrigue)</p> </li> </ul> <h3>Build system:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12909">#12909</a>: Reorganise how MKEXE_VIA_CC is built to make it correct for MSVC by grouping all the linker flags at the end of the C compiler commandline (David Allsopp and Samuel Hym, review by Nicolás Ojeda Bär)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12992">#12992</a>, <a href="https://github.com/ocaml/ocaml/issues/13009">#13009</a>: Check that flexlink can be executed only when building in a native windows environment. (Romain Beauxis, review by David Allsopp and Sébastien Hinderer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12996">#12996</a>: Only link with -lgcc_eh when available. (Romain Beauxis, review by David Allsopp and Miod Vallat)</p> </li> </ul> <ul> <li>(<em>breaking change</em>) <a href="https://github.com/ocaml/ocaml/issues/13200">#13200</a>: Do not use CFLAGS for linking. (Sébastien Hinderer, review by Gabriel Scherer, Antonin Décimo, Miod Vallat and Samuel Hym)</li> </ul> <ul> <li><a href="https://github.com/ocaml/ocaml/issues/13201">#13201</a>, <a href="https://github.com/ocaml/ocaml/issues/13244">#13244</a>: Fix and speedup builds with TSan. (Sébastien Hinderer, review by Miod Vallat, Gabriel Scherer and Olivier Nicole)</li> </ul> <ul> <li>(<em>breaking change</em>) <a href="https://github.com/ocaml/ocaml/issues/12578">#12578</a>, <a href="https://github.com/ocaml/ocaml/issues/12589">#12589</a>, <a href="https://github.com/ocaml/ocaml/issues/13322">#13322</a>, <a href="https://github.com/ocaml/ocaml/issues/13519">#13519</a>: Use configured CFLAGS and CPPFLAGS <em>only</em> during the build of the compiler itself. Do not use them when compiling third-party C sources through the compiler. Flags for compiling third-party C sources can still be specified at configure time in the COMPILER_{BYTECODE,NATIVE}_{CFLAGS,CPPFLAGS} configuration variables. (Sébastien Hinderer, report by William Hu, review by David Allsopp)</li> </ul> <ul> <li><a href="https://github.com/ocaml/ocaml/issues/13285">#13285</a>: continue the merge of the sub-makefiles into the root Makefile started with <a href="https://github.com/ocaml/ocaml/issues/11243">#11243</a>, <a href="https://github.com/ocaml/ocaml/issues/11248">#11248</a>, <a href="https://github.com/ocaml/ocaml/issues/11268">#11268</a>, <a href="https://github.com/ocaml/ocaml/issues/11420">#11420</a>, <a href="https://github.com/ocaml/ocaml/issues/11675">#11675</a>, <a href="https://github.com/ocaml/ocaml/issues/12198">#12198</a>, <a href="https://github.com/ocaml/ocaml/issues/12321">#12321</a>, <a href="https://github.com/ocaml/ocaml/issues/12586">#12586</a>, <a href="https://github.com/ocaml/ocaml/issues/12616">#12616</a>, <a href="https://github.com/ocaml/ocaml/issues/12706">#12706</a> and <a href="https://github.com/ocaml/ocaml/issues/13048">#13048</a>. (Sébastien Hinderer, review by David Allsopp and Florian Angeletti)</li> </ul> <h3>Bug fixes:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12854">#12854</a>: Add a test in the regression suite that flags the bug <a href="https://github.com/ocaml/ocaml/issues/12825">#12825</a>. (Luc Maranget)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12888">#12888</a>: fix printing of uncaught exceptions in <code>.cmo</code> files passed on the command-line of the toplevel. (Nicolás Ojeda Bär, review by Florian Angeletti, report by Daniel Bünzli)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12910">#12910</a>, <a href="https://github.com/ocaml/ocaml/issues/12920">#12920</a>: Fix an unsound interaction between first-class modules and polymorphic records by saving and restoring univar_pairs. (Stephen Dolan, review by Gabriel Scherer, report by Jeremy Yallop)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12994">#12994</a>: Remove un-used and unsafe caml_drop_continuation (Tim McGilchrist, reviewed by Gabriel Scherer and Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12963">#12963</a>: Restore caml_runtime_parameters implementation. This primitive allows programs to query the runtime parameters supplied to an OCaml program. Implementation missing since OCaml 5.0. (Tim McGilchrist, reviewed by David Allsopp and Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13012">#13012</a>: parsing: Fix dropped attributes after a '-' or '+' The syntax '-(1 [@foo])' was incorrectly parsed as '-1'. (Jules Aguillon, reviewed by Gabriel Scherer, report by Gabriel Scherer)</p> </li> </ul> <ul> <li>(<em>breaking change</em>) <a href="https://github.com/ocaml/ocaml/issues/13070">#13070</a>: On Windows, when configured with bootstrapped flexdll, don't add +flexdll to the search path when -nostdlib is specified (which then means -L <path-to-flexdll> no longer gets passed to the system linker). (David Allsopp, review by Florian Angeletti)</li> </ul> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13089">#13089</a>: Fix bug in <code>runtime_events</code> library which could result in garbled output under Windows. (B. Szilvasy, review by Nicolás Ojeda Bär and Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13088">#13088</a>: A few type-checker behaviors look at a type to see if there are any labeled arguments in it. This sometimes required expansion, which could, in obscure scenarios, result in superfluous type errors. (Richard Eisenberg, review by Gabriel Scherer and Jacques Garrigue)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13103">#13103</a>: FreeBSD/amd64: properly annotate .o files with non-executable stack notes (Konstantin Belousov, review by Nicolás Ojeda Bär)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13150">#13150</a>: improve a transitive-closure computation algorithm in the flambda middle-end to avoid a compilation time blowup on Menhir-generated code (Florian Weimer, review by Gabriel Scherer and Pierre Chambart, report by Richard Jones)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13166">#13166</a>: Fix a MinGW/MSVC Sys.rename regression on renaming a parent directory to an empty child directory. (Jan Midtgaard, review by Antonin Décimo, Sébastien Hinderer, and David Allsopp)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13185">#13185</a>, <a href="https://github.com/ocaml/ocaml/issues/13192">#13192</a>: Reject type-level module aliases on functor parameter inside signatures. (Jacques Garrigue, report by Richard Eisenberg, review by Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13170">#13170</a>: Fix a bug that would result in some floating alerts <code>[@@@alert ...]</code> incorrectly triggering Warning 53. (Nicolás Ojeda Bär, review by Chris Casinghino and Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13203">#13203</a>: Do not issue warning 53 if the compiler is stopping before attributes have been accurately marked. (Chris Casinghino, review by Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13207">#13207</a>: Be sure to reload the register caching the exception handler in caml_c_call and caml_c_call_stack_args, as its value may have been changed if the OCaml stack is expanded during a callback. (Miod Vallat, report by Vesa Karvonen, review by Gabriel Scherer and Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13209">#13209</a>: Fix configure test that checks whether <code>ar</code> supports <code>@FILE</code> arguments. (Nicolás Ojeda Bär, report by Boris D.)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13221">#13221</a>: Compute more accurate instruction sizes for branch relocation on POWER. (Miod Vallat, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13252">#13252</a>: Rework register assignment in the interpreter code on m68k on Linux, due to the %a5 register being used by Glibc. (Miod Vallat, report by Stéphane Glondu, review by Gabriel Scherer and Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13247">#13247</a>: Disable lib_unix/kill test for MacOS AMD64 with TSan, linking to llvm bug report causing infinite signal loops. (Tim McGilchrist, review by Olivier Nicole, Miod Vallat, Sébastien Hinderer and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13234">#13234</a>, <a href="https://github.com/ocaml/ocaml/issues/13267">#13267</a>: Open runtime events file in read-write mode on armel (armv5) systems due to atomic operations limitations on that platform. (Stéphane Glondu, review by Miod Vallat and Vincent Laviron)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13273">#13273</a>: Fix a call to test in configure.ac that was causing errors when LDFLAGS contains several words. (Stéphane Glondu, review by Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13290">#13290</a>: Fix uninitialized and out of bounds reads in runtime_events_consumer.c (Edwin Török, review by Miod Vallat and Antonin Décimo)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13306">#13306</a>: An algorithm in the type-checker that checks two types for equality could sometimes, in theory, return the wrong answer. This patch fixes the oversight. No known program triggers the bug. (Richard Eisenberg, review by Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13400">#13400</a>: Initialize th-&gt;signal_stack to avoid free of uninitialized data if the user calls caml_c_thread_unregister on the main thread. (Richard W.M. Jones, review by Guillaume Munch-Maccagnoni and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13140">#13140</a>: POWER back-end: fix issue with call to <code>caml_call_realloc_stack</code> from a DLL (Xavier Leroy, review by Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13263">#13263</a>, <a href="https://github.com/ocaml/ocaml/issues/13560">#13560</a>: fix printing true and false in toplevel and error messages (no more unexpected #true) (Florian Angeletti, report by Samuel Vivien, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13388">#13388</a>, <a href="https://github.com/ocaml/ocaml/issues/13540">#13540</a>: raises an error message (and not an internal compiler error) when two local substitutions are incompatible (for instance <code>module type S:=sig end type t:=(module S)</code>) (Florian Angeletti, report by Nailen Matschke, review by Gabriel Scherer, and Leo White)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13408">#13408</a>: Fix misplaced debug runtime assertion triggerable by a race between domain exit and backup thread (Miod Vallat and Gabriel Scherer, report by Jan Midtgaard)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13417">#13417</a>: <code>Filename.quote_command</code>: fix handling of forward slashes in program path under Win32. (Nicolás Ojeda Bär, review by David Allsopp and Damien Doligez)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13501">#13501</a>: Regression on mutually recursive types caused by <a href="https://github.com/ocaml/ocaml/issues/12180">#12180</a>. Resuscitate Typedecl.update_type. (Jacques Garrigue and Takafumi Saikawa, review by Florian Angeletti, Richard Eisenberg and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13502">#13502</a>: Fix misindexing related to <code>Gc.finalise_last</code> that could prevent finalisers from being run. (Nick Roberts, review by Mark Shinwell)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13495">#13495</a>, <a href="https://github.com/ocaml/ocaml/issues/13514">#13514</a>: Fix typechecker crash while typing objects (Jacques Garrigue, report by Nicolás Ojeda Bär, review by Nicolas Ojeda Bär, Gabriel Scherer, Stephen Dolan, Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13391">#13391</a>, <a href="https://github.com/ocaml/ocaml/issues/13551">#13551</a>: fix a printing bug with <code>-dsource</code> when using raw literal inside a locally abstract type constraint (i.e. <code>let f: type \#for. ... </code>) (Florian Angeletti, report by Nick Roberts, review by Richard Eisenberg)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13520">#13520</a>: Fix compilation of native-code version of systhreads. Bytecode fields were being included in the thread descriptors. (David Allsopp, review by Sébastien Hinderer and Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13541">#13541</a>, <a href="https://github.com/ocaml/ocaml/issues/13591">#13591</a>: Fix headers for C++ inclusion. (Antonin Décimo, review by Nick Barnes, report by Kate Deplaix)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13579">#13579</a>, <a href="https://github.com/ocaml/ocaml/issues/13583">#13583</a>: Unsoundness involving non-injective types + gadts (Jacques Garrigue, report by @v-gb, review by Richard Eisenberg and Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13598">#13598</a>: Falsely triggered warning 56 [unreachable-case] This was caused by unproper protection of the retyping function. (Jacques Garrigue, report by Tõivo Leedjärv, review by Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13603">#13603</a>, <a href="https://github.com/ocaml/ocaml/issues/13604">#13604</a>: fix source printing in the presence of the escaped raw identifier <code>\#mod</code>. (Florian Angeletti, report by Chris Casinghino, review by Gabriel Scherer)</p> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-12-23-ocaml-lsp-1.20.1">OCaml-LSP 1.20.1</a> </h2> <time datetime="2024-12-23" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">23 Dec 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=ocaml-lsp" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">ocaml-lsp</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We are excited to share the release of <strong>OCaml-LSP 1.20.1</strong>, which introduces powerful new features and vital bug fixes to improve your development workflow. The new <code>typeSearch</code> request allows you to find values by type signature or polarity, making it easier to locate the functionality you need. Configurable <code>MerlinJump</code> actions and the custom <code>jump</code> request give you more control over code navigation. On the bug fix side, we have tackled issues like file descriptor leaks, enhanced method completion, and cleaned up duplicate responses in <code>selectionRange</code>.</p> <details> <summary>See full changelog</summary> <h2>Features</h2> <ul> <li>Add custom <code>ocamllsp/typeSearch</code> request (<a href="https://github.com/ocaml/ocaml-lsp/pull/1369">#1369</a>)</li> <li>Make MerlinJump code action configurable (<a href="https://github.com/ocaml/ocaml-lsp/pull/1376">#1376</a>)</li> <li>Add custom <code>ocamllsp/jump</code> request (<a href="https://github.com/ocaml/ocaml-lsp/pull/1374">#1374</a>)</li> </ul> <h2>Fixes</h2> <ul> <li>Deactivate the jump code actions by default. Clients can enable them with the <code>merlinJumpCodeActions</code> configuration option. Alternatively, a custom request is provided for ad hoc use of the feature. (<a href="https://github.com/ocaml/ocaml-lsp/pull/1411">#1411</a>)</li> <li>Fix FD leak in running external processes for preprocessing (<a href="https://github.com/ocaml/ocaml-lsp/pull/1349">#1349</a>)</li> <li>Fix prefix parsing for completion of object methods (<a href="https://github.com/ocaml/ocaml-lsp/pull/1363">#1363</a>, fixes <a href="https://github.com/ocaml/ocaml-lsp/issues/1358">#1358</a>)</li> <li>Remove some duplicates in the <code>selectionRange</code> answers (<a href="https://github.com/ocaml/ocaml-lsp/pull/1368">#1368</a>)</li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-12-23-merlin-5.3.502-and-4.18.414">Merlin 5.3-502 for OCaml 5.2 and 4.18-414 for OCaml 4.14</a> </h2> <time datetime="2024-12-23" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">23 Dec 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=merlin" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">merlin</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>This release introduces <strong>Merlin 5.3-502</strong>, compatible with OCaml 5.2, and <strong>4.18-414</strong>, compatible with OCaml 4.14. Key updates include <code>EXCLUDE_QUERY_DIR</code> for better file management, resolving exceptions in polarity search,</p> <p>and stabilizing type-enclosing results. For users of 5.3-502, additional enhancements address path resolution issues, fixes <code>jump to fun</code> functionality, and ensure proper handling of occurrences from hidden source files.</p> <details> <summary>See full changelog</summary> <ul> <li> <p>merlin binary</p> <ul> <li>Respect the EXCLUDE_QUERY_DIR configuration directive when looking for cmt files <a href="https://github.com/ocaml/merlin/pull/1854">#1854</a></li> <li>Fix exception in polarity search (<a href="https://github.com/ocaml/merlin/pull/1858">#1858</a> fixes <a href="https://github.com/ocaml/merlin/issues/1113">#1113</a>)</li> <li>Fix type-enclosing results instability. This reverts some overly aggressive deduplication that should be done on the client side. <a href="https://github.com/ocaml/merlin/pull/1864">#1864</a></li> </ul> </li> <li> <p>merlin binary (only in 5.3-502)</p> <ul> <li>Fix occurrences bug in which relative paths in index files are resolved against the PWD rather than the SOURCE_ROOT <a href="https://github.com/ocaml/merlin/pull/1855">#1855</a></li> <li>Fix <code>jump to fun</code> targets not working (<a href="https://github.com/ocaml/merlin/pull/1863">#1863</a>, fixes <a href="https://github.com/ocaml/merlin/issues/1862">#1862</a>)</li> <li>Fix occurrences not working when the definition comes from a hidden source file <a href="https://github.com/ocaml/merlin/pull/1865">#1865</a></li> </ul> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-12-18-dune.3.17.1">Dune 3.17.1</a> </h2> <time datetime="2024-12-18" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">18 Dec 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=dune" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">dune</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>The Dune team is happy to announce the release of Dune 3.17.1!</p> <p>This patch release includes some bug fixes. To reduce computing time, it does not build <code>.cmxs</code> files anymore when the <code>(no_dynlink)</code> stanza is used instead. This behavior also corrects the semantic of the <code>(no_dynlink)</code> stanza which was building but not installing <code>.cmxs</code> files. It does not try to build and install them anymore.</p> <details> <summary>See full changelog</summary> <h3>Fixed</h3> <ul> <li> <p>When a library declares <code>(no_dynlink)</code>, then the <code>.cmxs</code> file for it is no longer built. (#11176, @nojb)</p> </li> <li> <p>Fix bug that could result in corrupted file copies by Dune, for example when using the <code>copy_files#</code> stanza or the <code>copy#</code> action. (@nojb, #11194, fixes #11193)</p> </li> <li> <p>Remove useless error message when running <code>$ dune subst</code> in empty projects. (@rgrinberg, #11204, fixes #11200)</p> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-12-02-ocamlformat-0.27.0">OCamlformat 0.27.0</a> </h2> <time datetime="2024-12-02" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">02 Dec 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=ocamlformat" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">ocamlformat</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>After almost a year of work, OCamlformat 0.27.0 is finally available with support for 5.3 syntax!</p> <p>This release includes the new function syntax from OCaml 5.2, the <code>effect</code> keyword from OCaml 5.3 and a large number of bug fixes and improvements.</p> <p>An other notable change, is that comments are now formatted by default.</p> <details> <summary>See full changelog</summary> <h3>Highlight</h3> <ul> <li> <p>* Support OCaml 5.2 syntax (#2519, #2544, #2590, #2596, #2621, #2628, @Julow, @EmileTrotignon, @hhugo) This includes local open in types, raw identifiers, and the new representation for functions. This might change the formatting of some functions due to the formatting code being completely rewritten.</p> </li> <li> <p>Support OCaml 5.3 syntax (#2609, #2610, #2611, #2622, #2623, #2562, #2624, #2625, #2627, @Julow, @Zeta611) This adds support for effect patterns, short functor type arguments and utf8 identifiers. To format code using the new <code>effect</code> syntax, add this option to your <code>.ocamlformat</code>:</p> <pre><code>ocaml-version = 5.3 </code></pre> </li> <li> <p>Documentation comments are now formatted by default (#2390, @Julow) Use the option <code>parse-docstrings = false</code> to restore the previous behavior.</p> </li> <li> <p>* Consistent indentation of polymorphic variant arguments (#2427, @Julow) Increases the indentation by one to make the formatting consistent with normal variants. For example:</p> <pre><code> ... (* before *) (`Msg (foo bar)) (* after *) (`Msg (foo bar)) </code></pre> </li> <li> <p>Build on OCaml 5.3 (#2603, @adamchol, @Julow)</p> </li> </ul> <h3>Added</h3> <ul> <li> <p>Improve the emacs plugin (#2577, #2600, @gridbugs, @thibautbenjamin) Allow a custom command to be used to run ocamlformat and add compatibility with emacs ocaml tree-sitter modes.</p> </li> <li> <p>Added option <code>let-binding-deindent-fun</code> (#2521, @henrytill) to control the indentation of the <code>fun</code> in:</p> <pre><code>let f = fun foo -&gt; bar </code></pre> </li> <li> <p>Added back the flag <code>--disable-outside-detected-project</code> (#2439, @gpetiot) It was removed in version 0.22.</p> </li> <li> <p>Support newer Odoc syntax (#2631, #2632, #2633, @Julow)</p> </li> </ul> <h3>Changed</h3> <ul> <li> <p>* Consistent formatting of comments (#2371, #2550, @Julow) This is mostly an internal change but some comments might be formatted differently.</p> </li> <li> <p>* Improve formatting of type constraints with type variables (#2437, @gpetiot) For example:</p> <pre><code>let f : type a b c. a -&gt; b -&gt; c = ... </code></pre> </li> <li> <p>* Improve formatting of functor arguments (#2505, @Julow) This also reduce the indentation of functor arguments with long signatures.</p> </li> <li> <p>Improvements to the Janestreet profile (#2445, #2314, #2460, #2593, #2612, @Julow, @tdelvecchio-jsc)</p> </li> <li> <p>* Undo let-bindings and methods normalizations (#2523, #2529, @gpetiot) This remove the rewriting of some forms of let-bindings and methods:</p> <ul> <li><code>let f x = (x : int)</code> is no longer rewritten into <code>let f x : int = x</code></li> <li><code>let f (type a) (type b) ...</code> is no longer rewritten into <code>let f (type a b) ...</code></li> <li><code>let f = fun x -&gt; ...</code> is no longer rewritten into <code>let f x = ...</code></li> </ul> </li> <li> <p>* The <code>break-colon</code> option is now taken into account for method type constraints (#2529, @gpetiot)</p> </li> <li> <p>* Force a break around comments following an infix operator (fix non-stabilizing comments) (#2478, @gpetiot) This adds a line break:</p> <pre><code> a || (* this comment is now on its own line *) b </code></pre> </li> </ul> <h3>Fixed</h3> <ul> <li>Fix placement of comments in some cases (#2471, #2503, #2506, #2540, #2541, #2592, #2617, @gpetiot, @Julow) Some comments were being moved or causing OCamlformat to crash. OCamlformat refuses to format if a comment would be missing in its output, to avoid loosing code.</li> <li>Fix attributes being dropped or moved (#2247, #2459, #2551, #2564, #2602, @EmileTrotignon, @tdelvecchio-jsc, @Julow) OCamlformat refuses to format if the formatted code has a different meaning than the original code, for example, if an attribute is removed. We also try to avoid moving attributes even if that doesn't change the original code, for example we no longer format <code>open[@attr] M</code> as <code>open M [@@attr]</code>.</li> <li>Remove trailing space inside a wrapping empty signature (#2443, @Julow)</li> <li>Fix extension-point spacing in structures (#2450, @Julow)</li> <li>* Consistent break after string constant argument (#2453, @Julow)</li> <li>* Fix cinaps comment formatting to not change multiline string contents (#2463, @tdelvecchio-jsc)</li> <li>* Fix the indentation of tuples in attributes and extensions (#2488, @Julow)</li> <li>* Fix weird indentation and line breaks after comments (#2507, #2589, #2606, @Julow)</li> <li>* Fix unwanted alignment in if-then-else (#2511, @Julow)</li> <li>Fix missing parentheses around constraint expressions with attributes (#2513, @alanechang)</li> <li>Fix formatting of type vars in GADT constructors (#2518, @Julow)</li> <li>Fix <code>[@ocamlformat &quot;disable&quot;]</code> in some cases (#2242, #2525, @EmileTrotignon) This caused a bug inside <code>class type</code> constructs and when attached to a <code>let ... in</code></li> <li>Display <code>a##b</code> instead of <code>a ## b</code> and similarly for operators that start with # (#2580, @v-gb)</li> <li>* Fix arrow type indentation with <code>break-separators=before</code> (#2598, @Julow)</li> <li>Fix missing parentheses around a let in class expressions (#2599, @Julow)</li> <li>Fix formatting of paragraphs in lists in documentation (#2607, @Julow)</li> <li>Avoid unwanted space in references and links text in documentation (#2608, @Julow)</li> <li>* Improve the indentation of attributes in patterns (#2613, @Julow)</li> <li>* Avoid large indentation in patterns after <code>let%ext</code> (#2615, @Julow)</li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-11-27-dune.3.17.0">Dune 3.17.0</a> </h2> <time datetime="2024-11-27" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">27 Nov 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=dune" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">dune</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We're happy to announce the release of Dune 3.17.0.</p> <p>Among the list of chances, this release enables the Dune cache by default for known-safe operations, adds support for <code>Wasm_of_ocaml</code>, adds support for the <code>-H</code> compiler flag introduced in OCaml 5.2 and allows specifying code hosting services like Codeberg or Gitlab organizations.</p> <details> <summary>See full changelog</summary> <h3>Fixed</h3> <ul> <li> <p>Show the context name for errors happening in non-default contexts. (#10414, fixes #10378, @jchavarri)</p> </li> <li> <p>Correctly declare dependencies of indexes so that they are rebuilt when needed. (#10623, @voodoos)</p> </li> <li> <p>Don't depend on coq-stdlib being installed when expanding variables of the <code>coq.version</code> family (#10631, fixes #10629, @gares)</p> </li> <li> <p>Error out if no files are found when using <code>copy_files</code>. (#10649, @jchavarri)</p> </li> <li> <p>Re_export dune-section private library in the dune-site library stanza, in order to avoid failure when generating and building sites modules with implicit_transitive_deps = false. (#10650, fixes #9661, @MA0100)</p> </li> <li> <p>Expect test fixes: support multiple modes and fix dependencies when there is a custom runner (#10671, @vouillon)</p> </li> <li> <p>In a <code>(library)</code> stanza with <code>(extra_objects)</code> and <code>(foreign_stubs)</code>, avoid double linking the extra object files in the final executable. (#10783, fixes #10785, @nojb)</p> </li> <li> <p>Map <code>(re_export)</code> library dependencies to the <code>exports</code> field in <code>META</code> files, and vice-versa. This field was proposed in to https://discuss.ocaml.org/t/proposal-a-new-exports-field-in-findlib-meta-files/13947. The field is included in Dune-generated <code>META</code> files only when the Dune lang version is &gt;= 3.17. (#10831, fixes #10830, @nojb)</p> </li> <li> <p>Fix staged pps preprocessors on Windows (which were not working at all previously) (#10869, fixes #10867, @nojb)</p> </li> <li> <p>Fix <code>dune describe</code> when an executable is disabled with <code>enabled_if</code>. (#10881, fixes #10779, @moyodiallo)</p> </li> <li> <p>Fix an issue where C stubs would be rebuilt whenever the stderr of Dune was redirected. (#10883, fixes #10882, @nojb)</p> </li> <li> <p>Fix the URL opened by the command <code>dune ocaml doc</code>. (#10897, @gridbugs)</p> </li> <li> <p>Fix the file referred to in the error/warning message displayed due to the dune configuration version not supporting a particular configuration stanza in use. (#10923, @H-ANSEN)</p> </li> <li> <p>Fix <code>enabled_if</code> when it uses <code>env</code> variable. (#10936, fixes #10905, @moyodiallo)</p> </li> <li> <p>Fix exec -w for relative paths with --root argument (#10982, @gridbugs)</p> </li> <li> <p>Do not ignore the <code>(locks ..)</code> field in the <code>test</code> and <code>tests</code> stanza (#11081, @rgrinberg)</p> </li> <li> <p>Tolerate files without extension when generating merlin rules. (#11128, @anmonteiro)</p> </li> </ul> <h3>Added</h3> <ul> <li> <p>Make Merlin/OCaml-LSP aware of &quot;hidden&quot; dependencies used by <code>(implicit_transitive_deps false)</code> via the <code>-H</code> compiler flag. (#10535, @voodoos)</p> </li> <li> <p>Add support for the -H flag (introduced in OCaml compiler 5.2) in dune (requires lang versions 3.17). This adaptation gives the correct semantics for <code>(implicit_transitive_deps false)</code>. (#10644, fixes #9333, ocsigen/tyxml#274, #2733, #4963, @MA0100)</p> </li> <li> <p>Add support for specifying Gitlab organization repositories in <code>source</code> stanzas (#10766, fixes #6723, @H-ANSEN)</p> </li> <li> <p>New option to control jsoo sourcemap generation in env and executable stanza (#10777, fixes #10673, @hhugo)</p> </li> <li> <p>One can now control jsoo compilation_mode inside an executable stanza (#10777, fixes #10673, @hhugo)</p> </li> <li> <p>Add support for specifying default values of the <code>authors</code>, <code>maintainers</code>, and <code>license</code> stanzas of the <code>dune-project</code> file via the dune config file. Default values are set using the <code>(project_defaults)</code> stanza (#10835, @H-ANSEN)</p> </li> <li> <p>Add names to source tree events in performance traces (#10884, @jchavarri)</p> </li> <li> <p>Add <code>codeberg</code> as an option for defining project sources in dune-project files. For example, <code>(source (codeberg user/repo))</code>. (#10904, @nlordell)</p> </li> <li> <p><code>dune runtest</code> can now run individual tests with <code>dune runtest mytest.t</code> (#11041, @Alizter).</p> </li> <li> <p>Wasm_of_ocaml support (#11093, @vouillon)</p> </li> <li> <p>Add a <code>coqdep_flags</code> field to the <code>coq</code> field of the <code>env</code> stanza, and to the <code>coq.theory</code> stanza, allowing to configure <code>coqdep</code> flags. (#11094, @rlepigre)</p> </li> </ul> <h3>Changed</h3> <ul> <li> <p>Remove all remnants of the experimental <code>patch-back-source-tree</code>. (#10771, @rgrinberg)</p> </li> <li> <p>Change the preset value for author and maintainer fields in the <code>dune-project</code> file to encourage including emails. (#10848, @punchagan)</p> </li> <li> <p>Tweak the preset value for tags in the <code>dune-project</code> file to hint at topics not having a special meaning. (#10849, @punchagan)</p> </li> <li> <p>Change some colors to improve readability in light-mode terminals (#10890, @gridbugs)</p> </li> <li> <p>Forward the linkall flag to jsoo in whole program compilation as well (#10935, @hhugo)</p> </li> <li> <p>Configurator uses <code>pkgconf</code> as pkg-config implementation when available and forwards it the <code>target</code> of <code>ocamlc -config</code>. (#10937, @pirbo)</p> </li> <li> <p>Enable Dune cache by default. Add a new Dune cache setting <code>enabled-except-user-rules</code>, which enables the Dune cache, but excludes user-written rules from it. This is a conservative choice that can avoid breaking rules whose dependencies are not correctly specified. This is the current default. (#10944, #10710, @nojb, @ElectreAAS)</p> </li> <li> <p>Do not add <code>dune</code> dependency in <code>dune-project</code> when creating projects with <code>dune init proj</code>. The Dune dependency is implicitely added when generating opam files (#11129, @Leonidas-from-XIV)</p> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-11-18-ocaml-5.2.1">Release of OCaml 5.2.1</a> </h2> <time datetime="2024-11-18" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">18 Nov 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=ocaml" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">ocaml</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We have the pleasure of announcing the release of OCaml 5.2.1, dedicated to the memory of Niels Bohr and Paul Éluard on the anniversary of their deaths.</p> <p>OCaml 5.2.1 is a collection of safe but import runtime time bug fixes backported from the 5.3 branch of OCaml.</p> <p>The full list of changes is available above for more details.</p> <hr> <h2>Installation Instructions</h2> <p>The base compiler can be installed as an opam switch with the following commands:</p> <pre><code><span class='bash-source'>opam update </span><span class='bash-source'>opam switch create 5.2.1 </span></code></pre> <p>The source code for the release is also directly available on:</p> <ul> <li><a href="https://github.com/ocaml/ocaml/archive/5.2.1.tar.gz">GitHub</a></li> <li><a href="https://caml.inria.fr/pub/distrib/ocaml-5.2/ocaml-5.2.1.tar.gz">Inria archive</a></li> </ul> <details> <summary>See full changelog</summary> <h2>Changes Since OCaml 5.2.0</h2> <h3>Runtime System:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13207">#13207</a>: Be sure to reload the register caching the exception handler in <code>caml_c_call</code> and <code>caml_c_call_stack_args</code>, as its value may have been changed if the OCaml stack is expanded during a callback. (Miod Vallat, report by Vesa Karvonen, review by Gabriel Scherer and Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13252">#13252</a>: Rework register assignment in the interpreter code on m68k on Linux, due to the %a5 register being used by GLIBC. (Miod Vallat, report by Stéphane Glondu, review by Gabriel Scherer and Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13268">#13268</a>: Fix a call to test in <code>configure.ac</code> that was causing errors when LDFLAGS contains several words. (Stéphane Glondu, review by Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13234">#13234</a>, <a href="https://github.com/ocaml/ocaml/issues/13267">#13267</a>: Open runtime events file in read-write mode on ARMel (ARMv5) systems due to atomic operations limitations on that platform. (Stéphane Glondu, review by Miod Vallat and Vincent Laviron)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13188">#13188</a>: fix races in the FFI code coming from the use of <code>Int_val(...)</code> on rooted values inside blocking questions / without the runtime lock. (Calling <code>Int_val(...)</code> on non-rooted immediates is fine, but any access to rooted values must be done outside blocking sections / with the runtime lock.) (Etienne Millon, review by Gabriel Scherer, Jan Midtgaard, Olivier Nicole)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13318">#13318</a>: Fix regression in GC alarms, and fix them for Flambda. (Guillaume Munch-Maccagnoni, report by Benjamin Monate, review by Vincent Laviron and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13140">#13140</a>: POWER back-end: fix issue with call to <code>caml_call_realloc_stack</code> from a DLL (Xavier Leroy, review by Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13370">#13370</a>: Fix a low-probability crash when calling <code>Gc.counters</code>. (Demi Marie Obenour, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13402">#13402</a>, <a href="https://github.com/ocaml/ocaml/issues/13512">#13512</a>, <a href="https://github.com/ocaml/ocaml/issues/13549">#13549</a>, <a href="https://github.com/ocaml/ocaml/issues/13553">#13553</a>: Revise bytecode implementation of callbacks so that it no longer produces dangling registered bytecode fragments. (Xavier Leroy, report by Jan Midtgaard, analysis by Stephen Dolan, review by Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13502">#13502</a>: Fix misindexing related to <code>Gc.finalise_last</code> that could prevent finalisers from being run. (Nick Roberts, review by Mark Shinwell)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13520">#13520</a>: Fix compilation of native-code version of systhreads. Bytecode fields were being included in the thread descriptors. (David Allsopp, review by Sébastien Hinderer and Miod Vallat)</p> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-11-15-installing-developer-tools-with-dune">Installing Developer Tools with Dune</a> </h2> <time datetime="2024-11-15" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">15 Nov 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=dune" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">dune</a> <a href="/changelog?t=developer-preview" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">developer-preview</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p><em>Discuss this post on <a href="https://discuss.ocaml.org/t/installing-developer-tools-with-dune/15612">Discuss</a>!</em></p> <p>Dune can install and run developer tools in the context of a project. This feature is available in the <a href="https://preview.dune.build/">Dune Developer Preview</a> and in the upcoming release of Dune 3.17. As with all of Dune's package management features, consider this feature to be unstable as its UI and semantics may change without notice.</p> <p>The currently supported tools are <code>ocamllsp</code> and <code>ocamlformat</code>. Dune has a new command <code>dune tools exec &lt;TOOL&gt; -- [ARGS]...</code> which downloads and installs the given tool, and then runs it with the given arguments (note the <code>--</code> which separates arguments to <code>dune</code> from arguments to the tool). Tools are installed locally to the project, in its <code>_build</code> directory, which makes it easy to use different versions of a tool in different projects. An unfortunate consequence of installing tools into <code>_build</code> is that for the time being all tools are uninstalled whenever <code>dune clean</code> is run.</p> <p>Let's see it in action:</p> <pre><code>$ dune tools exec ocamlformat -- --version Solution for dev-tools.locks/ocamlformat: - ocamlformat.0.26.2+binary-ocaml-5.2.0-built-2024-11-07.0-x86_64-unknown-linux-musl Building ocamlformat.0.26.2+binary-ocaml-5.2.0-built-2024-11-07.0-x86_64-unknown-linux-musl Running 'ocamlformat --version' 0.26.2 </code></pre> <h2>Precompiled Binaries</h2> <p>Note that in the example above, Dune's package solver chose to install version <code>0.26.2+binary-ocaml-5.2.0-built-2024-11-07.0-x86_64-unknown-linux-musl</code> of <code>ocamlformat</code>. This packages comes from a new <a href="https://github.com/ocaml-dune/ocaml-binary-packages">repository of binary packages</a> containing pre-built executables for a select few Opam packages. Dune will search this repository in addition to the default repositories when solving packages for tools only (if a project has <code>ocamlformat</code> in its dependencies, the binary repository won't be searched while solving the project's dependencies).</p> <p>The goal of the binary repository is to reduce the time it takes to get started working on a new project. Without it, Dune would need to build <code>ocamlformat</code> from source along with all of its dependencies, which can take several minutes.</p> <p>For now only a small number of package versions are contained in the binary repository. To demonstrate, here's what happens if we run <code>dune tools exec ocamlformat</code> in a project with <code>version=0.26.1</code> in its <code>.ocamlformat</code> file:</p> <pre><code> $ dune tools exec ocamlformat -- --version Solution for dev-tools.locks/ocamlformat: - astring.0.8.5 - base.v0.17.1 - base-bytes.base - base-unix.base - camlp-streams.5.0.1 - cmdliner.1.3.0 ... - ocamlformat.0.26.1 ... Building base-unix.base Building ocaml-base-compiler.5.1.1 Building ocaml-config.3 Building ocaml.5.1.1 Building seq.base Building cmdliner.1.3.0 ... Building ocamlformat.0.26.1 Running 'ocamlformat --version' 0.26.1 </code></pre> <p>Dune parses <code>.ocamlformat</code> to determine which version of <code>ocamlformat</code> to install, and <code>0.26.1</code> is not in the binary repo so it needed to be built from source.</p> <p>If your project requires a version of a package not available in the binary repository, or you're on an operating system or architecture for which no binary version of a package exists, the package will be built from source instead. Currently the binary repository contains binaries of <code>ocamlformat.0.26.2</code>, <code>ocaml-lsp-server.1.18.0</code> and <code>ocaml-lsp-server.1.19.0</code> for <code>x86_64-unknown-linux-musl</code>, <code>x86_64-apple-darwin</code> and <code>aarch64-apple-darwin</code>.</p> <p>Note that Linux binaries are statically linked with muslc so they should work on all distros regardless of dynamic linker.</p> <h2>Running <code>ocamllsp</code></h2> <p>The program <code>ocamllsp</code> from the package <code>ocaml-lsp-server</code> analyzes OCaml code and sends information to text editors using the <a href="https://microsoft.github.io/language-server-protocol/">Language Server Protocol</a>. The tool is crucial to OCaml's editor integration and it has a couple of quirks that are worth mentioning here.</p> <p>TL;DR: Install Dune with the install script on the <a href="https://preview.dune.build/">Developer Preview page</a> and you'll get an <a href="https://github.com/ocaml-dune/binary-distribution/blob/main/tool-wrappers/ocamllsp"><code>ocamllsp</code> shell script</a> that will install and run the correct version of <code>ocamllsp</code> for your project.</p> <p>Firstly the <code>ocamllsp</code> executable can only analyze code that has been compiled with the same version of the OCaml compiler as was used to compile the <code>ocamllsp</code> executable itself. Different versions of the <code>ocaml-lsp-server</code> package are incompatible with some versions of the OCaml compiler (e.g. <code>ocaml-lsp-server.1.19.0</code> must be built with at least <code>5.2.0</code> of the compiler). This means that when Dune is choosing which version of <code>ocaml-lsp-server</code> to install it needs to know which version of the compiler your project is using. This is only known after the project has been locked (by running <code>dune pkg lock</code>), so Dune will refuse to install <code>ocamllsp</code> in a project that doesn't have a lock directory or for a project that doesn't depend on the OCaml compiler.</p> <pre><code>$ dune tools exec ocamllsp Error: Unable to load the lockdir for the default build context. Hint: Try running 'dune pkg lock' </code></pre> <p>The <code>ocaml-lsp-server</code> packages in the <a href="https://github.com/ocaml-dune/ocaml-binary-packages">binary repository</a> contain metadata to ensure that the <code>ocamllsp</code> executable that gets installed was built with the same version of the compiler as your project. For example the <code>ocaml-lsp-server</code> package built with <code>ocaml.5.2.0</code> contains this line:</p> <pre><code>conflicts: &quot;ocaml&quot; {!= &quot;5.2.0&quot;} </code></pre> <p>This prevents it from being chosen if the project depends on any version of the compiler other than <code>5.2.0</code>.</p> <p>Another quirk is that <code>ocamllsp</code> will try to invoke the binaries <code>ocamlformat</code> and <code>ocamlformat-rpc</code>, both found in the <code>ocamlformat</code> package. The <code>ocaml-lsp-server</code> package doesn't depend on <code>ocamlformat</code> as the specific version of <code>ocamlformat</code> needed by a project is implied by the project's <code>.ocamlformat</code> file, which package managers don't consider when solving dependencies. This means that in general (whether using Dune or Opam for package management) it's up to the user to make sure that the correct version of <code>ocamlformat</code> is installed in order to use the formatting features of <code>ocamllsp</code>.</p> <p>Otherwise expect this error in your editor:</p> <pre><code>Unable to find 'ocamlformat-rpc' binary. Types on hover may not be well-formatted. You need to install either 'ocamlformat' of version &gt; 0.21.0 or, otherwise, 'ocamlformat-rpc' package. </code></pre> <p>Even if <code>ocamllsp</code> and <code>ocamlformat</code> are both installed by Dune, if you run <code>dune tools exec ocamllsp</code> you will find that <code>ocamllsp</code> still can't find the <code>ocamlformat</code> or <code>ocamlformat-rpc</code> executables. This is because unlike Opam, Dune does not install tools into your <code>$PATH</code>, and for the sake of simplicity, the <code>dune tools exec &lt;TOOL&gt;</code> command does not modify the environment of the tool it launches. This can be fixed by adding <code>_build/_private/default/.dev-tool/ocamlformat/ocamlformat/target/bin</code> (the directory containing <code>ocamlformat</code> and <code>ocamlformat-rpc</code> when <code>ocamlformat</code> is installed by dune) to the start of your <code>$PATH</code> variable before running <code>dune tools exec ocamllsp</code>. For example starting <code>ocamllsp</code> with the following shell script:</p> <pre><code><span class='bash-source'>OCAMLFORMAT_TARGET=</span><span class='bash-punctuation-definition-string-begin'>&quot;</span><span class='bash-string-quoted-double'>_build/_private/default/.dev-tool/ocamlformat/ocamlformat/target</span><span class='bash-punctuation-definition-string-end'>&quot;</span><span class='bash-source'> </span><span class='bash-source'> </span><span class='bash-keyword-control'>if</span><span class='bash-meta-scope-if-block'> [ </span><span class='bash-keyword-operator-pipe'>!</span><span class='bash-meta-scope-if-block'> -f </span><span class='bash-punctuation-definition-variable'>$</span><span class='bash-variable-other-normal'>OCAMLFORMAT_TARGET</span><span class='bash-meta-scope-if-block'>/cookie ]</span><span class='bash-keyword-operator-list'>;</span><span class='bash-meta-scope-if-block'> </span><span class='bash-keyword-control'>then</span><span class='bash-meta-scope-if-block'> </span><span class='bash-punctuation-whitespace-comment-leading'> </span><span class='bash-punctuation-definition-comment'>#</span><span class='bash-comment-line-number-sign'> Make sure that the ocamlformat dev tool is installed as it's needed by</span><span class='bash-comment-line-number-sign'> </span><span class='bash-meta-scope-if-block'> </span><span class='bash-punctuation-definition-comment'>#</span><span class='bash-comment-line-number-sign'> ocamllsp. There's currently no command that just installs ocamlformat so</span><span class='bash-comment-line-number-sign'> </span><span class='bash-meta-scope-if-block'> </span><span class='bash-punctuation-definition-comment'>#</span><span class='bash-comment-line-number-sign'> we need to run it and ignore the result.</span><span class='bash-comment-line-number-sign'> </span><span class='bash-meta-scope-if-block'> dune tools exec ocamlformat -- --help &gt; /dev/null </span><span class='bash-meta-scope-if-block'>fi </span><span class='bash-meta-scope-if-block'> </span><span class='bash-punctuation-definition-comment'>#</span><span class='bash-comment-line-number-sign'> Add ocamlformat to the environment in which ocamllsp runs so ocamllsp can invoke ocamlformat.</span><span class='bash-comment-line-number-sign'> </span><span class='bash-meta-scope-if-block'>export PATH=&quot;$PWD/$OCAMLFORMAT_TARGET/bin:$PATH&quot; </span><span class='bash-meta-scope-if-block'> </span><span class='bash-punctuation-definition-comment'>#</span><span class='bash-comment-line-number-sign'> Build and run ocamllsp.</span><span class='bash-comment-line-number-sign'> </span><span class='bash-meta-scope-if-block'>dune tools exec ocamllsp -- &quot;$@&quot; </span></code></pre> <p>Of course, it's rare to manually start <code>ocamllsp</code> directly from your terminal. It's normally launched by text editors. It would be impractical to configure your text editor to modify <code>$PATH</code> and run a custom command to start <code>ocamllsp</code> via Dune, and doing so would make it impossible to edit any project that <em>doesn't</em> use Dune for package management. Instead, the Dune Developer Preview ships with <a href="https://github.com/ocaml-dune/binary-distribution/blob/main/tool-wrappers/ocamllsp">a shell script</a> which installs <code>ocamlformat</code> and adds its <code>bin</code> directory to <code>$PATH</code> before launching <code>dune tools exec ocamllsp</code>. The script is simply named <code>ocamllsp</code>, and the Dune Developer Preview install script adds it to <code>~/.dune/bin</code> which should already be in your <code>$PATH</code> if you're using the Developer Preview. The <code>ocamllsp</code> script also attempts to fall back to an Opam-managed installation of <code>ocamllsp</code> if it doesn't detect a Dune lockdir so the same script should work for non-Dune projects. Because the script is named the same as the <code>ocamllsp</code> executable, most editors don't require special configuration to run it. See the &quot;Editor Configuration&quot; section of the <a href="https://preview.dune.build/">Dune Developer Preview page</a> for more information about setting up your editor.</p> <p>Some parts of the <code>ocamllsp</code> shell script may eventually make their way into Dune itself, but for the time being the shell script is the recommended way to launch <code>ocamllsp</code> for users of the Dune Developer Preview. The net result is that as long as your project has a lockfile, the first time you edit some OCaml code in the project Dune will download and run the appropriate version of <code>ocamllsp</code>.</p> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-11-13-opam-2-3-0">opam 2.3.0</a> </h2> <time datetime="2024-11-13" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">13 Nov 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=opam" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">opam</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p><em>Feedback on this post is welcomed on <a href="https://discuss.ocaml.org/t/ann-opam-2-3-0-is-out/15609">Discuss</a>!</em></p> <p>As mentioned in <a href="https://icfp24.sigplan.org/details/ocaml-2024-papers/10/Opam-2-2-and-beyond">our talk at the OCaml Workshop 2024</a>, we decided to switch to a time-based release cycle (every 6 months), starting with opam 2.3.</p> <p>As promised, we are very pleased to announce the release of opam 2.3.0, and encourage all users to upgrade. Please read on for installation and upgrade instructions.</p> <h2>Try it!</h2> <p>In case you plan a possible rollback, you may want to first backup your <code>~/.opam</code> or <code>$env:LOCALAPPDATA\opam</code> directory.</p> <p>The upgrade instructions are unchanged:</p> <ol> <li>Either from binaries: run</li> </ol> <p>For Unix systems</p> <pre><code>bash -c &quot;sh &lt;(curl -fsSL https://opam.ocaml.org/install.sh)&quot; </code></pre> <p>or from PowerShell for Windows systems</p> <pre><code>Invoke-Expression &quot;&amp; { $(Invoke-RestMethod https://opam.ocaml.org/install.ps1) }&quot; </code></pre> <p>or download manually from <a href="https://github.com/ocaml/opam/releases/tag/2.3.0">the Github &quot;Releases&quot; page</a> to your PATH.</p> <ol start="2"> <li>Or from source, manually: see the instructions in the <a href="https://github.com/ocaml/opam/tree/2.3.0#compiling-this-repo">README</a>.</li> </ol> <p>You should then run:</p> <pre><code>opam init --reinit -ni </code></pre> <h2>Major breaking change: extra-files</h2> <p>When loading a repository, opam now ignores files in packages' <code>files/</code> directories which aren't listed in the <code>extra-files</code> field of the opam file. This was done to simplify the opam specification where we hope the opam file to be the only thing that you have to look at when reading a package specification. It being optional to list all files in the <code>extra-files:</code> field went against that principle. This change also reduces the surface area for potential file corruption as all extra-files must have checksums.</p> <p>This is a breaking change and means that if you are using the <code>files/</code> directory without listing them in the <code>extra-files:</code> field, you need to make sure that all files in that directory are included in the <code>extra-files</code> field. The resulting opam file remains compatible with all previous opam 2.x releases.</p> <p>If you have an opam repository, you should make sure all files are listed so every packages continues to work without any issue, which can be done automatically using the <code>opam admin update-extrafiles</code> command.</p> <h2>Major changes</h2> <ul> <li> <p>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 where some packages can require a newer version of opam without having to fork the repository to upgrade every package to that version as was done for the upgrade from opam 1.2 to 2.0</p> </li> <li> <p>Add a new <code>opam list --latests-only</code> option to list only the latest versions of packages. Note that this option respects the order options were given on the command line. For example: <code>--available --latests-only</code> will first list all the available packages, then choose only the latest packages in that set; while <code>--latests-only --available</code> will first list all the latest packages, then only show the ones that are available in that set</p> </li> <li> <p>Fix and improve <code>opam install --check</code>, which now checks if the whole dependency tree of the package is installed instead of only the root dependencies</p> </li> <li> <p>Add a new <code>--verbose-on</code> option to enable verbose output for specified package names. <em>Thanks to <a href="https://github.com/desumn">@desumn</a> for this contribution</em></p> </li> <li> <p>Add a new <code>opam switch import --deps-only</code> option to install only the dependencies of the root packages listed in the opam switch export file</p> </li> <li> <p><code>opam switch list-available</code> no longer displays compilers flagged with <code>avoid-version</code>/<code>deprecated</code> unless <code>--all</code> is given, meaning that pre-release or unreleased OCaml packages no longer appear to be the latest version</p> </li> <li> <p><code>opam switch create --repositories</code> now correctly infers <code>--kind=git</code> for URLs ending with <code>.git</code> rather than requiring the <code>git+https://</code> protocol. This is consistant with other commands such as <code>opam repository add</code>. <em>Thanks to <a href="https://github.com/Keryan-dev">@Keryan-dev</a> for this contribution</em></p> </li> <li> <p><code>opam switch set-invariant</code> now displays the switch invariant using the same syntax as the <code>--formula</code> flag</p> </li> <li> <p>The <code>builtin-0install</code> solver was improved and should now be capable of being your default solver instead of <code>builtin-mccs+glpk</code>. It was previously mostly only suited for automated tasks such as Continuous Integration. If you wish to give it a try, simply calling <code>opam option solver=builtin-0install</code> (call <code>opam option solver=</code> restores the default)</p> </li> <li> <p>Most of the unhelpful conflict messages were fixed. (<a href="https://github.com/ocaml/opam/issues/4373">#4373</a>)</p> </li> <li> <p>Fix an opam 2.1 regression where the initial pin of a local VCS directory would store untracked and ignored files. Those files would usually be cleaned before building the package, however git submodules would not be cleaned and would cause issues when paired with the new behaviour added in 2.3.0~alpha1 which makes opam error when git submodules fail to update (it was previously a warning). (<a href="https://github.com/ocaml/opam/issues/5809">#5809</a>)</p> </li> <li> <p>Fix the value of the <code>arch</code> variable when the current OS is 32bit on a 64bit machine (e.g. Raspberry Pi OS). (<a href="https://github.com/ocaml/opam/issues/5949">#5949</a>)</p> </li> <li> <p>opam now fails when git submodules fail to update instead of ignoring the error and just showing a warning</p> </li> <li> <p>opam's libraries now compile with OCaml &gt;= 5.0 on Windows</p> </li> <li> <p>Fix the installed packages internal cache, which was storing the wrong version of the opam file after a build failure. This could be triggered easily for users with custom repositories with non-populated extra-files. (<a href="https://github.com/ocaml/opam/pull/6213">#6213</a>)</p> </li> <li> <p>Several improvements to the pre-built release binaries were made:</p> <ul> <li>The Linux binaries are now built on Alpine 3.20</li> <li>The FreeBSD binary is now built on FreeBSD 14.1</li> <li>The OpenBSD binary is now built on OpenBSD 7.6 and loses support for OpenBSD 7.5 and earlier</li> <li>Linux/riscv64 and NetBSD/x86_64 binaries are now available</li> </ul> </li> </ul> <p>And many other general, performance and UI improvements were made and bugs were fixed. You can take a look to previous blog posts. API changes and a more detailed description of the changes are listed in:</p> <ul> <li><a href="https://github.com/ocaml/opam/releases/tag/2.3.0-alpha1">the release note for 2.3.0~alpha1</a></li> <li><a href="https://github.com/ocaml/opam/releases/tag/2.3.0-beta1">the release note for 2.3.0~beta1</a></li> <li><a href="https://github.com/ocaml/opam/releases/tag/2.3.0-beta2">the release note for 2.3.0~beta2</a></li> <li><a href="https://github.com/ocaml/opam/releases/tag/2.3.0-rc1">the release note for 2.3.0~rc1</a></li> <li><a href="https://github.com/ocaml/opam/releases/tag/2.3.0">the release note for 2.3.0</a></li> </ul> <p>This release also includes PRs improving the documentation and improving and extending the tests.</p> <p>Please report any issues to <a href="https://github.com/ocaml/opam/issues">the bug-tracker</a>.</p> <p>We hope you will enjoy the new features of opam 2.3!</p> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-10-30-dune.3.16.1">Dune 3.16.1</a> </h2> <time datetime="2024-10-30" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">30 Oct 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=dune" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">dune</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We're happy to announce the release of Dune 3.16.1.</p> <p>This is a patch release that fixes an issue with OCaml.5.3.0 and C++ flags.</p> <details> <summary>See full changelog</summary> <h3>Fixed</h3> <ul> <li>Call the C++ compiler with <code>-std=gnu++11</code> when using OCaml &gt;= 5.0 (#10962, @kit-ty-kate) <h3>Added</h3> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-10-29-shell-completions-in-dune-developer-preview">Shell Completions in Dune Developer Preview</a> </h2> <time datetime="2024-10-29" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">29 Oct 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=dune" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">dune</a> <a href="/changelog?t=developer-preview" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">developer-preview</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p><em>Discuss this post on <a href="https://discuss.ocaml.org/t/shell-completions-in-dune-developer-preview/15522">Discuss</a>!</em></p> <p>Support for dune shell completions for bash and zsh has just landed in the <a href="https://preview.dune.build/">Dune Developer Preview</a>!</p> <p>Running the <a href="https://preview.dune.build/#download">installer</a> adds a snippet to your shell config (e.g. ~/.bashrc) that installs a completion handler for <code>dune</code>. The completion script was taken from <a href="https://github.com/gridbugs/dune-completion-scripts">here</a>, and that page has some information about how the script was generated. Once it's installed the completions will work any time <code>dune</code> is typed at the start of a command, so you can still use the completions when running a version of Dune installed with Opam or your system package manager after installing the Dune Developer Preview.</p> <p>Currently only command completions are supported. So you can run:</p> <pre><code>$ dune c&lt;TAB&gt; cache clean coq </code></pre> <p>...or:</p> <pre><code>$ dune build -&lt;TAB&gt; --action-stderr-on-success --action-stdout-on-success --always-show-command-line --auto-promote --build-dir --build-info --cache ... </code></pre> <p>But if you run <code>dune build &lt;TAB&gt;</code> then it will still suggest local files rather than build targets.</p> <h2>Try it out!</h2> <p>Getting started is easy:</p> <pre><code>$ curl -fsSL https://get.dune.build/install | sh $ source ~/.bashrc # or: source ~/.zshrc $ dune &lt;TAB&gt; build cache clean coq describe diagnostics exec ... </code></pre> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-10-02-updates">OCaml Infrastructure: Enhancing Platform Support and User Experience</a> </h2> <time datetime="2024-10-02" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">02 Oct 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=infrastructure" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">infrastructure</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p><a href="https://tarides.com/">Tarides'</a> OCaml Infrastructure team has been hard at work over the last few months, focusing on improving the stability, reliability, and user experience of the OCaml ecosystem's core infrastructure. We are preparing for more substantive changes to come. We will have more fruit from this work to share soon, but updates on our efforts are overdue and we wanted to get you all caught up.</p> <h2>Platform Support</h2> <p>We've expanded and updated our platform support to keep pace with the evolving OCaml ecosystem:</p> <ul> <li>As part of the compiler release readiness, we've added support for OCaml 5.2 and the upcoming 5.3, currently in alpha.</li> <li>We're now publishing Windows Server 2022 Docker images to the OCaml Dockerhub. See for instance <a href="https://hub.docker.com/layers/ocaml/opam/windows-server-msvc-ltsc2022-ocaml-4.14/images/sha256-cfe98cb048514e9eace3c4d4e607b7e7fce5abba3a49e9a07318180d6213eee2?context=explore">windows-server-msvc-ltsc2022-ocaml-4.14</a></li> <li>Dropped support for the post-LTS distro versions Debian 10 and 11, focusing our resources on the OCaml compiler's Tier 1 platform.</li> </ul> <p>These updates ensure that our systems continue to support OCaml developers on a broad range of systems, in particular by testing package publication to the opam repository and publishing Docker images.</p> <h2>Opam Repository Publishing Experience</h2> <p>We've made improvements to enhance the experience of publishing packages to the opam repository:</p> <ul> <li>Implemented a linting check for package maintainer email addresses, ensuring package maintainers can be reliably contacted when needed.</li> <li>Mitigated solver timeout errors in the opam repo CI system, reducing frustrating delays in the package publishing process.</li> <li>Fixed an uncaught exception that sometimes occurred during linting checks in the opam repo CI.</li> <li>Improved error reporting and added instructions for running lint checks locally, making it easier for package authors to identify and resolve issues before submitting to the repository.</li> <li>We are <a href="https://github.com/ocurrent/opam-repo-ci/blob/master/doc/platforms.md">generating documentation of the platforms under test in opam CI</a>, allowing package authors a clear overview of the extensive build matrix we are providing.</li> </ul> <p>We hope these changes will make package publication experience smoother. We're committed to improving the experience for newcomers and existing repository contributors alike, stay tuned for more improvements!</p> <h2>Security and Reliability</h2> <p>Maintaining the security and reliability of the OCaml infrastructure remains a top priority:</p> <ul> <li>Updated our systems to address <a href="https://nvd.nist.gov/vuln/detail/CVE-2024-6387">CVE-2024-6387</a>.</li> <li>We maintained 99.9% availability for the opam repo CI over the last two months, providing a stable and reliable service for the OCaml community.</li> </ul> <h2>Forging Ahead</h2> <p>Much has been done but much more is in the works! Expect updates more regularly going forward, and don't hesitate to reach out on <a href="https://github.com/ocaml/infrastructure/issues">ocaml/infrastructure/issues</a> or <a href="https://discuss.ocaml.org/tag/infrastructure">discuss.ocaml.org</a> if you have questions, requests, or ideas!</p> <details> <summary>See full changelog</summary> <ul> <li>Added continuous deployment for service configuration (by @mtelvers, https://github.com/ocurrent/ocurrent-configurator)</li> <li>Implemented linting for package maintainer email addresses (by @punchagan, https://github.com/ocurrent/opam-ci-check/pull/30)</li> <li>Mitigated solver timeout errors in opam repo CI (by @mtelvers and @shonfeder, https://github.com/ocaml/infrastructure/issues/147)</li> <li>Fixed uncaught exception in opam repo CI linting checks (by @shonfeder, https://github.com/ocurrent/opam-repo-ci/pull/341)</li> <li>Updated systems to address CVE-2024-6387 (by @mtelvers, https://github.com/ocaml/infrastructure/issues/140)</li> <li>Added support for OCaml 5.2 and 5.3 (by @mtelvers, https://github.com/ocurrent/opam-repo-ci/issues/268 and https://github.com/ocurrent/opam-repo-ci/issues/363)</li> <li>Improved Windows support (by @mtelvers, https://github.com/ocurrent/docker-base-images/issues/241)</li> <li>Added support for GCC 14 (by @mtelvers, https://github.com/ocurrent/docker-base-images/issues/279)</li> <li>Dropped support for Debian 10 and 11 (by @mtelvers and @shonfeder, https://github.com/ocurrent/ocaml-dockerfile/pull/220 and https://github.com/ocurrent/ocaml-dockerfile/pull/210)</li> <li>Generated documentation of CI test platforms and deployed services (by @benmandrew, https://github.com/ocurrent/opam-repo-ci/blob/master/doc/platforms.md and https://github.com/ocurrent/ocurrent-deployer/blob/master/doc/services.md)</li> <li>Improved error reporting and local lint check instructions in opam CI (by @punchagan, https://github.com/ocurrent/opam-repo-ci/issues/359 and https://github.com/ocurrent/opam-repo-ci/issues/360)</li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-09-27-merlin-5.2.1">Merlin 5.2.1-502 for OCaml 5.2 and 4.17.1 for OCaml 5.1 and 4.14</a> </h2> <time datetime="2024-09-27" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">27 Sep 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=merlin" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">merlin</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We are happy to announce the joint release of Merlin <code>5.2.1-502</code> and <code>4.17.1</code>. 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.</p> <p>More information can be found in the <a href="https://discuss.ocaml.org/t/ann-new-release-of-merlin/15358">Discuss announcement</a>.</p> <p>Contributions are always welcome at <a href="https://github.com/ocaml/merlin/issues">Merlin | Issues</a></p> <details> <summary>See full changelog</summary> <ul> <li>merlin binary <ul> <li>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)</li> <li>Add <code>-unboxed-types</code> and <code>-no-unboxed-types</code> as OCaml ignored flags (ocaml/merlin#1795, fixes ocaml/merlin#1794)</li> <li>Destruct: Refinement in the presence of optional arguments (ocaml/merlin#1800 ocaml/merlin#1807, fixes ocaml/merlin#1770)</li> <li>Implement new <code>expand-node</code> command for expanding PPX annotations (ocaml/merlin#1745)</li> <li>Implement new <code>inlay-hints</code> command for adding hints on a source tree (ocaml/merlin#1812)</li> <li>Implement new <code>search-by-type</code> command for searching values by types (ocaml/merlin#1828)</li> <li>Canonicalise paths in occurrences. This helps deduplicate the results and</li> <li>Show more user-friendly paths. (ocaml/merlin#1840)</li> <li>Fix <code>dot-merlin-reader</code> ignoring SOURCE_ROOT and STDLIB directives (ocaml/merlin#1839, ocaml/merlin#1803)</li> </ul> </li> <li>editor modes <ul> <li>Vim: <ul> <li>Fix Python-3.12 syntax warnings in <code>merlin.py</code> (ocaml/merlin#1798)</li> <li>Dead code / doc removal for previously deleted MerlinPhrase command (ocaml/merlin#1804)</li> </ul> </li> <li>Emacs: <ul> <li>Improve the way that result of polarity search is displayed (#1814)</li> <li>Add <code>merlin-search-by-type</code>, <code>merlin-search-by-polarity</code> and change the behaviour of <code>merlin-search</code> to switch between by-type or by-polarity depending on the query (ocaml/merlin#1828)</li> </ul> </li> </ul> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-09-25-call-for-feedback">Call for Feedback</a> </h2> <time datetime="2024-09-25" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">25 Sep 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=dune" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">dune</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> <a href="/changelog?t=developer-preview" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">developer-preview</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>Hello folks! 👋</p> <p>We'd like to welcome everyone to try and play with the <a href="https://preview.dune.build">Dune Developer Preview</a>! 🎉</p> <p>This experimental nightly release of dune includes a lot of improvements, including the much expected package management features, and it can be installed from that website or by using the new installation script:</p> <pre><code><span class='bash-source'>$ curl -fsSL https://get.dune.build/install </span><span class='bash-keyword-operator-pipe'>|</span><span class='bash-source'> bash </span></code></pre> <p>In a few seconds you should be ready to OCaml by calling <code>dune</code>:</p> <p><img src="upload://bAs05aK4zwlNnd5BsiWgaaXXAA2.gif" alt="Installing the Dune Developer Preview|690x442" ></p> <p>You can also watch and share this demo on <a href="https://x.com/leostera/status/1838969568795979922">X</a> and <a href="https://mas.to/deck/@leostera/113198996085937679">Mastodon</a>.</p> <p>Please try it out and let us know what you think 🙏</p> <p>📅 You can book a feedback call with us <a href="https://calendar.google.com/calendar/u/0/appointments/schedules/AcZssZ3HaJbskiCLHqLS6Oi1S3-rWYwv0hb_Iz8O9VlspuDdK5qbXYUZDpRRlWfEY1GP8KFy6XY8MFb9">here</a></p> <p>📝 You can submit feedback using <a href="https://docs.google.com/forms/u/2/d/e/1FAIpQLSda-mOTHIdATTt_e9dFmNgUCy-fD55Qzr3bGGsxpfY_Ecfyxw/viewform?usp=send_form">this form</a></p> <p>🐛 You can submit issues to Github on <a href="https://github.com/ocaml/dune/issues/new/choose">ocaml/dune</a></p> <h3>Changes since last update</h3> <p>The Dune shared cache has been enabled by default. We're starting off by caching all downloads and dependencies.</p> <p>We have improved support for dev tools. We're working to streamline this but in the latest binary you can:</p> <ul> <li> <p>Configure your LSP (in Neovim, Vim, Emacs, etc) to call <code>dune tools exec ocamllsp</code> to get LSP support for your projects out of the box – this may take a little bit the first time it builds the LSP for a compiler version, but it's pretty much instant afterwards.</p> </li> <li> <p>Call <code>dune fmt</code> to get your project formatted – remember to add an <code>.ocamlformat</code> file if you don't have one yet. An empty one is enough.</p> </li> <li> <p>Call <code>dune ocaml doc</code> to get documentation built</p> </li> </ul> <h3>What's next?</h3> <p>We're looking forward to streamlining the DX, working on better dependency locks, and looking into supporting Windows.</p> <p>In particular, we're considering work on a few things:</p> <ul> <li><code>dune create &lt;repo&gt;</code> – to let the community create templates that can be easily used from within dune</li> <li><code>dune pkg fetch</code> – to prefetch packages and prepare a repository for working in offline mode</li> <li><code>dune build @deps</code> - to build all dependencies, useful for staged builds in Dockerfiles</li> <li><code>dune pkg add &lt;name&gt;</code> - to make adding packages straightforward</li> <li>a short-hand syntax for pins on github</li> <li>and more!</li> </ul> <p>If you've got any ideas, we'd love to hear them, so please open a feature request on Github 🙏</p> <h2>Other updates</h2> <h4>FunOCaml Presentation</h4> <p>At <strong>FunOCaml</strong> we had a last-minute opportunity to present the work being done on Dune and we used it to introduce the Developer Preview to the community, and even tested Package Management live with suggestions from the audience (thanks @anmonteiro and Paul-Elliot for participating!) – you can <a href="https://www.twitch.tv/videos/2252408016?t=08h12m00s">watch it on Twitch</a>.</p> <h4>New design</h4> <p>We're working with @Claire_Vandenberghe on redesigning the Developer Preview website so that it'd feel like a seamless extension of OCaml.org – in this current iteration we've made it easier to get started and we're putting the FAQ front and center.</p> <p>We'll be iterating on this design in the coming weeks until it fits perfectly within the OCaml.org design system 🎨</p> <p>You can check the new website here: https://preview.dune.build</p> <h4>Upcoming Blog posts</h4> <p>In the near future we'll be publishing blog posts about the Developer Preview and Package Management, which we're working on with @professor.rose 👏</p> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-08-26-closing-on-public-beta">Getting Ready for the Public Beta</a> </h2> <time datetime="2024-08-26" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">26 Aug 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=dune" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">dune</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> <a href="/changelog?t=developer-preview" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">developer-preview</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>As we prepare for the public beta, we're ramping up the DX interviews and ensuring the first few users will have a fun, productive experience with the Developer Preview.</p> <blockquote> <p>📥 If you signed up for the Dev Preview back in May, check your inbox for a link and instructions to schedule your DX interview with us.</p> </blockquote> <p>Here's a sample video on (<a href="https://mas.to/deck/@leostera/112988841207690720">Mastodon</a> or <a href="https://x.com/leostera/status/1825519465527673238">X</a>) where you can see us building the Riot project on a machine that does not have OCaml installed. It is pretty neat!</p> <p>Seriously, big shoutout to the Dune team at Tarides[0] and Jane Street[1] who have been doing a phenomenal job 👏 ✨ 🐫</p> <p>So here's what getting started with OCaml looks like using the Dune Developer Preview as of today (August 19 2024):</p> <ol> <li>get <code>dune</code> from our binary distribution – we'll soon make this public!</li> <li>run <code>dune pkg lock</code> in your favorite project</li> <li>run <code>dune build</code></li> </ol> <p>That's it. No need to install anything else! Dune will see that lock file, fetch, and build all necessary dependencies.</p> <blockquote> <p>🗺️ These are some strong steps towards the <a href="https://ocaml.org/tools/platform-roadmap">OCaml Platform vision for 2026</a> that we are actively working towards. If you have any thoughts or feedback please let us know!</p> </blockquote> <p>There are more improvements coming that will help remove friction to get started and create a delightful experience. Both of these things we strongly believe will help onboard new users to the OCaml world.</p> <p>Here's a few in the works:</p> <ul> <li> <p><strong>Various DX improvements</strong> – from new outputs to simplified workflows, we want to make using Dune just delightful.</p> </li> <li> <p><strong>Bundled support for dev tools</strong> (OCamlFormat, <code>odoc</code>, LSP) – the default toolset will be available without any extra steps! Just call <code>dune fmt</code> and it works. No need to manually install anything else.</p> </li> <li> <p><strong>Automatic dependency locking</strong> – when building, and even in watch mode, Dune will lock your dependencies by default and keep the lock up to date.</p> </li> <li> <p><strong>Cross-project caching</strong> – by default we'll enable a local Dune cache across the system, so you never rebuild the same dependency, even across projects.</p> </li> <li> <p><strong>Signed binaries with certificates of origin</strong> – we care deeply about security and want to make sure that any binary we ship can be easily verified and tracked back to its sources.</p> </li> </ul> <p>Stay tuned! 👋</p> <p>PS: here's a longer video on (<a href="https://mas.to/deck/@leostera/112988880290815356">Mastodon</a> or <a href="https://x.com/leostera/status/1825519469759812062">X</a>) showing you the setup for OCaml from zero, creating a new project, and adding a dependency, all within ~5 minutes</p> <p>[0] @emillon @Leonidas @gridbugs @tmattio @maiste . Ambre Suhamy, Alpha Diallo [1] @rgrinberg</p> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-08-22-opam-2-2-1">opam 2.2.1</a> </h2> <time datetime="2024-08-22" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">22 Aug 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=opam" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">opam</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p><em>Feedback on this post is welcomed on <a href="https://discuss.ocaml.org/t/ann-opam-2-2-1/15192">Discuss</a>!</em></p> <p>We are pleased to announce the release of opam 2.2.1.</p> <p>We've fixed a couple of regressions and would like to encourage users of opam 2.2 to upgrade.</p> <h2>Changes</h2> <p>The three main changes are:</p> <ul> <li>Fixe a regression in <code>opam install --deps-only</code> where the direct dependencies were not set as root packages (spotted in the wild by @rjbou and also <a href="https://discuss.ocaml.org/t/how-to-list-all-root-dependencies-in-the-current-switch/15142">reported on Discuss</a>)</li> <li>Fix a regression when fetching Git packages where the resulting Git repository could lead to unexpected outputs of Git commands, by disabling shallow clone by default except when fetching opam repositories (<a href="https://github.com/ocaml/opam/issues/6145">#6145</a>)</li> <li>Mitigate <a href="https://github.com/curl/curl/issues/13845">curl/curl#13845</a> by falling back from <code>--write-out</code> to <code>--fail</code> if exit code 43 is returned by Curl. In particular, this fixes <code>opam init</code> when run from <code>cmd/PowerShell</code> on Windows 11 23H2 (<a href="https://github.com/ocaml/opam/issues/6120">#6120</a>)</li> </ul> <p>A couple more improvements and additions to the testsuite were made. You can view the full list of changes in the <a href="https://github.com/ocaml/opam/releases/tag/2.2.1">release note</a>.</p> <h2>Try it!</h2> <p>The upgrade instructions are unchanged:</p> <ol> <li>Either from binaries: run</li> </ol> <p>For Unix systems</p> <pre><code>bash -c &quot;sh &lt;(curl -fsSL https://opam.ocaml.org/install.sh) --version 2.2.1&quot; </code></pre> <p>or from PowerShell for Windows systems</p> <pre><code>Invoke-Expression &quot;&amp; { $(Invoke-RestMethod https://opam.ocaml.org/install.ps1) }&quot; </code></pre> <p>(or via <code>winget upgrade OCaml.opam</code>) or download manually from <a href="https://github.com/ocaml/opam/releases/tag/2.2.1">the Github &quot;Releases&quot; page</a> to your PATH.</p> <ol start="2"> <li>Or from source, manually: see the instructions in the <a href="https://github.com/ocaml/opam/tree/2.2.1#compiling-this-repo">README</a>.</li> </ol> <p>You should then run:</p> <pre><code>opam init --reinit -ni </code></pre> <p>Please report any issues to <a href="https://github.com/ocaml/opam/issues">the bug-tracker</a>.</p> <p>Happy hacking!</p> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-07-31-ocaml-lsp-1.19.0">OCaml-LSP 1.19.0</a> </h2> <time datetime="2024-07-31" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">31 Jul 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=ocaml-lsp" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">ocaml-lsp</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We are pleased to announce the release of OCaml LSP 1.19.0. This version brings official support for OCaml 5.2. It also includes a new custom query to get</p> <p>documentation and a fix regarding the handling of OCamlFormat processes.</p> <details> <summary>See full changelog</summary> <h2>Features</h2> <ul> <li>Add custom <a href="/ocaml-lsp-server/docs/ocamllsp/getDocumentation-spec.md"><code>ocamllsp/getDocumentation</code></a> request (ocaml/ocaml-lsp#1336)</li> <li>Add support for OCaml 5.2 (ocaml/ocaml-lsp#1233)</li> </ul> <h2>Fixes</h2> <ul> <li>Kill unnecessary OCamlFormat processes with <code>sigterm</code> rather than <code>sigint</code> or <code>sigkill</code> (ocaml/ocaml-lsp#1343)</li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-07-25-ppxlib-0.33.0">Ppxlib 0.33.0</a> </h2> <time datetime="2024-07-25" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">25 Jul 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=ppxlib" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">ppxlib</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>The Ppxlib dev team is happy to announce the release of <code>ppxlib.0.33.0</code>.</p> <p>This release's main feature is a series of improvement to flags controlling unused value/module/type warnings silencing. The <code>ppxlib</code> driver generates warning silencing items to prevent <code>[@@deriving ...]</code> generated code to trigger unused code warnings. Three warnings are disabled that way:</p> <ul> <li>Warning 32: unused value</li> <li>Warning 60: unused module</li> <li>Warning 34: unused type The first two are disabled for values and modules generated by the deriver while the third is disabled for the types in the type declaration to which the <code>[@@deriving ...]</code> attribute is attached. This feature was added a long time ago to avoid manually disabling those warnings when working with derivers that generate a set of values and modules only to use a subset of those. Alternatively, the unused type warning silencing was added to allow defining an alias type only to be consumed by a deriver (e.g., <code>type error = [`Not_found | `Invalid_arg] [@@deriving to_string]</code>). We since then believe that we should not disable warnings lightly, as this behaviour makes it difficult to find and remove deadcode. The right approach in those situations should be to fix the PPX derivers so that they are more configurable and can be used without triggering such warnings. We will start to move toward removing this feature, but since it is still useful in some places, we came up with a plan to do this iteratively. In <code>ppxlib.0.31.0</code> we added the <code>-unused-code-warnings</code> driver flag and the <code>?unused_code_warnings</code> <code>Deriving.V2.make</code> optional argument to control whether to silence Warnings 32 and 60. When both are set to <code>true</code>, by the user and the deriver authors, the warnings are not silenced. As of <code>ppxlib.0.33.0</code>, these also control the silencing of Warning 34 (unused type). <code>force</code> can now be passed to the <code>-unused-code-warnings</code> flag in order to disable warnings silencing, regardless of the derivers opting in. This allows users to test whether their codebase and their set of derivers rely on warning silencing or not and to use those results to eliminate deadcode and/or report issues upstream to the derivers they use. We also added a separate <code>-unused-type-warnings</code> flag that works similarly to <code>-unused-code-warnings</code> (i.e., depends on the value of the <code>?unused_code_warnings</code> argument), but it only controls Warning 34 silencing, as it turns out it is less likely to cause unwanted warnings than with the other two. This will allow users to disable it more easily, without having to deal with Warnings 32 and 60 straight away. We want to encourage users to try those on their codebase in order to see the impact it has. Did you have deadcode lying around that slipped past undetected? Does this trigger unwanted warnings because of deriver's generated code? The plan is to give the ecosystem some time to try those features and adapt by fixing individual derivers and flipping setting <code>?unused_code_warnings</code> to true as they do. After a while, we will swap the default value of the driver flag to <code>true</code> so that only derivers that haven't opted in will enable warning silencing. Then as time goes we will swap the default of the <code>Deriving.make</code> argument so that derivers will instead have to explicitly opt out to get the warning silencing. Finally, once we are confident the ecosystem is in a good enough state, we will remove this feature altogether.</li> </ul> <p><code>ppxlib.0.33.0</code> also comes with a couple of new features for PPX authors:</p> <ul> <li>A couple new <code>Ast_builder</code> functions: <code>elist_tail</code> and <code>plist_tail</code> that can be used to build list expressions and patterns with a custom tail: <code>elist_tail [expr1; expr2] tail_expr</code> returns the expression for <code>expr1::expr2::tail_expr</code>.</li> <li><code>Context_free.special_function'</code>, a new version of <code>special_function</code> that allows passing a <code>Longident.t</code> directly rather that relying on parsing the string argument to a <code>Longident.t</code>.</li> </ul> <p>Finally, the release includes a few bug fixes to <code>Longident.parse</code> and <code>Code_path.main_module_name</code> and fixes the <code>location-check</code> flag so it is not required to also pass <code>-check</code> to enable location checks. It also fixes the 5.2 migrations locations, as we used to build nodes with inconsistent locations when migrating <code>Pexp_function</code> nodes.</p> <p>We would like to thank our external contributors who have been a huge part of this release: @octachron, @vg-b, and @jchavarri, and a special mention to @mbarbin, who has not only contributed a lot to the warning silencing features but has been extensively testing and providing very useful feedback on them.</p> <p>And of course, as usual, we'd like to thank the OCaml Software Foundation who has been funding my work on Ppxlib and on this release, making all of this possible!</p> <details> <summary>See full changelog</summary> <ul> <li> <p>Fix a bug where <code>Code_path.main_module_name</code> would not properly remove extensions from the filename and therefore return an invalid module name. (#512, @NathanReb)</p> </li> <li> <p>Add <code>-unused-type-warnings</code> flag to the driver to allow users to disable only the generation of Warning 34 silencing structure items when using <code>[@@deriving ...]</code> on type declarations. (#511, @mbarbin, @NathanReb)</p> </li> <li> <p>Make the <code>-unused-code-warnings</code> driver flag also control Warning 34 silencing for type declarations with <code>[@@deriving ...]</code> attached. (#510, @mbarbin, @NathanReb)</p> </li> <li> <p>Add <code>-unused-code-warnings=force</code> driver command-line flag argument. (#490, @mbarbin)</p> </li> <li> <p>Add new functions <code>Ast_builder.{e,p}list_tail</code> that take an extra tail expression/pattern argument parameter compared to <code>Ast_builder.{e,p}list</code>, so they can build ASTs like <code>a :: b :: c</code> instead of only <code>[ a; b ]</code>. (#498, #502, @v-gb, @NathanReb)</p> </li> <li> <p>Fix <code>Longident.parse</code> so it also handles indexing operators such as <code>.!()</code>, <code>.%(;..)&lt;-</code>, or <code>Vec.(.%())</code> (#494, @octachron)</p> </li> <li> <p>Add a <code>special_function'</code> variant that directly takes a <code>Longident.t</code> argument in order to avoid the issue with <code>Longident.t</code> covering distinct syntactic classes that cannot be easily parsed by a common parser (#496, @octachron).</p> </li> <li> <p>Keep location ranges consistent when migrating <code>Pexp_function</code> nodes from 5.2+ to older versions (#504, @jchavarri)</p> </li> <li> <p>Fix <code>-locations-check</code> behaviour so it is no longer required to pass <code>-check</code> and can enable location checks. (#506, @NathanReb)</p> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-07-11-ocaml-lsp-1.18.0">OCaml-LSP 1.18.0</a> </h2> <time datetime="2024-07-11" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">11 Jul 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=ocaml-lsp" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">ocaml-lsp</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We are pleased to announce the release of OCaml LSP 1.18.0. This version comes with a lot of fixes and new features.</p> <p>Notable features that are included in this release are:</p> <ul> <li>Improved hover behavior with less noisy hovers on some parse tree nodes such as keywords, comments, etc., along with support for hovering over PPX annotations and preview the generated code.</li> <li>Some additional custom queries, particularly <code>TypeEnclosing</code></li> <li>Folding <code>ifthenelse</code> expressions</li> <li>A new configuration option to control Dune diagnostics</li> <li>Improved document symbols</li> </ul> <p>...and many fixes to a handful of issues.</p> <p>Feedback is very much welcomed on the the <a href="https://discuss.ocaml.org/t/ann-ocaml-lsp-1-18-0/14952">Discuss Announcement</a> post and do not hesistate to report issues in the <a href="https://github.com/ocaml/ocaml-lsp/issues">issue tracker</a>.</p> <details> <summary>See full changelog</summary> <h2>Features</h2> <ul> <li> <p>Introduce a configuration option to control Dune diagnostics. The option is called <code>duneDiganostics</code>, and it may be set to <code>{ enable: false }</code> to disable diagnostics. (ocaml/ocaml-lsp#1221)</p> </li> <li> <p>Support folding of <code>ifthenelse</code> expressions (ocaml/ocaml-lsp#1031)</p> </li> <li> <p>Improve hover behavior (ocaml/ocaml-lsp#1245)</p> <p>Hovers are no longer displayed on useless parse tree nodes such as keywords, comments, etc.</p> <p>Multiline hovers are now filtered away.</p> <p>Display expanded PPXs in the hover window.</p> </li> <li> <p>Improve document symbols (ocaml/ocaml-lsp#1247)</p> <p>Use the parse tree instead of the typed tree. This means that document symbols will work even if the source code doesn't type check.</p> <p>Include symbols at arbitrary depth.</p> <p>Differentiate functions / types / variants / etc.</p> <p>This now includes PPXs like <code>let%expect_test</code> or <code>let%bench</code> in the outline.</p> </li> <li> <p>Introduce a <code>destruct-line</code> code action. This is an improved version of the old <code>destruct</code> code action. (ocaml/ocaml-lsp#1283)</p> </li> <li> <p>Improve signature inference to only include types for elements that were absent from the signature. Previously, all signature items would always be inserted. (ocaml/ocaml-lsp#1289)</p> </li> <li> <p>Add an <code>update-signature</code> code action to update the types of elements that were already present in the signature (ocaml/ocaml-lsp#1289)</p> </li> <li> <p>Add custom <a href="https://github.com/ocaml/ocaml-lsp/blob/e165f6a3962c356adc7364b9ca71788e93489dd0/ocaml-lsp-server/docs/ocamllsp/merlinCallCompatible-spec.md"><code>ocamllsp/merlinCallCompatible</code></a> request (ocaml/ocaml-lsp#1265)</p> </li> <li> <p>Add custom <a href="https://github.com/ocaml/ocaml-lsp/blob/109801e56f2060caf4487427bede28b824f4f1fe/ocaml-lsp-server/docs/ocamllsp/typeEnclosing-spec.md"><code>ocamllsp/typeEnclosing</code></a> request (ocaml/ocaml-lsp#1304)</p> </li> </ul> <h2>Fixes</h2> <ul> <li> <p>Detect document kind by looking at Merlin's <code>suffixes</code> config.</p> <p>This enables more LSP features for non-<code>.ml/.mli</code> files. Though it still depends on Merlin's support. (ocaml/ocaml-lsp#1237)</p> </li> <li> <p>Correctly accept the <code>--clientProcessId</code> flag. (ocaml/ocaml-lsp#1242)</p> </li> <li> <p>Disable automatic completion and signature help inside comments (ocaml/ocaml-lsp#1246)</p> </li> <li> <p>Includes a new optional/configurable option to toggle syntax documentation. If toggled on, allows display of syntax documentation on hover tooltips. Can be controlled via environment variables and by GUI for VS code. (ocaml/ocaml-lsp#1218)</p> </li> <li> <p>For completions on labels that the LSP gets from Merlin, take into account whether the prefix being completed starts with <code>~</code> or <code>?</code>. Change the label completions that start with <code>?</code> to start with <code>~</code> when the prefix being completed starts with <code>~</code>. (ocaml/ocaml-lsp#1277)</p> </li> <li> <p>Fix document syncing (ocaml/ocaml-lsp#1278, ocaml/ocaml-lsp#1280, fixes ocaml/ocaml-lsp#1207)</p> </li> <li> <p>Stop generating inlay hints on generated code (ocaml/ocaml-lsp#1290)</p> </li> <li> <p>Fix parenthesising of function types in <code>SignatureHelp</code> (ocaml/ocaml-lsp#1296)</p> </li> <li> <p>Fix syntax documentation rendering (ocaml/ocaml-lsp#1318)</p> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-07-01-opam-2-2-0">opam 2.2.0</a> </h2> <time datetime="2024-07-01" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">01 Jul 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=opam" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">opam</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p><em>Feedback on this post is welcomed on <a href="https://discuss.ocaml.org/t/ann-opam-2-2-0-is-out/14893">Discuss</a>!</em></p> <p>We are very pleased to announce the release of opam 2.2.0, and encourage all users to upgrade. Please read on for installation and upgrade instructions.</p> <h2>Try it!</h2> <p>In case you plan a possible rollback, you may want to first backup your <code>~/.opam</code> or <code>$env:LOCALAPPDATA\opam</code> directory.</p> <p>The upgrade instructions are unchanged:</p> <ol> <li>Either from binaries: run</li> </ol> <p>For Unix systems</p> <pre><code>bash -c &quot;sh &lt;(curl -fsSL https://opam.ocaml.org/install.sh) --version 2.2.0&quot; </code></pre> <p>or from PowerShell for Windows systems</p> <pre><code>Invoke-Expression &quot;&amp; { $(Invoke-RestMethod https://opam.ocaml.org/install.ps1) }&quot; </code></pre> <p>or download manually from <a href="https://github.com/ocaml/opam/releases/tag/2.2.0">the Github &quot;Releases&quot; page</a> to your PATH.</p> <ol start="2"> <li>Or from source, manually: see the instructions in the <a href="https://github.com/ocaml/opam/tree/2.2.0#compiling-this-repo">README</a>.</li> </ol> <p>You should then run:</p> <pre><code>opam init --reinit -ni </code></pre> <h2>Changes</h2> <h3>Major change: Windows support</h3> <p>After 8 years' effort, opam and opam-repository now have official native Windows support! A big thank you is due to Andreas Hauptmann (<a href="https://github.com/fdopen">@fdopen</a>), whose <a href="https://github.com/fdopen/godi-repo">WODI</a> and <a href="https://fdopen.github.io/opam-repository-mingw/">OCaml for Windows</a> projects were for many years the principal downstream way to obtain OCaml on Windows, Jun Furuse (<a href="https://github.com/camlspotter">@camlspotter</a>) whose <a href="https://inbox.vuxu.org/caml-list/CAAoLEWsQK7=qER66Uixx5pq4wLExXovrQWM6b69_fyMmjYFiZA@mail.gmail.com/">initial experimentation with OPAM from Cygwin</a> formed the basis of opam-repository-mingw, and, most recently, Jonah Beckford (<a href="https://github.com/JonahBeckford">@jonahbeckford</a>) whose <a href="https://diskuv.com/dkmlbook/">DkML</a> distribution kept - and keeps - a full development experience for OCaml available on Windows.</p> <p>OCaml when used on native Windows requires certain tools from the Unix world which are provided by either <a href="https://cygwin.com">Cygwin</a> or <a href="https://msys2.org">MSYS2</a>. We have engineered <code>opam init</code> so that it is possible for a user not to need to worry about this, with <code>opam</code> managing the Unix world, and the user being able to use OCaml from either the Command Prompt or PowerShell. However, for the Unix user coming over to Windows to test their software, it is also possible to have your own Cygwin/MSYS2 installation and use native Windows opam from that. Please see the <a href="https://opam.ocaml.org/blog/opam-2-2-0-windows/">previous blog post</a> for more information.</p> <p>There are two &quot;ports&quot; of OCaml on native Windows, referred to by the name of provider of the C compiler. The mingw-w64 port is <a href="https://www.mingw-w64.org/">GCC-based</a>. opam's external dependency (depext) system works for this port (including providing GCC itself), and many packages are already well-supported in opam-repository, thanks to the previous efforts in <a href="https://github.com/fdopen/opam-repository-mingw">opam-repository-mingw</a>. The MSVC port is <a href="https://visualstudio.microsoft.com/">Visual Studio-based</a>. At present, there is less support in this ecosystem for external dependencies, though this is something we expect to work on both in opam-repository and in subsequent opam releases. In particular, it is necessary to install Visual Studio or Visual Studio BuildTools separately, but opam will then automatically find and use the C compiler from Visual Studio.</p> <h3>Major change: opam tree / opam why</h3> <p><code>opam tree</code> is a new command showing packages and their dependencies with a tree view. It is very helpful to determine which packages bring which dependencies in your installed switch.</p> <pre><code>$ opam tree cppo cppo.1.6.9 ├── base-unix.base ├── dune.3.8.2 (&gt;= 1.10) │ ├── base-threads.base │ ├── base-unix.base [*] │ └── ocaml.4.14.1 (&gt;= 4.08) │ ├── ocaml-base-compiler.4.14.1 (&gt;= 4.14.1~ &amp; &lt; 4.14.2~) │ └── ocaml-config.2 (&gt;= 2) │ └── ocaml-base-compiler.4.14.1 (&gt;= 4.12.0~) [*] └── ocaml.4.14.1 (&gt;= 4.02.3) [*] </code></pre> <p>Reverse-dependencies can also be displayed using the new <code>opam why</code> command. This is useful to examine how dependency versions get constrained.</p> <pre><code>$ opam why cmdliner cmdliner.1.2.0 ├── (&gt;= 1.1.0) b0.0.0.5 │ └── (= 0.0.5) odig.0.0.9 ├── (&gt;= 1.1.0) ocp-browser.1.3.4 ├── (&gt;= 1.0.0) ocp-indent.1.8.1 │ └── (&gt;= 1.4.2) ocp-index.1.3.4 │ └── (= version) ocp-browser.1.3.4 [*] ├── (&gt;= 1.1.0) ocp-index.1.3.4 [*] ├── (&gt;= 1.1.0) odig.0.0.9 [*] ├── (&gt;= 1.0.0) odoc.2.2.0 │ └── (&gt;= 2.0.0) odig.0.0.9 [*] ├── (&gt;= 1.1.0) opam-client.2.2.0~alpha │ ├── (= version) opam.2.2.0~alpha │ └── (= version) opam-devel.2.2.0~alpha ├── (&gt;= 1.1.0) opam-devel.2.2.0~alpha [*] ├── (&gt;= 0.9.8) opam-installer.2.2.0~alpha └── user-setup.0.7 </code></pre> <blockquote> <p>Special thanks to <a href="https://github.com/cannorin">@cannorin</a> for contributing this feature.</p> </blockquote> <h3>Major change: with-dev-setup</h3> <p>There is now a way for a project maintainer to share their project development tools: the <code>with-dev-setup</code> dependency flag. It is used in the same way as <code>with-doc</code> and <code>with-test</code>: by adding a <code>{with-dev-setup}</code> filter after a dependency. It will be ignored when installing normally, but it's pulled in when the package is explicitly installed with the <code>--with-dev-setup</code> flag specified on the command line.</p> <p>For example</p> <pre><code>opam-version: &quot;2.0&quot; depends: [ &quot;ocaml&quot; &quot;ocp-indent&quot; {with-dev-setup} ] build: [make] install: [make &quot;install&quot;] post-messages: [ &quot;Thanks for installing the package&quot; &quot;as well as its development setup. It will help with your future contributions&quot; {with-dev-setup} ] </code></pre> <h3>Major change: opam pin --recursive</h3> <p>When pinning a package using <code>opam pin</code>, opam looks for opam files in the root directory only. With recursive pinning, you can now instruct opam to look for <code>.opam</code> files in subdirectories as well, while maintaining the correct relationship between the <code>.opam</code> files and the package root for versioning and build purposes.</p> <p>Recursive pinning is enabled by the following options to <code>opam pin</code> and <code>opam install</code>:</p> <ul> <li>With <code>--recursive</code>, opam will look for <code>.opam</code> files recursively in all subdirectories.</li> <li>With <code>--subpath &lt;path&gt;</code>, opam will only look for <code>.opam</code> files in the subdirectory <code>&lt;path&gt;</code>.</li> </ul> <p>The two options can be combined: for instance, if your opam packages are stored as a deep hierarchy in the <code>mylib</code> subdirectory of your project you can try <code>opam pin . --recursive --subpath mylib</code>.</p> <p>These options are useful when dealing with a large monorepo-type repository with many opam libraries spread about.</p> <h3>New Options</h3> <ul> <li> <p><code>opam switch -</code>, inspired by <code>git switch -</code>, makes opam switch back to the previously selected global switch.</p> </li> <li> <p><code>opam pin --current</code> fixes a package to its current state (disabling pending reinstallations or removals from the repository). The installed package will be pinned to its current installed state, i.e. the pinned opam file is the one installed.</p> </li> <li> <p><code>opam pin remove --all</code> removes all the pinned packages from a switch.</p> </li> <li> <p><code>opam exec --no-switch</code> removes the opam environment when running a command. It is useful when you want to launch a command without opam environment changes.</p> </li> <li> <p><code>opam clean --untracked</code> removes untracked files interactively remaining from previous packages removal.</p> </li> <li> <p><code>opam admin add-constraint &lt;cst&gt; --packages pkg1,pkg2,pkg3</code> applies the given constraint to a given set of packages</p> </li> <li> <p><code>opam list --base</code> has been renamed into <code>--invariant</code>, reflecting the fact that since opam 2.1 the &quot;base&quot; packages of a switch are instead expressed using a switch invariant.</p> </li> <li> <p><code>opam install --formula &lt;formula&gt;</code> installs a formula instead of a list of packages. This can be useful if you would like to install one package or another one. For example <code>opam install --formula '&quot;extlib&quot; |&quot;extlib-compat&quot;'</code> will install either <code>extlib</code> or <code>extlib-compat</code> depending on what's best for the current switch.</p> </li> </ul> <h3>Miscellaneous changes</h3> <ul> <li>The UI now displays a status when extracting an archive or reloading a repository</li> <li>Overhauled the implementation of <code>opam env</code>, fixing many corner cases for environment updates and making the reverting of package environment variables precise. As a result, using <code>setenv</code> in an opam file no longer triggers a lint warning.</li> <li>Fix parsing pre-opam 2.1.4 switch import files containing extra-files</li> <li>Add a new <code>sys-ocaml-system</code> default global eval variable</li> <li>Hijack the <code>&quot;%{var?string-if-true:string-if-false-or-undefined}%&quot;</code> syntax to support extending the variables of packages with <code>+</code> in their name (<code>conf-c++</code> and <code>conf-g++</code> already exist) using <code>&quot;%{?pgkname:var:}%&quot;</code></li> <li>Fix issues when using fish as shell</li> <li>Sandbox: Mark the user temporary directory (as returned by <code>getconf DARWIN_USER_TEMP_DIR</code>) as writable when TMPDIR is not defined on macOS</li> <li>Add Warning 69: Warn for new syntax when package name in variable in string interpolation contains several '+' (this is related to the &quot;hijack&quot; item above)</li> <li>Add support for Wolfi OS, treating it like Alpine family as it also uses apk</li> <li>Sandbox: <code>/tmp</code> is now writable again, restoring POSIX compliance</li> <li>Add a new <code>opam admin: new add-extrafiles</code> command to add/check/update the <code>extra-files:</code> field according to the files present in the <code>files/</code> directory</li> <li>Add a new <code>opam lint -W @1..9</code> syntax to allow marking a set of warnings as errors</li> <li>Fix bugs in the handling of the <code>OPAMCURL</code>, <code>OPAMFETCH</code> and <code>OPAMVERBOSE</code> environment variables</li> <li>Fix bugs in the handling of the <code>--assume-built</code> argument</li> <li>Software Heritage fallbacks is now supported, but is disabled-by-default for now. For more information you can read one of our <a href="https://opam.ocaml.org/blog/opam-2-2-0-alpha/#Software-Heritage-Binding">previous blog post</a></li> </ul> <p>And many other general and performance improvements were made and bugs were fixed. You can take a look to previous blog posts. API changes and a more detailed description of the changes are listed in:</p> <ul> <li><a href="https://github.com/ocaml/opam/releases/tag/2.2.0-alpha">the release note for 2.2.0~alpha</a></li> <li><a href="https://github.com/ocaml/opam/releases/tag/2.2.0-alpha2">the release note for 2.2.0~alpha2</a></li> <li><a href="https://github.com/ocaml/opam/releases/tag/2.2.0-alpha3">the release note for 2.2.0~alpha3</a></li> <li><a href="https://github.com/ocaml/opam/releases/tag/2.2.0-beta1">the release note for 2.2.0~beta1</a></li> <li><a href="https://github.com/ocaml/opam/releases/tag/2.2.0-beta2">the release note for 2.2.0~beta2</a></li> <li><a href="https://github.com/ocaml/opam/releases/tag/2.2.0-beta3">the release note for 2.2.0~beta3</a></li> <li><a href="https://github.com/ocaml/opam/releases/tag/2.2.0-rc1">the release note for 2.2.0~rc1</a></li> <li><a href="https://github.com/ocaml/opam/releases/tag/2.2.0">the release note for 2.2.0</a></li> </ul> <p>This release also includes PRs improving the documentation and improving and extending the tests.</p> <p>Please report any issues to <a href="https://github.com/ocaml/opam/issues">the bug-tracker</a>.</p> <p>We hope you will enjoy the new features of opam 2.2! 📯</p> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-06-24-merlin-5.1">Merlin 5.1-502 for OCaml 5.2</a> </h2> <time datetime="2024-06-24" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">24 Jun 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=merlin" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">merlin</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We are pleased to announce the release of Merlin <code>5.1-502</code>. This is an important release that brings a lot of backend changes and a major new feature: project-wide occurrences queries.</p> <p>Try it by running <code>dune build @ocaml-index</code> (since dune <code>3.16.0</code>) and performing a reference query!</p> <p>More information can be found in the <a href="https://discuss.ocaml.org/t/ann-project-wide-occurrences-in-merlin-and-lsp/14847">discuss announcement</a> and the <a href="https://github.com/ocaml/merlin/wiki/Get-project%E2%80%90wide-occurrences">wiki</a>.</p> <details> <summary>See full changelog</summary> <ul> <li>merlin binary <ul> <li>Support project-wide occurrences queries using index files (ocaml/merlin#1766) <ul> <li>The file format is described in library <code>Merlin_lib.index_format</code></li> <li>Two new configuration directives are introduced: <ul> <li><code>SOURCE_ROOT</code> that is used to resolve relative paths found in the indexes.</li> <li><code>INDEX</code> that is used to declare the list of index files Merlin should use when looking for occurrences.</li> </ul> </li> </ul> </li> <li>A new <code>UNIT_NAME</code> configuration directive that can be used to tell Merlin the correct name of the current unit in the presence of wrapping (ocaml/merlin#1776)</li> <li>Perform incremental indexation of the buffer when typing. (ocaml/merlin#1777)</li> <li><code>merlin-lib.commands</code>: Add a <code>find_command_opt</code> alternative to <code>find_command</code> that does not raise (ocaml/merlin#1778)</li> <li>Prevent uid clashes by not returning PWO for defs located in the current interface file (ocaml/merlin#1781)</li> <li>Reset uid counters when restoring the typer cache so that uids are stable across re-typing (ocaml/merlin#1779)</li> <li>Improve the behavior on occurrences when the cursor is on a label / constructor declaration (ocaml/merlin#1785)</li> </ul> </li> <li>editor modes <ul> <li>emacs: add basic support for project-wide occurrences (ocaml/merlin#1766)</li> <li>vim: add basic support for project-wide occurrences (ocaml/merlin#1767, @Julow)</li> </ul> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-06-17-dune.3.16.0">Dune 3.16.0</a> </h2> <time datetime="2024-06-17" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">17 Jun 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=dune" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">dune</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We're happy to announce the release of Dune 3.16.0.</p> <p>Among the list of chances, this release contains improvements to Melange support and a way to look for references in a whole project using Merlin and OCaml LSP.</p> <details> <summary>See full changelog</summary> <h3>Added</h3> <ul> <li> <p>Allow libraries with the same <code>(name ..)</code> in projects as long as they don't conflict during resolution (via <code>enabled_if</code>). (#10307, @anmonteiro, @jchavarri)</p> </li> <li> <p><code>dune describe pp</code> now finds the exact module and the stanza it belongs to, instead of guessing the name of the preprocessed file. (#10321, @anmonteiro)</p> </li> <li> <p>Print the result of <code>dune describe pp</code> with the respective dialect printer. (#10322, @anmonteiro)</p> </li> <li> <p>Add new flag <code>--context</code> to <code>dune ocaml-merlin</code>, which allows to select a Dune context when requesting Merlin config. Add <code>dune describe contexts</code> subcommand. Introduce a field <code>generate_merlin_rules</code> for contexts declared in the workspace, that allows to optionally produce Merlin rules for other contexts besides the one selected for Merlin (#10324, @jchavarri)</p> </li> <li> <p>Melange: add include paths for private library <code>.cmj</code> files during JS emission. (#10416, @anmonteiro)</p> </li> <li> <p><code>dune ocaml-merlin</code>: communicate additional directives <code>SOURCE_ROOT</code>, <code>UNIT_NAME</code> (the actual name with wrapping) and <code>INDEX</code> with the paths to the index(es). (#10422, @voodoos)</p> </li> <li> <p>Add a new alias <code>@ocaml-index</code> that uses the <code>ocaml-index</code> binary to generate indexes that can be read by tools such as Merlin to provide project-wide references search. (#10422, @voodoos)</p> </li> <li> <p>Merlin: add optional <code>(merlin_reader CMD)</code> construct to <code>(dialect)</code> stanza to configure a Merlin reader (#8567, @andreypopp)</p> </li> </ul> <h3>Changed</h3> <ul> <li> <p>Melange: treat private libraries with <code>(package ..)</code> as public libraries, fixing an issue where <code>import</code> paths were wrongly emitted. (#10415, @anmonteiro)</p> </li> <li> <p>Install <code>.glob</code> files for Coq theories too (#10602, @ejgallego)</p> </li> </ul> <h3>Fixed</h3> <ul> <li> <p>Don't try to document nonexistent libraries in doc-new target (#10319, fixes #10056, @jonludlam)</p> </li> <li> <p>Make <code>dune-site</code>'s <code>load_all</code> function look for <code>META</code> files so that it doesn't fail on empty directories in the plugin directory (#10458, fixes #10457, @shym)</p> </li> <li> <p>Fix incorrect warning for libraries defined inside nonexistant directories using <code>(subdir ..)</code> and used by executables using <code>dune-build-info</code> (#10525, @rgrinberg)</p> </li> <li> <p>Don't try to take build lock when running <code>coq top --no-build</code> (#10547, fixes #7671, @lzy0505)</p> </li> <li> <p>Make sure to truncate Dune's lock file after locking and unlocking so that users cannot observe incorrect PID's (#10575, @rgrinberg)</p> </li> <li> <p>MDX: link MDX binary with <code>byte_complete</code>. This fixes <code>(libraries)</code> with foreign archives on Linux. (#10586, fixes #10582, @anmonteiro)</p> </li> <li> <p>Virtual libraries: fix an issue where linking an executable involving several virtual libries would cause an error. (#10581, fixes #10460, @rgrinberg)</p> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-06-12-merlin-4.16">Merlin 4.16 for OCaml 4.14 and 5.1</a> </h2> <time datetime="2024-06-12" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">12 Jun 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=merlin" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">merlin</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We are pleased to announce the release of Merlin <code>4.16-414</code> and <code>4.16-501</code>.</p> <p>These releases expose additional functions for packages using merlin-lib that need to manually parse merlin commands.</p> <details> <summary>See full changelog</summary> <ul> <li>merlin binary <ul> <li>Addition of a <code>merlin-lib.commands</code> library which disassociates the execution of commands from the <code>new_protocol</code>, from the binary, allowing it to be invoked from other projects (ocaml/merlin#1758)</li> <li><code>merlin-lib.commands</code>: Add a <code>find_command_opt</code> alternative to <code>find_command</code> that does not raise (ocaml/merlin#1778)</li> </ul> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-06-03-merlin-54.15">Merlin 4.15 for OCaml 4.14 and 5.1</a> </h2> <time datetime="2024-06-03" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">03 Jun 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=merlin" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">merlin</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We are pleased to announce the release of Merlin <code>4.15-414</code> and <code>4.15-501</code>.</p> <p>These releases bring a handful of bug fixes and improvements, notably to the <code>destruct</code> feature, that were already released for OCaml 5.2 in Merlin 5.0-502.</p> <details> <summary>See full changelog</summary> <ul> <li>merlin binary <ul> <li>destruct: Removal of residual patterns (ocaml/merlin#1737, fixes ocaml/merlin#1560)</li> <li>Do not erase fields' names when destructing punned record fields (ocaml/merlin#1734, fixes ocaml/merlin#1661)</li> <li>Ignore SIGPIPE in the Merlin server process (ocaml/merlin#1746)</li> <li>Fix lexing of quoted strings in comments (ocaml/merlin#1754, fixes ocaml/merlin#1753)</li> <li>Improve cursor position detection in longidents (ocaml/merlin#1756)</li> </ul> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-05-26-dune.3.15.3">Dune 3.15.3</a> </h2> <time datetime="2024-05-26" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">26 May 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=dune" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">dune</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We just released version 3.15.3 with some bug fixes.</p> <details> <summary>See full changelog</summary> <h3>Fixed</h3> <ul> <li> <p>Fix interpretation of <code>exists_if</code> predicate in <code>META</code> files of installed libraries containing more than one element. (#10564, fixes #10563, @dbuenzli, @nojb)</p> </li> <li> <p>Fix TSAN warning in wait4 stubs (#10554, fixes #10553, @emillon)</p> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-05-22-opam-2-1-6">opam 2.1.5</a> </h2> <time datetime="2024-05-22" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">22 May 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=opam" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">opam</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p><em>Feedback on this post is welcomed on <a href="https://discuss.ocaml.org/t/ann-opam-2-1-6/14683">Discuss</a>!</em></p> <p>We are pleased to announce the patch release of <a href="https://github.com/ocaml/opam/releases/tag/2.1.6">opam 2.1.6</a>.</p> <p>This opam release consists of <a href="https://github.com/ocaml/opam/issues/5870">backported</a> bug fixes and improvements:</p> <ul> <li>Changes necessary for opam-repository (see <a href="https://github.com/ocaml/opam-repository/issues/23789">ocaml/opam-repository#23789</a>) <ul> <li>Warn if <code>GNU patch</code> is not detected when a patch is applied (<a href="https://github.com/ocaml/opam/pull/5893">#5893</a>)</li> <li>Use <code>gpatch</code> by default instead of <code>patch</code> on NetBSD and DragonFlyBSD (<a href="https://github.com/ocaml/opam/pull/5893">#5893</a>)</li> <li>Use <code>gpatch</code> if it exists and is detected as GNU patch when <code>patch</code> is not <code>GNU patch</code> (<a href="https://github.com/ocaml/opam/pull/5893">#5893</a>)</li> </ul> </li> <li>Better recognize depexts on Gentoo, NetBSD, OpenBSD (<a href="https://github.com/ocaml/opam/pull/5065">#5065</a>)</li> <li>Upgrade the vendored dune to 3.14.0 (<a href="https://github.com/ocaml/opam/pull/5869">#5869</a>)</li> <li>Fix debug logs showing up regardless of verbosity on macOS 12.7.1 / 13.6.3 / 14.2 and FreeBSD (<a href="https://github.com/ocaml/opam/pull/5769">#5769</a>)</li> </ul> <hr> <p>Opam installation instructions (unchanged):</p> <ol> <li> <p>From binaries: run</p> <pre><code>bash -c &quot;sh &lt;(curl -fsSL https://opam.ocaml.org/install.sh) --version 2.1.6&quot; </code></pre> <p>or download manually from <a href="https://github.com/ocaml/opam/releases/tag/2.1.6">the Github &quot;Releases&quot; page</a> to your PATH. In this case, don't forget to run <code>opam init --reinit -ni</code> to enable sandboxing if you had version 2.0.0~rc manually installed or to update you sandbox script.</p> </li> <li> <p>From source, using opam:</p> <pre><code>opam update; opam install opam-devel </code></pre> <p>(then copy the opam binary to your PATH as explained, and don't forget to run <code>opam init --reinit -ni</code> to enable sandboxing if you had version 2.0.0~rc manually installed or to update your sandbox script)</p> </li> <li> <p>From source, manually: see the instructions in the <a href="https://github.com/ocaml/opam/tree/2.1.6#compiling-this-repo">README</a>.</p> </li> </ol> <p>We hope you enjoy this new minor version, and remain open to <a href="https://github.com/ocaml/opam/issues">bug reports</a> and <a href="https://github.com/ocaml/opam/issues">suggestions</a>.</p> <details> <summary>See full changelog</summary> <ul> <li>Changes necessary for opam repository</li> <li>Warn if <code>GNU patch</code> is not detected when a patch is applied [#5893 @kit-ty-kate]</li> <li>Use <code>gpatch</code> by default instead of <code>patch</code> on NetBSD and DragonFlyBSD [#5893 @kit-ty-kate]</li> <li>Use <code>gpatch</code> if it exists and is detected as GNU patch when <code>patch</code> is not <code>GNU patch</code> [#5893 @kit-ty-kate]</li> <li>Better recognize depexts on Gentoo, NetBSD, OpenBSD [#5065 @mndrix]</li> <li>Upgrade the vendored dune to 3.14.0 [#5869 @kit-ty-kate]</li> <li>Vendor mccs.1.1+17 [#5769 @kit-ty-kate]</li> <li>Require mccs &gt;= 1.1+17: Fix debug logs showing up regardless of verbosity on macOS 12.7.1 / 13.6.3 / 14.2 and FreeBSD [#5769 @kit-ty-kate]</li> <li>API Changes:</li> <li><code>OpamSystem.patch</code> now displays a warning when GNU patch is not detected and looks for both patch and gpatch as a backup option depending on the OS [#5893 @kit-ty-kate]</li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-05-22-merlin-5.0">Merlin 5.0</a> </h2> <time datetime="2024-05-22" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">22 May 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=merlin" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">merlin</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We are pleased to announce the release of Merlin 5.0-502!</p> <p>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 <a href="https://github.com/ocaml/merlin/issues">issue tracker</a>!</p> <p>This release also fixes a handful of issues, two of them improving the behaviour of Merlin's <code>destruct</code> feature.</p> <details> <summary>See full changelog</summary> <ul> <li>merlin binary <ul> <li>Support for OCaml 5.2 (#1757)</li> <li><code>destruct</code>: Removal of residual patterns (#1737, fixes #1560)</li> <li>Do not erase fields' names when destructing punned record fields (#1734, fixes #1661)</li> <li>Ignore SIGPIPE in the Merlin server process (#1746)</li> <li>Fix lexing of quoted strings in comments (#1754, fixes #1753)</li> <li>Improve cursor position detection in longidents (#1756)</li> <li>Addition of a <code>merlin-lib.commands</code> library that disassociates the execution of commands from the <code>new_protocol</code>, from the binary, allowing it to be invoked from other projects (#1758)</li> <li>New occurrences backend: Don't index occurrences when <code>merlin.hide</code> attribute is present. (#1768)</li> <li>Use the new <code>uid_to_decl</code> table in 5.2's CMT files to get documentation. (#1773)</li> </ul> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-05-13-ocaml-5.2.0">Release of OCaml 5.2.0</a> </h2> <time datetime="2024-05-13" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">13 May 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=ocaml" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">ocaml</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We have the pleasure of celebrating Inge Lehmann's birthday by announcing the release of OCaml version 5.2.0.</p> <p>Some of the highlights in OCaml 5.2.0 are:</p> <ul> <li>Reintroduced GC compaction</li> <li>Restored native backend for POWER 64 bits</li> <li>Thread sanitiser support</li> <li>New Dynarray module</li> <li>New <code>-H</code> flag for hidden include directories</li> <li>Project-wide occurrence metadata support for developer tools</li> <li>Raw identifiers</li> <li>Local open in type expressions</li> </ul> <p>And a lot of incremental changes:</p> <ul> <li>Around 20 new functions in the standard library</li> <li>Many fixes and improvements in the runtime</li> <li>Many bug fixes</li> </ul> <p>OCaml 5.2.0 is still a somewhat experimental release compared to the OCaml 4.14 branch. In particular:</p> <ul> <li>The Windows MSVC port is still unavailable.</li> <li>Ephemeron performances need to be investigated.</li> <li><code>statmemprof</code> is being tested in the developer branch.</li> <li>There are a number of known runtime concurrency or GC performance bugs (that trigger under rare circumstances).</li> </ul> <p>Since the Windows MSVC port and <code>statmemprof</code> are still missing, the maintenance support for OCaml 4.14 will be extended until at least the end of the year.</p> <p>Please report any unexpected behaviours on the <a href="https://github.com/ocaml/ocaml/issues">OCaml issue tracker</a> and post any questions or comments you might have on our <a href="https://discuss.ocaml.org">discussion forums</a>.</p> <p>The full list of changes can be found in the changelog below.</p> <hr> <h2>Installation Instructions</h2> <p>The base compiler can be installed as an opam switch with the following commands:</p> <pre><code><span class='bash-source'>opam update </span><span class='bash-source'>opam switch create 5.2.0 </span></code></pre> <p>The source code for the release candidate is also directly available on:</p> <ul> <li><a href="https://github.com/ocaml/ocaml/archive/5.2.0.tar.gz">GitHub</a></li> <li><a href="https://caml.inria.fr/pub/distrib/ocaml-5.2/ocaml-5.2.0.tar.gz">OCaml archives at Inria</a></li> </ul> <h3>Fine-Tuned Compiler Configuration</h3> <p>If you want to tweak the configuration of the compiler, you can switch to the option variant with:</p> <pre><code><span class='bash-source'>opam update </span><span class='bash-source'>opam switch create </span><span class='bash-keyword-operator-redirect'>&lt;</span><span class='bash-source'>switch_name</span><span class='bash-keyword-operator-redirect'>&gt;</span><span class='bash-source'> ocaml-variants.5.2.0+options </span><span class='bash-keyword-operator-redirect'>&lt;</span><span class='bash-source'>option_list</span><span class='bash-keyword-operator-redirect'>&gt;</span><span class='bash-source'> </span></code></pre> <p>where <code>&lt;option_list&gt;</code> is a space separated list of <code>ocaml-option-*</code> packages. For instance, for a <code>flambda</code> and <code>no-flat-float-array</code> switch:</p> <pre><code><span class='bash-source'>opam switch create 5.2.0+flambda+nffa ocaml-variants.5.0.0+options ocaml-option-flambda ocaml-option-no-flat-float-array </span></code></pre> <details> <summary>See full changelog</summary> <p>(Changes that can break existing programs are marked with a &quot;*&quot;)</p> <h3>Restored and New Backends:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12276">#12276</a>, <a href="https://github.com/ocaml/ocaml/issues/12601">#12601</a>: Native-code compilation for POWER (64 bits, little-endian) (Xavier Leroy, review by KC Sivaramakrishnan, Anil Madhavapeddy, and Stephen Dolan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12667">#12667</a>: Extend the latter to POWER 64 bits, big-endian, ELFv2 ABI (A. Wilcox, review by Xavier Leroy)</p> </li> </ul> <h3>Runtime System:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12193">#12193</a>: Reintroduce GC compaction for shared pools. Adds a parallel compactor for the shared pools (which contain major heap blocks sized less than 128 words). Explicit only for now, on calls to <code>Gc.compact</code>. (Sadiq Jaffer, Nick Barnes, review by Anil Madhavapeddy, Damien Doligez, David Allsopp, Miod Vallat, Artem Pianykh, Stephen Dolan, Mark Shinwell, and KC Sivaramakrishnan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12114">#12114</a>: Add ThreadSanitizer support (Fabrice Buoro and Olivier Nicole, based on an initial work by Anmol Sahoo, review by Damien Doligez, Sébastien Hinderer, Jacques-Henri Jourdan, Luc Maranget, Guillaume Munch-Maccagnoni, Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12850">#12850</a>: Update <code>Gc.quick_stat</code> data at the end of major cycles and compaction. This PR adds an additional <code>caml_collect_gc_stats_sample_stw</code> to the major heap cycling STW. This means that <code>Gc.quick_stat</code> now actually reflects the state of the heap after a major cycle or compaction. (Sadiq Jaffer, review by Miod Vallat and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12859">#12859</a>: Ensure <code>Gc.compact</code> does a full major before the compactor runs (Sadiq Jaffer, review by Leo White, Mark Shinwell, Gabriel Scherer, Josh Berdine, David Allsopp, and KC Sivaramakrishnan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/10111">#10111</a>: Increase the detail of location information for debugging events to allow the end-line number and character offset to be reported. (David Allsopp, review by Nick Barnes, Enguerrand Decorne and Stephen Dolan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/10403">#10403</a>, <a href="https://github.com/ocaml/ocaml/issues/12202">#12202</a>: Introduce <code>caml_ext_table_add_noexc</code> that does not raise <code>Out_of_memory</code> exceptions, and use it inside the blocking sections of <code>caml_read_directory</code>. Also, check for overflows in EXT table sizes. (Xavier Leroy, report by Arseniy Alekseyev, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/11332">#11332</a>, <a href="https://github.com/ocaml/ocaml/issues/12702">#12702</a>: Make sure <code>Bool_val(v)</code> has type <code>bool</code> in C++ (Xavier Leroy, report by ygrek, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12772">#12772</a>, <a href="https://github.com/ocaml/ocaml/issues/12787">#12787</a>: Avoid using <code>_Bool</code> in public headers for the sake of C++ compatibility (Guillaume Munch-Maccagnoni, report by KC Sivaramakrishnan, review by Xavier Leroy and KC Sivaramakrishnan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12223">#12223</a>: Constify constructors and flags tables in C code. Now these tables will go in the read-only segment where they belong. (Antonin Décimo, review by Gabriel Scherer and Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12234">#12234</a>: Make instrumented time calculation more thread-safe on macOS. (Anil Madhavapeddy, review by Daniel Bünzli and Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12235">#12235</a>, <a href="https://github.com/ocaml/ocaml/issues/12468">#12468</a>: Introduce and use the <code>CAMLnoret</code> macro as a lighter alternative to <code>CAMLnoreturn_start</code> / <code>CAMLnoreturn_end</code>. Implement it so as to conform with C11, C23, C++11, C++17. (Xavier Leroy and Dhruv Maroo, with help from Antonin Décimo, review by Gabriel Scherer and David Allsopp)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12275">#12275</a>: <code>caml/stack.h</code>: More abstract macros to describe OCaml stacks and how to traverse them, supporting more stack layouts. (Xavier Leroy, review by KC Sivaramakrishnan and Fabrice Buoro)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12268">#12268</a>: Deliver <code>Out_of_memory</code> exception if domain creation fails due to memory resource exhaustion. Previously, it was always a <code>Failure</code>. (Anil Madhavapeddy, review by David Allsopp)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12300">#12300</a>, <a href="https://github.com/ocaml/ocaml/issues/12314">#12314</a>: Discard <code>out_channel</code> buffered data on permanent I/O error (Xavier Leroy, report by Török Edwin, review by Anil Madhavapeddy and Nicolás Ojeda Bär)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/11386">#11386</a>: Simplifications and fixes to Multicore systhreads implementation. (Guillaume Munch-Maccagnoni, review by Anil Madhavapeddy and KC Sivaramakrishnan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12875">#12875</a>, <a href="https://github.com/ocaml/ocaml/issues/12879">#12879</a>, <a href="https://github.com/ocaml/ocaml/issues/12882">#12882</a>: Execute preemptive systhread switching as a delayed pending action. This ensures that one can reason within the FFI that no mutation happens on the same domain when allocating on the OCaml heap from C, consistently with OCaml 4. This also fixes further bugs with the Multicore systhreads implementation. (Guillaume Munch-Maccagnoni, bug reports and suggestion by Mark Shinwell, review by Nick Barnes and Stephen Dolan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12408">#12408</a>: <code>Domain.spawn</code> no longer leaks its functional argument for the whole duration of the children's domain lifetime. (Guillaume Munch-Maccagnoni, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12409">#12409</a>: Fix unsafety and deadlocks should an asynchronous exception arise at specific locations during domain creation and shutdown. (Guillaume Munch-Maccagnoni, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/11911">#11911</a>, <a href="https://github.com/ocaml/ocaml/issues/12381">#12381</a>: Restore <code>statmemprof</code> functionality in part, with some API changes in <code>Gc.Memprof</code>. (Nick Barnes, review by Jacques-Henri Jourdan and Guillaume Munch-Maccagnoni).</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12430">#12430</a>: Simplify dynamic bytecode loading in <code>Meta.reify_bytecode</code> (Stephen Dolan, review by Sébastien Hinderer, Vincent Laviron and Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12489">#12489</a>: Fix an error-handling bug in <code>caml_alloc_sprintf</code> (Stephen Dolan, report by Chris Casinghino, review by Jeremy Yallop and Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/11307">#11307</a>: Finish adapting the implementation of asynchronous actions for Multicore: soundness, liveness, and performance issues. Do not crash if a signal handler is called from an unregistered C thread and other possible soundness issues. Prevent issues where joins on other domains could make the toplevel unresponsive to Ctrl-C. Avoid needless repeated polling in C code when callbacks cannot run immediately. (Guillaume Munch-Maccagnoni, review by Enguerrand Decorne, Xavier Leroy, and KC Sivaramakrishnan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12634">#12634</a>: Simplify TSan backtrace bookkeeping upon raise (Olivier Nicole and Fabrice Buoro, review by Gabriel Scherer)</p> </li> </ul> <ul> <li>(<em>Breaking Change</em>) <a href="https://github.com/ocaml/ocaml/issues/12686">#12686</a>: Some primitives had the wrong types to be callable from the bytecode interpreter. Either fix their types, mark them as <code>CAMLexport</code> instead of <code>CAMLprim</code>, or remove them entirely if no longer used. (Xavier Leroy, review by David Allsopp)</li> </ul> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12700">#12700</a>, continuing <a href="https://github.com/ocaml/ocaml/issues/11763">#11763</a> and trying to address <a href="https://github.com/ocaml/ocaml/issues/12660">#12660</a>: Use the correct types for primitives when generating the table of primitives used by <code>ocamlrun</code>. (Xavier Leroy, motivation, review and improvements by Antonin Décimo)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12345">#12345</a>, <a href="https://github.com/ocaml/ocaml/issues/12710">#12710</a>: Fix issues with finaliser orphaning at domain termination (KC Sivaramakrishnan, report by Gabriel Scherer, review by Gabriel Scherer, Sadiq Jaffer and Fabrice Buoro)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12599">#12599</a>: Refactor Dynlink startup to avoid parsing bytecode sections twice (Stephen Dolan, review by David Allsopp, Hugo Heuzard, Damien Doligez and Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12678">#12678</a>, <a href="https://github.com/ocaml/ocaml/issues/12898">#12898</a>: Free channel buffers on close rather than on finalisation (Damien Doligez, review by Jan Midtgaard and Gabriel Scherer, report by Jan Midtgaard)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12681">#12681</a>: Fix TSan false positives due to volatile write handling (Olivier Nicole, Fabrice Buoro, and Anmol Sahoo, review by Luc Maranget, Gabriel Scherer, Hernan Ponce de Leon, and Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12743">#12743</a>: Use <code>pthread_sigmask</code> instead of <code>sigprocmask</code>. Updates usage of <code>sigprocmask</code> to <code>pthread_sigmask</code> in <code>otherlibs/unix</code>. (Max Slater, review by Miod Vallat and Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12769">#12769</a>: Unify MSVC and MinGW-w64 code paths, by always using WinAPI directly. (David Allsopp, Antonin Décimo, and Samuel Hym, review by Nicolas Ojeda Bar)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/11911">#11911</a>, <a href="https://github.com/ocaml/ocaml/issues/12382">#12382</a>, <a href="https://github.com/ocaml/ocaml/issues/12383">#12383</a>: Restore <code>statmemprof</code> functionality in part (backtrace buffers, per-thread and per-domain data structures, GC/allocation interface). (Nick Barnes, review by Gabriel Scherer, Fabrice Buoro, Sadiq Jaffer, Guillaume Munch-Maccagnoni, and Jacques-Henri Jourdan).</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12735">#12735</a>: Store both ends of the stack chain in continuations (Leo White, review by Miod Vallat and KC Sivaramakrishnan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12746">#12746</a>: Simplify and clean up TSan annotations (Olivier Nicole, review by Miod Vallat and Fabrice Buoro)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12809">#12809</a>: Add ThreadSanitizer support to FreeBSD/AMD64 (Miod Vallat, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12810">#12810</a>: Port ThreadSanitizer support to Linux and macOS on arm64 (Miod Vallat, review by Tim McGilchrist)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12811">#12811</a>: Define and use the CAMLthread_local macro for TLS variables. (Antonin Décimo and Samuel Hym, review by Miod Vallat and Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12814">#12814</a>: More detailed failure messages from <code>input_value</code> and <code>Marshal.from_*</code> (Xavier Leroy, review by Stephen Dolan and Anil Madhavapeddy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12815">#12815</a>: Correctly format multiline locations in exception backtraces in the compiler driver's style. (David Allsopp, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12773">#12773</a>, <a href="https://github.com/ocaml/ocaml/issues/12830">#12830</a>, <a href="https://github.com/ocaml/ocaml/issues/12834">#12834</a>: Rewrite <code>caml_c_thread_(un)register</code> to fix various bugs. (Guillaume Munch-Maccagnoni, reported by Miod Vallat, suggested by Hari Hara Naveen S, reviewed by Fabrice Buoro, Gabriel Scherer, and Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12876">#12876</a>: Port ThreadSanitizer support to Linux on POWER (Miod Vallat, review by Tim McGilchrist)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12886">#12886</a>: Reinitialise I/O mutexes after fork (Max Slater, review by Guillaume Munch-Maccagnoni and Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12907">#12907</a>: Port ThreadSanitizer support to Linux on RiscV (Miod Vallat, review by Nicolás Ojeda Bär and Fabrice Buoro)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12915">#12915</a>: Port ThreadSanitizer support to Linux on s390x (Miod Vallat, review by Tim McGilchrist)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12934">#12934</a>: Fix data races between marking and sweeping functions (Olivier Nicole, suggested by Stephen Dolan, review by Gabriel Scherer, Miod Vallat, and Damien Doligez)</p> </li> </ul> <h3>Language Features:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12295">#12295</a>, <a href="https://github.com/ocaml/ocaml/issues/12568">#12568</a>: Give <code>while true</code> a polymorphic type, similarly to <code>assert false</code> (Jeremy Yallop, review by Nicolás Ojeda Bär and Gabriel Scherer, suggestion by Rodolphe Lepigre and John Whitington)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12044">#12044</a>: Add local module open syntax for types.</p> <pre><code> module A = struct type t = int type r = unit type s = string end type example = A.(t * r * s) </code></pre> <p>(Alistair O'Brien, review by Gabriel Scherer, Nicolás Ojeda Bär, and Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/11252">#11252</a>, RFC 27: Support raw identifier syntax <code>\#foo</code> (Stephen Dolan, review by David Allsopp, Gabriel Scherer, and Olivier Nicole)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12315">#12315</a>: Use type annotations from arguments in <code>let rec</code> (Stephen Dolan, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12375">#12375</a>: Allow use of [@untagged] for all immediate types like <code>char</code>, <code>bool</code>, and <code>variant</code> with only constant constructors. (Christophe Raffalli, review by Gabriel Scherer)</p> </li> </ul> <ul> <li>(<em>Breaking Change</em>) <a href="https://github.com/ocaml/ocaml/issues/12502">#12502</a>: The compiler now normalises the newline sequence <code>\r\n</code> to a single <code>\n</code> character during lexing to guarantee that the semantics of newlines in string literals are not modified by Windows tools transforming <code>\n</code> into <code>\r\n</code> in source files. Warning 29 [eol-in-string] is not emitted anymore, as the normalisation gives more robust semantics to newlines in string literals. (Gabriel Scherer and Damien Doligez, review by Daniel Bünzli, David Allsopp, Andreas Rossberg, Xavier Leroy, report by Andreas Rossberg)</li> </ul> <h3>Standard Library:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/11563">#11563</a>: Add the Dynarray module to the <code>stdlib</code>. Dynamic arrays are arrays whose length can be changed by adding or removing elements at the end, similar to 'vectors' in C++ or Rust. (Gabriel Scherer, Simon Cruanes, and Florian Angeletti, review by Daniel Bünzli, Guillaume Munch-Maccagnoni, Clément Allain, Damien Doligez, Wiktor Kuchta, and Pieter Goetschalckx)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12716">#12716</a>: Add <code>Format.pp_print_nothing</code> function. (Léo Andrès, review by Gabriel Scherer and Nicolás Ojeda Bär)</p> </li> </ul> <ul> <li> <p>(<em>Breaking Change</em>) <a href="https://github.com/ocaml/ocaml/issues/6732">#6732</a>, <a href="https://github.com/ocaml/ocaml/issues/12423">#12423</a>: Make <code>Buffer.add_substitute</code> surjective and fix its documentation. (Damien Doligez, review by Antonin Décimo)</p> </li> <li> <p>(<em>Breaking Change</em>) <a href="https://github.com/ocaml/ocaml/issues/10775">#10775</a>, <a href="https://github.com/ocaml/ocaml/issues/12499">#12499</a>: Half-precision, floating-point elements in Bigarray. (Anton Yabchinskiy, review by Xavier Leroy and Nicolás Ojeda Bär)</p> </li> </ul> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/11517">#11517</a>, <a href="https://github.com/ocaml/ocaml/issues/12477">#12477</a>: Expose <code>pp_infinity</code> in interface of the format module and check that margin is less than <code>pp_infinity</code> when setting or checking geometry. (Janith Petangoda, reported by Simmo Saan, reviewed by Florian Angeletti, Simmo Saan, Josh Berdine, and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12217">#12217</a>: Add <code>Array.shuffle</code>. (Daniel Bünzli, review by Nicolás Ojeda Bär, David Allsopp, and Alain Frisch)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12212">#12212</a>: Add cache-aligned constructor for atomics. The patch ensures that all allocations (of the right size) in the shared heap are aligned. (Bartosz Modelski with Gabriel Scherer, Guillaume Munch-Maccagnoni, Xavier Leroy, review by Alain Frisch, Anil Madhavapeddy, Gabriel Scherer, Guillaume Munch-Maccagnoni, KC Sivaramakrishnan, Stefan Muenzel, Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12307">#12307</a>: Add BLAKE2b hashing and an MD5 submodule to the Digest module. (Xavier Leroy, review by Olivier Nicole, Gabriel Scherer, Wiktor Kuchta, Daniel Bünzli, David Allsopp)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12365">#12365</a>: Add <code>In_channel.input_bigarray</code>, <code>In_channel.really_input_bigarray</code>, <code>Out_channel.output_bigarray</code>, <code>Unix.read_bigarray</code>, <code>Unix.write_bigarray</code>, <code>Unix.single_write_bigarray</code>. (Nicolás Ojeda Bär, review by Jeremy Yallop, Xavier Leroy, Gabriel Scherer, David Allsopp)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12455">#12455</a>: Add <code>Array.init_matrix</code>, <code>Float.Array.make_matrix</code>, <code>Float.Array.init_matrix</code>. (Glen Mével, review by Xavier Leroy, Gabriel Scherer, Jeremy Yallop, Nicolas Ojeda Bar)</p> </li> </ul> <ul> <li>(<em>Breaking Change</em>) <a href="https://github.com/ocaml/ocaml/issues/12455">#12455</a>: <code>Array.make_matrix dimx dimy f</code> now raises <code>Invalid_argument</code> when <code>dimx = 0 &amp;&amp; dimy &lt; 0</code>. This was already specified but not enforced. (Glen Mével, report by Jeremy Yallop, review by Nicolas Ojeda Bar)</li> </ul> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12459">#12459</a>: Add <code>Random.int_in_range</code>, <code>Random.int32_in_range</code>, <code>Random.int64_in_range</code>, <code>Random.nativeint_in_range</code>, and their counterpart in <code>Random.State</code>. (Glen Mével and Xavier Leroy, review by Gabriel Scherer, Xavier Leroy, Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12459">#12459</a>: <code>Random</code>: Restore compatibility between 32-bit integers (JavaScript) and 63-bit integers (64-bit OCaml). For <code>Random.full_int</code> this was guaranteed in 4.14 but wrongly removed in 5.0. (Xavier Leroy, review by Glen Mével)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12511">#12511</a>: Minor performance improvements and cleanups in the implementation of modules Int32, Int64, and Nativeint (Xavier Leroy, review by Gabriel Scherer and Daniel Bünzli)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12558">#12558</a>: Adapt GC alarms for Multicore and fix their documentation. (Guillaume Munch-Maccagnoni, review by KC Sivaramakrishnan and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12625">#12625</a>: Remove the Closure module from Obj (Vincent Laviron, review by Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12758">#12758</a>, <a href="https://github.com/ocaml/ocaml/issues/12998">#12998</a>: Remove the <code>Marshal.Compression</code> flag to the <code>Marshal.to_*</code> functions. The compilers are still able to use ZSTD compression for compilation artefacts. This is a forward port and clean-up of the emergency fix that was introduced in OCaml 5.1.1 by <a href="https://github.com/ocaml/ocaml/issues/12734">#12734</a>. (Xavier Leroy, review by Damien Doligez)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12784">#12784</a>: Fix computation of minor-heap allocation in <code>Gc.counters()</code> and <code>Gc.allocated_bytes()</code>. (Nick Barnes, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12770">#12770</a>: Add <code>Fun.compose</code>. (Justin Frank, review by Nicolás Ojeda Bär, Daniel Bünzli, and Jeremy Yallop)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12845">#12845</a>: Add <code>{In,Out}_channel.is_binary_mode</code> as the dual of <code>set_binary_mode</code>. This function was previously only available in the internal C API. (David Allsopp, review by Nicolás Ojeda Bär and Xavier Leroy)</p> </li> </ul> <h3>Type System:</h3> <ul> <li><a href="https://github.com/ocaml/ocaml/issues/12313">#12313</a>, <a href="https://github.com/ocaml/ocaml/issues/11799">#11799</a>: Do not rebuild as-pattern types when a ground type annotation is given. This allows to work around problems with GADTs in as-patterns. (Jacques Garrigue, report by Leo White, review by Gabriel Scherer)</li> </ul> <h3>Code Generation and Optimisations:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/11239">#11239</a>: On x86-64 and RISC-V, reduce alignment of OCaml stacks from 16 to 8. This reduces stack usage. It's only C stacks that require 16-alignment. (Xavier Leroy, review by Gabriel Scherer and Stephen Dolan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12311">#12311</a>: On POWER, 32-bit FP numbers stored in memory (e.g., in Bigarrays) were not correctly rounded sometimes. (Xavier Leroy, review by Anil Madhavapeddy and Tim McGilchrist)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12551">#12551</a>, <a href="https://github.com/ocaml/ocaml/issues/12608">#12608</a>, <a href="https://github.com/ocaml/ocaml/issues/12782">#12782</a>, <a href="https://github.com/ocaml/ocaml/issues/12596">#12596</a>: Overhaul of recursive value compilation. Non-function recursive bindings are now forbidden from Lambda onwards, and they're compiled using a new <code>Value_rec_compiler</code> module. (Vincent Laviron and Lunia Ayanides, review by Gabriel Scherer, Stefan Muenzel and Nathanaëlle Courant)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/1809">#1809</a>, <a href="https://github.com/ocaml/ocaml/issues/12181">#12181</a>: Rewrite <code>compare x y op 0</code> to <code>x op y</code> when values are integers (Xavier Clerc, Stefan Muenzel, review by Gabriel Scherer and Vincent Laviron)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12825">#12825</a>: Disable common subexpression elimination for atomic loads... again. (Gabriel Scherer, review by KC Sivaramakrishnan, Xavier Leroy and Vincent Laviron, report by Vesa Karvonen)</p> </li> </ul> <h3>Other Libraries:</h3> <ul> <li><a href="https://github.com/ocaml/ocaml/issues/12213">#12213</a>: <code>Dynlink</code> library, improve legibility of error messages (Samuel Hym, review by Gabriel Scherer and Nicolás Ojeda Bär)</li> </ul> <ul> <li>(<em>Breaking Change</em>) <a href="https://github.com/ocaml/ocaml/issues/12686">#12686</a>: <code>Runtime_events</code> library, C API: define <code>caml_runtime_events_{start,pause,resume}</code> as returning <code>void</code> instead of <code>value</code>. (Xavier Leroy, review by David Allsopp)</li> </ul> <h3>Compiler User-Interface and Warnings:</h3> <ul> <li><a href="https://github.com/ocaml/ocaml/issues/11989">#11989</a>, <a href="https://github.com/ocaml/ocaml/issues/12246">#12246</a>, RFC 31: New flag, <code>-H</code>, to allow for transitive dependencies without including them in the initial environment. (Chris Casinghino, François Bobot, and Gabriel Scherer, review by Leo White and Stefan Muenzel, RFC by François Bobot)</li> </ul> <ul> <li>(<em>Breaking Change</em>) <a href="https://github.com/ocaml/ocaml/issues/10613">#10613</a>, <a href="https://github.com/ocaml/ocaml/issues/12405">#12405</a>: Simplify the values used for the system variable (<code>system:</code> in <code>ocamlopt -config</code> or the <code>Config.system</code> constant). In particular, s390x and ppc64 now report &quot;linux&quot; instead of &quot;elf&quot;; all variants of 32-bit ARM on Linux now report &quot;linux&quot;; OpenBSD now reports &quot;openbsd&quot; instead of &quot;bsd&quot; for 32-bit ARM; FreeBSD, NetBSD, and OpenBSD now report the same value for both x86_64 and x86_32; x86_32 systems matching <em>BSD but not FreeBSD</em>, NetBSD*, or OpenBSD* are no longer identified (as on x86_64); x86_32 Linux now reports &quot;linux&quot; instead of &quot;linux_elf&quot;. (David Allsopp, request by Kate Deplaix, review by Sébastien Hinderer and Xavier Leroy)</li> </ul> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12247">#12247</a>: Configure: <code>--disable-ocamldebug</code> can now be used instead of <code>--disable-debugger</code> (which remains available for compatibility) (Gabriel Scherer, review by Damien Doligez and Sébastien Hinderer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12199">#12199</a>: Improve the error message for non-overriding <code>inherit!</code> (Florian Angeletti, review by Jules Aguillon)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12210">#12210</a>: Uniform style for inline code in compiler messages (Florian Angeletti, review by Gabriel Scherer)</p> </li> </ul> <ul> <li>(<em>Breaking Change</em>) <a href="https://github.com/ocaml/ocaml/issues/12278">#12278</a>, #:12325: Remove the <code>OCAML_FLEXLINK</code> environment variable from the compiler drivers. This environment variable was previously used as part of the FlexDLL bootstrap procedure and existed solely for that purpose. Its removal greatly simplifies both the build system and testsuite machinery. (David Allsopp, review by Sébastien Hinderer)</li> </ul> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12347">#12347</a>: Error messages: always report missing polyvariant tags (Florian Angeletti, report by Tianbo Hao, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12224">#12224</a>: Specialised error message when trying to apply non-functor module (e.g., <code>module M = Int(Int)</code>) (Florian Angeletti, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12451">#12451</a>: Warning 53 (misplaced attributes) now works for all attributes. (Chris Casinghino, review by Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12622">#12622</a>: Give hints about existential types appearing in error messages (Leo White, review by Gabriel Scherer and Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12671">#12671</a>: When a class type parameter or class parameter does not match, identify which parameter in the error message, instead of saying &quot;A type parameter&quot; or &quot;A parameter.&quot; (Stefan Muenzel, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12679">#12679</a>: Add more detail to the error message and manual in case of invalid module type substitutions. (Stefan Muenzel, review by Gabriel Scherer and Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12750">#12750</a>: Display the command executed to extract primitives in <code>ocamlc -verbose</code> (David Allsopp, review by Nicolás Ojeda Bär)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12777">#12777</a>: Add details about the actual and expected method types to the method mismatch error messages (Javier Chávarri, review by Gabriel Scherer and Florian Angeletti)</p> </li> </ul> <ul> <li>(<em>Breaking Change</em>) <a href="https://github.com/ocaml/ocaml/issues/12942">#12942</a>: Fix line ordering in some module inclusion error messages (Nick Roberts, review by Florian Angeletti, report by Carl Eastlund)</li> </ul> <h3>Manual and Documentation:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12338">#12338</a>: Clarification of the documentation of process related function in the Unix module regarding the first element of arguments and shell's PID (Christophe Raffalli, review by Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12473">#12473</a>: Document in <code>runtime/memory.c</code> our current understanding of accesses to the OCaml heap from the C runtime code -- the problem of hybrid programs mixing two memory models (Gabriel Scherer and Guillaume Munch-Maccagnoni, review by Olivier Nicole and Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12456">#12456</a>: Document the incompatibility between effects, on one hand, and <code>caml_callback</code> and asynchronous callbacks (signal handlers, finalisers, memprof callbacks...), on the other (Guillaume Munch-Maccagnoni, review by KC Sivaramakrishnan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12694">#12694</a>: Document in <code>runtime/tsan.c</code> the TSan instrumentation choices and the consequences with regard to the memory model (Olivier Nicole, review by Miod Vallat, Gabriel Scherer, Guillaume Munch-Maccagnoni and Fabrice Buoro)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12802">#12802</a>: Add manual chapter about ThreadSanitizer support (Olivier Nicole, review by Miod Vallat, Sebastien Hinderer, Fabrice Buoro, Gabriel Scherer and KC Sivaramakrishnan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12819">#12819</a>: Clarify which runtime interactions are allowed in custom ops (Basile Clément, review by Guillaume Munch-Maccagnoni and Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12840">#12840</a>: Manual: update runtime tracing chapter for custom events (e.g., <a href="https://github.com/ocaml/ocaml/issues/12335">#12335</a>) (Lucas Pluvinage, Sadiq Jaffer and Olivier Nicole, review by Gabriel Scherer, David Allsopp, Tim McGilchrist, and Thomas Leonard)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13066">#13066</a>: Update <code>OCAMLRUNPARAM</code> documentation for the stack size parameter <code>l</code> (Florian Angeletti, review by Nicolás Ojeda Bär, Tim McGilchrist, and Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13078">#13078</a>: Update Format tutorial on structural boxes to mention alignment questions (Edwin Török, review by Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13092">#13092</a>: Document the existence of the <code>[@@poll error]</code> built-in attribute (Florian Angeletti, review by Gabriel Scherer)</p> </li> </ul> <h3>Tools:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12340">#12340</a>: <code>testsuite</code>: collect known issues with current <code>-short-paths</code> implementation for existential types (Florian Angeletti, Samuel Hym, review by Florian Angeletti and Thomas Refis)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12147">#12147</a>: <code>ocamllex</code>: allow carriage returns at the end-of-line directives (SeungCheol Jung, review by Nicolás Ojeda Bär)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12260">#12260</a>: Fix <code>invalid_argument</code> on some external or module aliases in <code>ocamlnat</code> (Fabian Hemmer, review by Vincent Laviron)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12185">#12185</a>: New script language for <code>ocamltest</code> (Damien Doligez with Florian Angeletti, Sébastien Hinderer, Gabriel Scherer, review by Sébastien Hinderer and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12371">#12371</a>: <code>ocamltest</code>: fix recursive expansion of variables (Antonin Décimo, Damien Doligez, review by Sébastien Hinderer, Damien Doligez, Gabriel Scherer, and Xavier Leroy)</p> </li> </ul> <ul> <li>(<em>Breaking Change</em>) <a href="https://github.com/ocaml/ocaml/issues/12497">#12497</a>, <a href="https://github.com/ocaml/ocaml/issues/12613">#12613</a>: Make <code>ocamlc/ocamlopt</code> fail with an error when no input files are specified to build an executable (Antonin Décimo, review by Sébastien Hinderer)</li> </ul> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12576">#12576</a>: <code>ocamldep </code>: various refactors (Antonin Décimo, review by Florian Angeletti, Gabriel Scherer, and Léo Andrès)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12615">#12615</a>: <code>ocamldoc</code>: get rid of the <code>odoc_literate</code> and <code>odoc_todo</code> generators (Sébaistien Hinderer, review by Gabriel Scherer and Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12624">#12624</a>: Use <code>$XDG_CONFIG_DIRS</code> in addition to <code>$XDG_CONFIG_HOME</code> when searching for <code>init.ml</code>, and use this to extend <code>init.ml</code> support to the toplevel when running on Windows. (David Allsopp, report by Jonah Beckford, review by Nicolás Ojeda Bär and Antonin Décimo)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12688">#12688</a>: Setting the <code>env</code> variable <code>NO_COLOR</code> with an empty value no longer has effects. Previously, setting <code>NO_COLOR</code> with any value, including the empty value, would disable colours (unless <code>OCAML_COLOR</code> is also set). After this change, the user must set <code>NO_COLOR</code> with an non-empty value to disable colours. This reflects a specification clarification/change from the upstream website at https://no-color.org. (Favonia, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12744">#12744</a>: <code>ocamltest</code>: run tests in recursive subdirs more eagerly (Nick Roberts, review by Nicolás Ojeda Bär)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12901">#12901</a>, 12908: <code>ocamllex</code>: add overflow checks to prevent generating incorrect lexers; use unsigned numbers in the table encoding when possible (Vincent Laviron, report by Edwin Török, review by Xavier Leroy)</p> </li> </ul> <h3>Internal/<code>compiler-libs</code> Changes:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12508">#12508</a> : Add compiler-side support for project-wide occurrences in Merlin by generating index tables of all identifier occurrences. This extra data in <code>.cmt</code> files is only added when the new flag <code>-bin-annot-occurrences</code> is passed. (Ulysse Gérard, Nathanaëlle Courant, suggestions by Gabriel Scherer and Thomas Refis, review by Florian Angeletti, Gabriel Scherer, and Thomas Refis)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12236">#12236</a>, <a href="https://github.com/ocaml/ocaml/issues/12386">#12386</a>, <a href="https://github.com/ocaml/ocaml/issues/12391">#12391</a>, <a href="https://github.com/ocaml/ocaml/issues/12496">#12496</a>, <a href="https://github.com/ocaml/ocaml/issues/12673">#12673</a>: Use syntax as sole determiner of arity. This changes function arity to be based solely on the source program's parsetree. Previously, the heuristic for arity had more subtle heuristics that involved type information about patterns. Function arity is important because it determines when a pattern match's effects run and is an input into the fast path for function application.</p> <p>This change affects tooling; it changes the function constructs in parsetree and typedtree.</p> <p>See https://github.com/ocaml/RFCs/pull/32 for the original RFC.</p> <p>(Nick Roberts; review by Richard Eisenberg, Leo White, and Gabriel Scherer; RFC by Stephen Dolan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12639">#12639</a>: Parsing: attach a location to the RHS of <code>Ptyp_alias</code> and improve the 'alias type mismatch' error message. (Jules Aguillon, review by Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12447">#12447</a>: Remove 32-bit targets from <code>X86_proc.system</code> (Masanori Ogino, review by David Allsopp)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12216">#12216</a>, <a href="https://github.com/ocaml/ocaml/issues/12248">#12248</a>: Prevent reordering of atomic loads during instruction scheduling. This is for reference, as instruction scheduling is currently unused in OCaml 5. (Xavier Leroy, report by Luc Maranget and KC Sivaramakrishnan, review by Nicolás Ojeda Bär)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12025">#12025</a>: Split <code>Typecore.unify_pat_types</code> into two in order to avoid unnecessary references to the environment in <code>type_pat</code> (Jacques Garrigue and Takafumi Saikawa, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12031">#12031</a>: Use dedicated types to represent names of compilation units and predefined exceptions in CMO files. (Sébastien Hinderer, review by Florian Angeletti, Thomas Refis, Gabriel Scherer, Vincent Laviron, Pierre Chambart, Luke Maurer, Hugo Heuzard, Xavier Leroy, and Damien Doligez)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12109">#12109</a>: Pack parameters to unification in <code>unification_environment</code> (Takafumi Saikawa and Jacques Garrigue, review by Richard Eisenberg)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12331">#12331</a>, <a href="https://github.com/ocaml/ocaml/issues/12361">#12361</a>: Pack the unification data for pattern checking in Typecore (Takafumi Saikawa and Jacques Garrigue, review by Gabriel Scherer, Thomas Refis, and Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12229">#12229</a>: Remove global mutable state for typechecking patterns in Typecore in favor of local mutable state. (Nick Roberts, review by Takafumi Saikawa)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12542">#12542</a>: Minor bugfix to <a href="https://github.com/ocaml/ocaml/issues/12236">#12236</a>: restore dropped call to <code>instance</code> (Nick Roberts, review by Jacques Garrigue)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12242">#12242</a>: Move the computation of stack frame parameters to a separate <code>Stackframe</code> module, and save the parameters in the results of the <code>Linearize</code> pass. (Xavier Leroy, review by KC Sivaramakrishnan and Mark Shinwell)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12442">#12442</a>: Document jump summaries in the pattern-matching compiler (Gabriel Scherer and Thomas Refis, review by Florian Angeletti and Vincent Laviron)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12446">#12446</a>, <a href="https://github.com/ocaml/ocaml/issues/12792">#12792</a>: Remove the hooks machinery around channel locking in <code>runtime/io.c</code> (Gabriel Scherer, review by Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12389">#12389</a>, <a href="https://github.com/ocaml/ocaml/issues/12544">#12544</a>, <a href="https://github.com/ocaml/ocaml/issues/12984">#12984</a>, <a href="https://github.com/ocaml/ocaml/issues/12987">#12987</a>: Centralise the handling of metadata for compilation units and artifacts in preparation to improve Unicode support for OCaml source files. (Florian Angeletti, review by Vincent Laviron and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12532">#12532</a>, <a href="https://github.com/ocaml/ocaml/issues/12553">#12553</a>: Improve readability of the pattern-matching debug output (Gabriel Scherer, review by Thomas Refis)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12537">#12537</a>: Use C11/C++11 standard static assertion (Antonin Décimo, review by Sebastien Hinderer, Xavier Leroy, and KC Sivaramakrishnan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12169">#12169</a>: Runtime: document and enforce naming conventions around STW sections (Gabriel Scherer, review by Enguerrand Decorne, Miod Vallat, B. Szilvasy and Nick Barnes, report by KC Sivaramakrishnan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12669">#12669</a> : Clean up some global state handling in schedgen (Stefan Muenzel, review by Miod Vallat and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12640">#12640</a>: Make the module separator used in symbol names configurable (Miod Vallat, review by Hugo Heuzard and Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12691">#12691</a> : Clean up <code>Ctype.expand_abbrev_gen</code> and rename <code>Env.add_local_type</code> to <code>add_local_constraint</code> (Takafumi Saikawa and Jacques Garrigue, review by Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12786">#12786</a> : Clean up the algorithm of <code>Ctype.limited_generalize</code> (Takafumi Saikawa and Jacques Garrigue, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/10691">#10691</a>: <code>Ast_mapper</code>, <code>Ast_iterator</code>: add functions directive_argument, <code>toplevel_directive</code>, and <code>toplevel_phrase</code> (Guillaume Petiot, review by Gabriel Scherer and Kate Deplaix)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12764">#12764</a>: Move all installable headers in <code>caml/</code> subdirectories. (Antonin Décimo, review by Gabriel Scherer and David Allsopp)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12914">#12914</a>: Slightly change the s390x assembly dialect in order to build with Clang's integrated assembler (Miod Vallat, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13001">#13001</a>: Do not <code>read_back</code> entire shapes to get aliases' UIDs when building the usages index (Ulysse Gérard, review by Gabriel Scherer and Nathanaëlle Courant)</p> </li> </ul> <h3>Build System:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12198">#12198</a>, <a href="https://github.com/ocaml/ocaml/issues/12321">#12321</a>, <a href="https://github.com/ocaml/ocaml/issues/12586">#12586</a>, <a href="https://github.com/ocaml/ocaml/issues/12616">#12616</a>, <a href="https://github.com/ocaml/ocaml/issues/12706">#12706</a>, <a href="https://github.com/ocaml/ocaml/issues/13048">#13048</a>: Continue the merge of the sub-Makefiles into the root Makefile started with <a href="https://github.com/ocaml/ocaml/issues/11243">#11243</a>, <a href="https://github.com/ocaml/ocaml/issues/11248">#11248</a>, <a href="https://github.com/ocaml/ocaml/issues/11268">#11268</a>, <a href="https://github.com/ocaml/ocaml/issues/11420">#11420</a> and <a href="https://github.com/ocaml/ocaml/issues/11675">#11675</a>. (Sébastien Hinderer, review by David Allsopp and Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12569">#12569</a>, <a href="https://github.com/ocaml/ocaml/issues/12570">#12570</a>: Remove <code>otherlibraries</code> as a prerequisite for <code>runtop</code>; use <code>runtop-with-otherlibs</code> to use a library from <code>otherlibs/</code> (Gabriel Scherer, review by Sébastien Hinderer, suggestion by David Allsopp)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12652">#12652</a>: Make magic numbers easier to bump and duplicate (Sébastien Hinderer, review by Antonin Décimo, David Allsopp and Florian Angeletti)</p> </li> </ul> <ul> <li>(<em>Breaking Change</em>) <a href="https://github.com/ocaml/ocaml/issues/12751">#12751</a>: <code>--with-target-bindir</code> configure option implemented. This option refers to the location of the runtime binaries on the target system for a cross-compiler and is embedded in executables produced by <code>ocamlc</code>. It does not affect the bytecode executables installed as part of the build. The old mechanism <code>make TARGET_BINDIR=..</code> no longer works. (David Allsopp, review by Damien Doligez, Xavier Leroy, and Olivier Nicole)</li> </ul> <ul> <li><a href="https://github.com/ocaml/ocaml/issues/12768">#12768</a>, <a href="https://github.com/ocaml/ocaml/issues/13030">#13030</a>: Detect MinGW-w64 coupling with GCC or LLVM, detect <code>clang-cl</code>, and fix C compiler feature detection on macOS. (Antonin Décimo, review by Miod Vallat and Sébastien Hinderer)</li> </ul> <h3>Bug Fixes:</h3> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/10652">#10652</a>, <a href="https://github.com/ocaml/ocaml/issues/12720">#12720</a>: Fix evaluation order in presence of optional arguments (Jacques Garrigue, report by Leo White, review by Vincent Laviron)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12595">#12595</a>, <a href="https://github.com/ocaml/ocaml/issues/12597">#12597</a>: Fix a race in <code>caml_clear_gc_stats_sample</code> (Gabriel Scherer, review by B. Szilvasy, report by B. Szilvasy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12580">#12580</a>: Fix location of alias pattern variables (Chris Casinghino, review Gabriel Scherer, report by Milo Davis)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12583">#12583</a>: Add a closing event for when <code>EV_MAJOR_EPHE_MARK</code> is complete (Sudha Parimala, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12566">#12566</a>: <code>caml_output_value_to_malloc</code> wrongly uses <code>caml_stat_alloc</code> instead of <code>malloc</code> since 4.06, breaking (in pooled mode) user code that uses <code>free</code> on the result. Symmetrically, <code>caml_input_value_from_malloc</code> should use <code>free</code>. (Gabriel Scherer, review by Xavier Leroy and Enguerrand Decorne, report by Ido Yariv)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12490">#12490</a>: Unix: protect the <code>popen_processes</code> hashtable with a mutex (Gabriel Scherer, report by Olivier Nicole, review by Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/11931">#11931</a>: Fix tricky typing bug with type substitutions (Stephen Dolan, review by Leo White and Jacques Garrigue)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12037">#12037</a>, <a href="https://github.com/ocaml/ocaml/issues/12171">#12171</a>: Fix <code>get_extern_state</code> potential NULL dereference (Alexander Skvortsov, report by Török Edwin, design by Gabriel Scherer, Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12635">#12635</a>: Fix <code>get_intern_state</code> potential NULL dereference (Antonin Décimo, review by KC Sivaramakrishnan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12032">#12032</a>, <a href="https://github.com/ocaml/ocaml/issues/12059">#12059</a>: Bug fixes related to compilation of recursive definitions (Vincent Laviron, report by Victoire Noizet, review by Gabriel Scherer)</p> </li> </ul> <ul> <li>(<em>Breaking Change</em>) <a href="https://github.com/ocaml/ocaml/issues/12145">#12145</a>: Loopy constraints cause <code>ocamlc</code> to loop. Fixed by completely removing the call to <code>update_type</code> in <code>Typedecl.transl_type_decl</code>, as the expansion is already checked by <code>check_regularity</code>. As a result, recursion is more polymorphic, which may cause some (essentially wrong) type declarations to have unbound type variables and some constraints unrelated to the concrete type to be ignored (see tests/typing-misc/constraints.ml). (Jacques Garrigue, report by Richard Eisenberg, review by Leo White)</li> </ul> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12207">#12207</a>, <a href="https://github.com/ocaml/ocaml/issues/12222">#12222</a>: Make closure computation linear in the number of recursive functions instead of quadratic (Vincent Laviron, report by François Pottier, review by Nathanaëlle Courant and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/11040">#11040</a>, <a href="https://github.com/ocaml/ocaml/issues/12591">#12591</a>: Fix a data race in <code>major_gc.c</code> (Gabriel Scherer, review by Guillaume Munch-Maccagnoni and KC Sivaramakrishnan, report by Sadiq Jaffer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12238">#12238</a>, <a href="https://github.com/ocaml/ocaml/issues/12403">#12403</a>, <a href="https://github.com/ocaml/ocaml/issues/12698">#12698</a>: Read input files in one go to avoid source reprinting issues (Gabriel Scherer, report by Mike Spivey and Vincent Laviron, review by Nicolás Ojeda Bär, Xavier Leroy and Jeremy Yallop)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12334">#12334</a>, <a href="https://github.com/ocaml/ocaml/issues/12368">#12368</a>: Bad error message with mutually recursive abbreviations (Jacques Garrigue, report by Richard Eisenberg, review by Gabriel Scherer and Richard Eisenberg)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12401">#12401</a>: <code>seek_in</code> and <code>seek_out</code> sometimes returned normally when given negative offsets, instead of failing. Now both functions should consistently raise <code>Sys_error</code> in this case. (Nicolás Ojeda Bär, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12267">#12267</a>: Fix stack alignment computation (Miod Vallat, report by Jan Midtgaard, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12395">#12395</a>, <a href="https://github.com/ocaml/ocaml/issues/12404">#12404</a>: Fix thread-unsafety in the fallback implementation of <code>Unix.create_process</code> (the one used when <code>posix_spawnp</code> is unavailable) (Xavier Leroy, report by Chris Vine, review by Nicolás Ojeda Bär)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12949">#12949</a>: Open shadowing mistriggers (Gabriel Scherer, review by Florian Angeletti, report by Andreas Rossberg)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12526">#12526</a>: Honor <code>ocaml.inline always</code> attribute on functions with optional arguments and default values in the Closure backend (Alain Frisch, review by Vincent Laviron)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12677">#12677</a>, <a href="https://github.com/ocaml/ocaml/issues/12889">#12889</a>: Make <code>Domain.DLS</code> thread-safe (Gabriel Scherer, review by Olivier Nicole and Damien Doligez, report by Vesa Karvonen)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12561">#12561</a>: Fix crash when combining TSan and frame-pointers (Fabrice Buoro and Olivier Nicole, report by Jan Midtgaard, review by Miod Vallat and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12482">#12482</a>: Rework bounds checking code in the POWER backend (Miod Vallat and Xavier Leroy, report by Jan Midtgaard, review by KC Sivaramakrishnan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12528">#12528</a>, <a href="https://github.com/ocaml/ocaml/issues/12703">#12703</a>: Avoid pointer arithmetic overflow in <code>Tag_val</code> macro (very likely harmless, but can trigger alarms) (Xavier Leroy, report by Sam Goldman, review by Guillaume Munch-Maccagnoni)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12593">#12593</a>: TSan should handle <code>Effect.Unhandled</code> correctly (Fabrice Buoro and Olivier Nicole, report by Jan Midtgaard and Miod Vallat, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12684">#12684</a>: Fix locations filename in AST produced by the <code>-pp</code> option (Gabriel Scherer, review by Florian Angeletti)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12714">#12714</a>: Check whether macros are defined before using them to ensure that the headers can always be used in code which turns on <code>-Wundef</code> (or equivalent). (Antonin Décimo, review by Miod Vallat, Gabriel Scherer, Xavier Leroy, and David Allsopp)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12726">#12726</a>: Fix segmentation fault under Windows when executing a bytecode file if the runtime (<code>ocamlrun.exe</code>) cannot be found. (Vadim Zborovskii, Nicolás Ojeda Bär, report by Vadim Zborovskii, review by David Allsopp)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12727">#12727</a>, <a href="https://github.com/ocaml/ocaml/issues/12730">#12730</a>: Fix bug with value <code>let-rec</code> and labelled applications (Vincent Laviron, review by Gabriel Scherer)</p> </li> </ul> <ul> <li>(<em>Breaking Change</em>) <a href="https://github.com/ocaml/ocaml/issues/12751">#12751</a>: Always keep within the 128 character limit for shebang lines. Previous fix in <a href="https://github.com/ocaml/ocaml/issues/8622">#8622</a> handled building the compiler with a long prefix. This patch extends this to the bytecode executables emitted by that compiler. (David Allsopp, review by Damien Doligez, Xavier Leroy, and Olivier Nicole)</li> </ul> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12755">#12755</a>: Fix data race on global pools arrays of <code>pool_freelist</code> (Fabrice Buoro and Olivier Nicole, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12796">#12796</a>, <a href="https://github.com/ocaml/ocaml/issues/12801">#12801</a>: Fix memory corruption in <code>caml_unix_alloc_sockaddr</code> (Thomas Leonard, review by Nicolás Ojeda Bär)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12737">#12737</a>: Fix data races in <code>minor_gc.c</code> and <code>caml_natdynlink_open</code> (Olivier Nicole, review by Stefan Muenzel, Miod Vallat, Guillaume Munch-Maccagnoni, Gabriel Scherer, and Xavier Leroy)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12831">#12831</a>: Fix call to <code>caml_call_realloc_stack</code> for s390x in PIC mode (Vincent Laviron, report by Jerry James, review by Miod Vallat)</p> </li> </ul> <ul> <li>(<em>Breaking Change</em>) <a href="https://github.com/ocaml/ocaml/issues/12837">#12837</a>: Show non-generalisable type parameters in type definitions Changes type of type parameters in <code>outcometree.mli</code>. (Jacques Garrigue, review by Richard Eisenberg)</li> </ul> <ul> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12897">#12897</a>: Fix locking bugs in <code>Runtime_events</code> (Gabriel Scherer and Thomas Leonard, review by Olivier Nicole, Vincent Laviron, and Damien Doligez, report by Thomas Leonard)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12851">#12851</a>: Fix race between runtime events teardown and event emission (Olivier Nicole, review by Miod Vallat and Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12860">#12860</a>: Fix an assertion that wasn't taking into account the possibility of an ephemeron pointing at static data (Mark Shinwell, review by Gabriel Scherer and KC Sivaramakrishnan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12861">#12861</a>: Fix a possible crash in the <code>threads</code> library (Mark Shinwell, review by Gabriel Scherer and KC Sivaramakrishnan)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/11040">#11040</a>, <a href="https://github.com/ocaml/ocaml/issues/12894">#12894</a>: Silence false data race observed between <code>caml_shared_try_alloc</code> and oldify. Introduces macros to call TSan annotations which help annotate a &quot;happens before&quot; relationship. (Hari Hara Naveen S and Olivier Nicole, review by Gabriel Scherer and Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12958">#12958</a>: Fix <code>tail-modulo-cons</code> compilation of <code>try-with</code>, <code>&amp;&amp;</code>, and <code>||</code> expressions. (Gabriel Scherer and Nicolás Ojeda Bär, report by Sylvain Boilard, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12919">#12919</a>: Fix register corruption in <code>caml_callback2_asm</code> on s390x. (Miod Vallat, review by Gabriel Scherer)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12924">#12924</a>, <a href="https://github.com/ocaml/ocaml/issues/12930">#12930</a>: Rework package constraint checking to improve interaction with immediacy (Chris Casinghino and Florian Angeletti, review by Florian Angeletti and Richard Eisenberg)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12969">#12969</a>: Fix a data race in <code>caml_darken_cont</code> (Fabrice Buoro and Olivier Nicole, review by Gabriel Scherer and Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/12971">#12971</a>, <a href="https://github.com/ocaml/ocaml/issues/12974">#12974</a>: Fix an uncaught <code>Ctype.Escape</code> exception on some invalid programs forming recursive types. (Gabriel Scherer, review by Florian Angeletti, report by Neven Villani)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13019">#13019</a>: Remove linking instructions for the Unix library from <code>threads.cma</code>. (This was done for <code>threads.cmxa</code> in OCaml 3.11.) Eliminates warnings from new LLD when using <code>threads.cma</code> of duplicated libraries. (David Allsopp, review by Nicolás Ojeda Bär)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13058">#13058</a>: Add TSan instrumentation to <code>caml_call_gc()</code>, since it may raise exceptions. (Fabrice Buoro, Olivier Nicole, Gabriel Scherer, and Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13079">#13079</a>: Save and restore frame pointer across Iextcall on ARM64 (Tim McGilchrist, review by KC Sivaramakrishnan and Miod Vallat)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13094">#13094</a>: Fix undefined behavior of left-shifting a negative number (Antonin Décimo, review by Miod Vallat and Nicolás Ojeda Bär)</p> </li> <li> <p><a href="https://github.com/ocaml/ocaml/issues/13130">#13130</a>: Minor fixes to Pprintast for raw identifiers and local module open syntax for types (Chet Murthy, review by Gabriel Scherer)</p> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-04-30-ppxlib-0.32.1">Ppxlib 0.32.1</a> </h2> <time datetime="2024-04-30" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">30 Apr 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=ppxlib" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">ppxlib</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>The ppxlib team is happy to announce the release of ppxlib.0.32.1.</p> <p>The main feature of this release is of course the support for the upcoming OCaml 5.2 release. Starting with this version you'll be able to use ppx with the latest compiler.</p> <p>The feature also comes with a small follow up improvement to the 0.32.0 error reporting changes that simplifies how exception thrown from context free rewriting are handled. The errors will now be inserted where the generated code would have been instead of appended to the whole AST. This should lead to a better error reporting from the compiler as it will now report errors in order of their position in the code.</p> <p>We'd like to thank the OCaml Software Foundation once again as they funded the vast majority of the work for this release.</p> <details> <summary>See full changelog</summary> <ul> <li> <p>Add support for OCaml 5.2</p> </li> <li> <p>Insert errors from caught located exceptions in place of the code that should have been generated by context-free rules. (#472, @NathanReb)</p> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-04-30-odoc-2.4.2">Odoc 2.4.2</a> </h2> <time datetime="2024-04-30" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">30 Apr 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=odoc" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">odoc</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We've released <code>odoc</code> 2.4.2 with OCaml 5.2 compatibility and a few bug fixes.</p> <details> <summary>See full changelog</summary> <h3>Added</h3> <ul> <li>OCaml 5.2.0 compatibility (@Octachron, #1094, #1112)</li> </ul> <h3>Fixed</h3> <ul> <li>Fix issues #1066 and #1095 with extended opens (@jonludlam, #1082, #1100)</li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-04-23-ocamlformat-0.26.2">OCamlFormat 0.26.2</a> </h2> <time datetime="2024-04-23" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">23 Apr 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=ocamlformat" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">ocamlformat</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We've released OCamlFormat 0.26.2 with compatibility with OCaml 5.2.</p> <details> <summary>See full changelog</summary> <h3>Changed</h3> <ul> <li>Compatible with OCaml 5.2.0 (#2510, @gpetiot, @Julow)</li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-04-23-dune.3.15.2">Dune 3.15.2</a> </h2> <time datetime="2024-04-23" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">23 Apr 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=dune" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">dune</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We just released version 3.15.2 with some bug fixes.</p> <p>This one is particularly important for Coq users since it fixes a bug introduced in 3.13.0 that made incremental builds very slow.</p> <details> <summary>See full changelog</summary> <h3>Fixed</h3> <ul> <li> <p>If no directory targets are defined, then do not evaluate <code>enabled_if</code> (#10442, @rgrinberg)</p> </li> <li> <p>Fix a bug where Coq projects were being rebuilt from scratch each time the dependency graph changed. (#10446, fixes #10149, @alizter)</p> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-04-13-mdx-2.4.1">MDX 2.4.1</a> </h2> <time datetime="2024-04-13" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">13 Apr 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=mdx" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">mdx</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>This release reverts the change introduce in Mdx 2.4.0 that allows the execution of included OCaml code blocks after users reported issues. We will revisit the feature to ensure it is opt-in and doesn't break users setup.</p> <details> <summary>See full changelog</summary> <h4>Changed</h4> <ul> <li>Revert #446: &quot;Allow execution of included OCaml code blocks&quot; (#451, @gpetiot). Included OCaml code blocks preserve their pre-2.4.0 behavior.</li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-04-03-dune.3.15.0">Dune 3.15.0</a> </h2> <time datetime="2024-04-03" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">03 Apr 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=dune" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">dune</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We're happy to announce that Dune 3.15.0 is now available. This feature has many fixes and new features that you can find in the changelog.</p> <p>There are a few new features that we would like to specially highlight.</p> <h3>Removal of previous limitations in many forms</h3> <p>Prior to Dune 3.15 there were a number of limitations where percent forms like <code>%{env:...}</code> could be used to expand to useful values. In this release, @rgrinberg put some effort to relax a lot of these restrictions where possible.</p> <p>In the new version some of these limitations have been lifted, so for example <code>{env:...}</code> can be used in <code>install</code> stanzas (<a href="https://github.com/ocaml/dune/pull/10160">#10160</a>).</p> <p>Likewise there was no consistency where <code>%{cma:...}</code> or <code>%{cmo:...}</code> could be used. With <a href="https://github.com/ocaml/dune/pull/10169">#10169</a>, these forms should work consistently everywhere.</p> <p>Similarly the variables allowed in <code>enabled_if</code> fields have been expanded in <a href="https://github.com/ocaml/dune/pull/10250">#10250</a>, from just allowing variables that can be computed from the context to now allowing all variables as long as expanding these variables does not introduce dependency cycles.</p> <p>These relaxed rules can also be combined to enable a library depending on environment variables, e.g. <code>(enabled_if %{env:ENABLE_LIBFOO=false}))</code>.</p> <h3>Overlapping names in different contexts</h3> <p>Continuing the theme of conditionally enabling or disabling code to be built, @jchavarri and @rgrinberg's work on <a href="https://github.com/ocaml/dune/pull/10220">#10220</a> makes it possible to have overlapping names between <code>executable</code> and <code>melange.emit</code> targets. This can be useful when a name is to be shared in different contexts (e.g. one context with native compilation and one emitting code for the browser).</p> <h3>Properly output UTF-8 encoded text when formatting</h3> <p>Dune does not assume an encoding of dune files, however when files were formatted the formatter would err on the safe side and escape bytes outside the ASCII range. This means that UTF-8 characters outside of ASCII would get escaped into decimal escape sequences.</p> <p>This was especially annoying in places where the user would write natural language texts, which is common when defining Opam packages in <code>dune-project</code> files. For example a discussion of a paper by Paul Erdős, Peter Frankl, Vojtěch Rödl would upon reformatting be turned into Paul Erd\197\145s, Peter Frankl, Vojt\196\155 R\195\182, which does a disservice to these scientists and is hard to read.</p> <p>Thanks to the work of @moyodiallo in <a href="https://github.com/ocaml/dune/pull/9728">#9728</a> starting with Dune 3.15 the original encoding will be preserved, so your package descriptions will be more readable.</p> <details> <summary>See full changelog</summary> <h3>Added</h3> <ul> <li> <p>Add link flags to to <code>ocamlmklib</code> for ctypes stubs (#8784, @frejsoya)</p> </li> <li> <p>Remove some unnecessary limitations in the expansions of percent forms in install stanza. For example, the <code>%{env:..}</code> form can be used to select files to be installed. (#10160, @rgrinberg)</p> </li> <li> <p>Allow artifact expansion percent forms (<code>%{cma:..}</code>, <code>%{cmo:..}</code>, etc.) in more contexts. Previously, they would be randomly forbidden in some fields. (#10169, @rgrinberg)</p> </li> <li> <p>Allow <code>%{inline_tests}</code> in more contexts (#10191, @rgrinberg)</p> </li> <li> <p>Remove limitations on percent forms in the <code>(enabled_if ..)</code> field of libraries (#10250, @rgrinberg)</p> </li> <li> <p>Support dialects in <code>dune describe pp</code> (#10283, @emillon)</p> </li> <li> <p>Allow defining executables or melange emit stanzas with the same name in the same folder under different contexts. (#10220, @rgrinberg, @jchavarri)</p> </li> </ul> <h3>Fixed</h3> <ul> <li> <p>coq: Delay Coq rule setup checks so OCaml-only packages can build in hybrid Coq/OCaml projects when <code>coqc</code> is not present. Thanks to @vzaliva for the test case and report (#9845, fixes #9818, @rgrinberg, @ejgallego)</p> </li> <li> <p>Fix conditional source selection with <code>select</code> on <code>bigarray</code> in OCaml 5 (#10011, @moyodiallo)</p> </li> <li> <p>melange: fix inconsistency in virtual library implementation. Concrete modules within a virtual library can now refer to its virtual modules too (#10051, fixes #7104, @anmonteiro)</p> </li> <li> <p>melange: fix a bug that would cause stale <code>import</code> paths to be emitted when moving source files within <code>(include_subdirs ..)</code> (#10286, fixes #9190, @anmonteiro)</p> </li> <li> <p>Dune file formatting: output utf8 if input is correctly encoded (#10113, fixes #9728, @moyodiallo)</p> </li> <li> <p>Fix expanding dependencies and locks specified in the cram stanza. Previously, they would be installed in the context of the cram test, rather than the cram stanza itself (#10165, @rgrinberg)</p> </li> <li> <p>Fix bug with <code>dune exec --watch</code> where the working directory would always be set to the project root rather than the directory where the command was run (#10262, @gridbugs)</p> </li> <li> <p>Regression fix: sign executables that are promoted into the source tree (#10263, fixes #9272, @emillon)</p> </li> <li> <p>Fix crash when decoding dune-package for libraries with <code>(include_subdirs qualified)</code> (#10269, fixes #10264, @emillon)</p> </li> </ul> <h3>Changed</h3> <ul> <li>Remove the <code>--react-to-insignificant-changes</code> option. (#10083, @rgrinberg)</li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-03-29-mdx-2.4.0">MDX 2.4.0</a> </h2> <time datetime="2024-03-29" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">29 Mar 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=mdx" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">mdx</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We are happy to announce the release of MDX 2.4.0! This is the first release of MDX to be compatible with OCaml 5.2.</p> <p>This release also comes with support for executing included OCaml code blocks.</p> <details> <summary>See full changelog</summary> <h4>Added</h4> <ul> <li>Handle the error-blocks syntax (#439, @jonludlam, @gpetiot)</li> <li>Allow execution of included OCaml code blocks. Add <code>skip</code> to <code>include</code> blocks to revert to the old behavior (#446, @panglesd, @gpetiot) <em>Warning: this is a breaking change that is reverted in the next release.</em></li> <li>Make MDX compatible with OCaml 5.2 (#448, @gpetiot)</li> </ul> <h4>Fixed</h4> <ul> <li>Reduce false-positives while detecting warnings (#440, @Julow)</li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-03-13-dune.3.14.2">Dune 3.14.2</a> </h2> <time datetime="2024-03-13" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">13 Mar 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=dune" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">dune</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We're happy to announce that Dune 3.14.2 is now available.</p> <p>Note that due to a regression that was detected before publishing to opam version <code>3.14.1</code> should not be used. The fix for the regression is part of this release.</p> <p>This feature brings some small bugfixes around the handling of Coq as well as solves an issue where Dune is running on Windows in a path that contains Unicode characters. This affected e.g. users with diacritics or non-latin script in their name when running Dune within their home directory.</p> <details> <summary>See full changelog</summary> <h3>Fixed</h3> <ul> <li> <p>When a directory is changed to a file, correctly remove it in subsequent <code>dune build</code> runs. (#9327, fix #6575, @emillon)</p> </li> <li> <p>Fix a problem with the doc-new target where transitive dependencies were missed during compile. This leads to missing expansions in the output docs. (#9955, @jonludlam)</p> </li> <li> <p>coq: fix performance regression in coqdep unescaping (#10115, fixes #10088, @ejgallego, thanks to Dan Christensen for the report)</p> </li> <li> <p>coq: memoize coqdep parsing, this will reduce build times for Coq users, in particular for those with many .v files (#10116, @ejgallego, see also #10088)</p> </li> <li> <p>on Windows, use an unicode-aware version of <code>CreateProcess</code> to avoid crashes when paths contains non-ascii characters. (#10212, fixes #10180, @emillon)</p> </li> <li> <p>fix compilation on non-glibc systems due to <code>signal.h</code> not being pulled in spawn stubs. (#10256, @emillon)</p> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-02-27-utop-2.14.0">Utop 2.14.0</a> </h2> <time datetime="2024-02-27" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">27 Feb 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=utop" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">utop</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>This release of UTop 2.14.0 brings support for the upcoming version of the compiler, OCaml 5.2.</p> <details> <summary>See full changelog</summary> <ul> <li>Add support for OCaml 5.2 (#470, fixes #466, @leostera, @ManasJayanth, @huwaireb)</li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-02-26-merlin-4.14">Merlin 4.14</a> </h2> <time datetime="2024-02-26" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">26 Feb 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=merlin" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">merlin</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>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.</p> <p>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.</p> <p>Some highlights in this release include:</p> <ul> <li><strong>Improved Telemetry and Heap Usage Reporting</strong>: With the addition of the &quot;heap_mbytes&quot; 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.</li> <li><strong>SyntaxDocument Command</strong>: 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.</li> </ul> <p>Happy coding!</p> <details> <summary>See full changelog</summary> <ul> <li>merlin binary <ul> <li>Add a &quot;heap_mbytes&quot; field to Merlin server responses to report heap usage (#1717)</li> <li>Add cache stats to telemetry (#1711)</li> <li>Add new SyntaxDocument command to find information about the node under the cursor (#1706)</li> <li>Fix <code>FLG -pp ppx.exe -as-pp/-dump-ast</code> use of invalid shell redirection when direct process launch on Windows. (#1723, fixes #1722)</li> <li>Add a query_num field to the <code>ocamlmerlin</code> responses to detect server crashes (#1716)</li> <li>Jump to cases within a match statement (#1726)</li> <li>Jump to <code>module-type</code> (#1728, partially fixes #1656)</li> <li>Exposes stable functions for configuration handling and pattern variable destruction. (#1730)</li> </ul> </li> <li>editor modes <ul> <li>vim: load merlin under the ocamlinterface and ocamllex filetypes (#1340)</li> <li>Fix merlinpp not using binary file open (#1725, fixes #1724)</li> </ul> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-02-12-dune.3.14.0">Dune 3.14.0</a> </h2> <time datetime="2024-02-12" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">12 Feb 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=dune" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">dune</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We're happy to announce that Dune 3.14.0 is now available. This feature has many fixes and new features that you can find in the changelog.</p> <p>There are a few new features that we would like to specially highlight.</p> <h3>Dynamic dune files with <code>(dynamic_include)</code></h3> <p>It is common for some parts of a build to be dynamic: for example a source file can be generated, or some parts of the configuration like C flags can be generated from a Dune rule. But until now it was not possible to generate rules dynamically.</p> <p>For example, one might want to do it is to set up one rule per input file. This is a common pattern in test suites and is easy to do with Make. But Dune does not have a concept of parameterized rules, so it is necessary to set up one rule per input file.</p> <p>The pattern to do this with Dune is to:</p> <ul> <li>Write a generator that lists the input files and emits Dune stanzas (as text);</li> <li>Add a rule that makes a <code>dune.inc</code> file using this generator;</li> <li>Add <code>(include dune.inc)</code> in the main <code>dune</code> file,</li> </ul> <p>However, this requires checking in the generated <code>dune.inc</code> file in the repository. Another drawback is that when modifying the list of input files, it is necessary to run tests twice: one to update <code>dune.inc</code>, one to run the new test.</p> <p>This release of Dune adds a new <code>(dynamic_include)</code> stanza that lifts these restrictions: <code>dune.inc</code> does not have to be part of the source tree, it can be generated transparently. This comes with some restrictions: some stanzas can not be generated, in particular the ones that define public libraries. And due to how rule loading works, the generated stanza needs to be defined in a different directory.</p> <p>Still, this should be useful for many users that rely on the generate-include-commit pattern described above.</p> <h3>Sherlodoc integration</h3> <p>Sherlodoc is a search engine for OCaml documentation, which supports search by name, documentation and fuzzy type search (similar to Hoogle in the Haskell world). It can be obtained from opam using <code>opam install sherlodoc</code>.</p> <p>When it is available, Dune commands that produce HTML documentation, such as <code>dune build @doc</code> and <code>dune build @doc-new</code>, will include a search bar in the generated output.</p> <details> <summary>See full changelog</summary> <h3>Added</h3> <ul> <li> <p>Introduce a <code>(dynamic_include ..)</code> stanza. This is like <code>(include foo)</code> but allows <code>foo</code> to be the target of a rule. Currently, there are some limitations on the stanzas that can be generated. For example, public executables, libraries are currently forbidden. (#9913, @rgrinberg)</p> </li> <li> <p>Introduce <code>$ dune promotion list</code> to print the list of available promotions. (#9705, @moyodiallo)</p> </li> <li> <p>If Sherlodoc is installed, add a search bar in generated HTML docs (#9772, @EmileTrotignon)</p> </li> <li> <p>Add <code>only_sources</code> field to <code>copy_files</code> stanza (#9827, fixes #9709, @jchavarri)</p> </li> <li> <p>The <code>(foreign_library)</code> stanza now supports the <code>(enabled_if)</code> field. (#9914, @nojb)</p> </li> </ul> <h3>Fixed</h3> <ul> <li> <p>Fix <code>$ dune install -p</code> incorrectly recognizing packages that are supposed to be filtered (#9879, fixes #4814, @rgrinberg)</p> </li> <li> <p>subst: correctly handle opam files in opam/ subdirectory (#9895, fixes #9862, @emillon)</p> </li> <li> <p>Odoc private rules are not set up if a library is not available due to <code>enabled_if</code> (#9897, @rgrinberg and @jchavarri)</p> </li> </ul> <h3>Changed</h3> <ul> <li> <p>When dune language 3.14 is enabled, resolve the binary in <code>(run %{bin:..} ..)</code> from where the binary is built. (#9708, @rgrinberg)</p> </li> <li> <p>boot: remove single-command bootstrap. This was an alternative bootstrap strategy that was used in certain conditions. Removal makes the bootstrap a bit slower on Linux when only a single core is available, but bootstrap is now reproducible in all cases. (#9735, fixes #9507, @emillon)</p> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-02-07-ppxlib-0.32.0">Ppxlib 0.32.0</a> </h2> <time datetime="2024-02-07" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">07 Feb 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=ppxlib" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">ppxlib</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>The ppxlib dev team is happy to announce the release of ppxlib.0.32.0.</p> <p>The main feature of this release, implemented by @burnleydev1 during their Outreachy internship, is a huge improvement of the handling of located exceptions raised by ppx-es. Whenever a rewrite of the AST throws such an exception, the ppxlib driver catches it and resumes the rewriting using the latest valid AST it knows of. All caught exceptions are appended to the final AST as <code>[%%ocaml.error ..]</code> nodes. This means the driver returns a valid AST instead of one composed of a single error node corresponding to the first raised exception. This leads to a much better experience for ppx users as merlin now has a valid AST to work with when this happens, allowing it to properly function, reporting all errors, from ppx-es or otherwise. Note that despite this change we still recommend ppx authors to embed errors in the rewritten AST rather than throw exceptions.</p> <p>The release also comes with a few bug fixes on longident parsing or windows compatibility and a new simplified API for ppx authors using attributes as flags (i.e. attributes without payloads such as <code>[@ignore]</code> for instance).</p> <p>We'd like to thank our external contributors for this release:</p> <ul> <li>@burnleydev1 for their improvement of the driver exception handling</li> <li>@dianaoigo for their addition of the new attribute flags API</li> <li>@jonahbeckford for their fix of the windows compatibility</li> </ul> <p>We'd also like to thank the OCaml Software Foundation who has been funding my work on this release.</p> <details> <summary>See full changelog</summary> <ul> <li> <p>Add an optional <code>embed_errors</code> argument to <code>Context_free.map_top_down</code> that controls how to deal with exceptions thrown by context-free rules. (#468, @NathanReb)</p> </li> <li> <p>Fix <code>Longident.parse</code> so it properly handles unparenthesized dotted operators such as <code>+.</code> or <code>*.</code>. (#111, @rgrinberg, @NathanReb)</p> </li> <li> <p>raising an exception does no longer cancel the whole context free phase(#453, @burnleydev1)</p> </li> <li> <p>Sort embedded errors that are appended to the AST by location so the compiler reports the one closer to the beginning of the file first. (#463, @NathanReb)</p> </li> <li> <p>Update <code>Attribute.get</code> to ignore <code>loc_ghost</code>. (#460, @ceastlund)</p> </li> <li> <p>Add API to manipulate attributes that are used as flags (#408, @dianaoigo)</p> </li> <li> <p>Update changelog to use ISO 8061 date format: YYYY-MM-DD. (#445, @ceastlund)</p> </li> <li> <p>Replace <code>Caml</code> with <code>Stdlib</code>. (#427, @ceastlund)</p> </li> <li> <p>When a transformation raises, the last valid AST is used as input to the upcoming transformations. All such errors are collected and appended as extension nodes to the final AST (#447, @burnleydev1)</p> </li> <li> <p>Fix a small mistake in the man pages: Embededding errors is done by default with <code>-as-pp</code>, not with <code>-dump-ast</code> (#464, @pitag-ha)</p> </li> <li> <p>Set appropriate binary mode when writing to <code>stdout</code> especially for Windows compatibility. (#466, @jonahbeckford)</p> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-02-05-dune-3.13.1">Dune 3.13.1</a> </h2> <time datetime="2024-02-05" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">05 Feb 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=dune" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">dune</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>We just released version 3.13.1 with some bugfixes.</p> <details> <summary>See full changelog</summary> <ul> <li> <p>Fix performance regression for incremental builds (#9769, fixes #9738, @rgrinberg)</p> </li> <li> <p>Fix <code>dune ocaml top-module</code> to correctly handle absolute paths. (#8249, fixes #7370, @Alizter)</p> </li> <li> <p>subst: ignore broken symlinks when looking at source files (#9810, fixes #9593, @emillon)</p> </li> <li> <p>subst: do not fail on 32-bit systems when large files are encountered. Just log a warning in this case. (#9811, fixes #9538, @emillon)</p> </li> <li> <p>boot: sort directory entries in readdir. This makes the dune binary reproducible in terms of filesystem order. (#9861, fixes #9794, @emillon)</p> </li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-01-24-odoc-2.4.1">Odoc 2.4.1</a> </h2> <time datetime="2024-01-24" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">24 Jan 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=odoc" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">odoc</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>The release of <code>odoc</code> 2.4.0 last month introduced a regression that caused Dune rules to fail in some cases. This release of <code>odoc</code> 2.4.1 fixes this issue.</p> <details> <summary>See full changelog</summary> <h3>Fixed</h3> <ul> <li>Revert to outputing a file (without content) when rendering a hidden compilation unit. This fixes cases where the dune rules would fail. (@panglesd, #1069)</li> </ul> </details> </div> </div> </article> <article class="flex flex-col lg:flex-row relative gap-6 lg:gap-10"> <div class="relative md:w-72 pb-6 lg:pb-8"> <div class="sticky" style="top: 128px; word-break: keep-all;"> <div class="hidden md:absolute md:block -left-11 bg-background dark:bg-dark-background w-6 h-6 mt-0.5 text-primary dark:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> </svg> </div> <h2 class="my-0 font-sans text-2xl tracking-normal font-extrabold leading-7 text-title dark:text-dark-title"> <a href="/changelog/2024-01-16-dune-3.13.0">Dune 3.13.0</a> </h2> <time datetime="2024-01-16" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">16 Jan 2024</time> <div class="mt-3 flex flex-row flex-wrap justify-start gap-4"> <a href="/changelog?t=dune" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">dune</a> <a href="/changelog?t=platform" class="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-semibold bg-white dark:bg-dark-card_hover text-title dark:text-dark-title hover:bg-tertiary_25 dark:hover:bg-dark-primary_nav_block_hover_10 border border-separator_20 dark:border-dark-separator_30">platform</a> </div> </div> </div> <div class="grow border-b border-separator_20 dark:border-dark-separator_30 border-solid pb-6 lg:pb-8"> <div class="prose dark:prose-invert prose-orange"> <p>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.</p> <p>There are a few new features that we would like to specially highlight.</p> <h3>Generate Conflicts File for Menhir Grammars (<a href="https://github.com/ocaml/dune/pull/9512">#9512</a>, <a href="https://github.com/nojb">@nojb</a>)</h3> <p>When <code>menhir</code> is used to generate code from <code>.mly</code> files, there are sometimes issues with the grammar itself, such as shift-reduce conflicts.</p> <p>Menhir has an option to generate a &quot;conflicts&quot; file using its <code>--explain</code> 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.</p> <h3>Cached Directory Targets (<a href="https://github.com/ocaml/dune/pull/9535">#9535</a>, <a href="https://github.com/rleshchinskiy">@rleshchinskiy</a>)</h3> <p>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.</p> <h3>Dynamic Module List (<a href="https://github.com/ocaml/dune/pull/9578">#9578</a>, <a href="https://github.com/nojb">@nojb</a>)</h3> <p>In several places in the Dune language, it is possible to pass a list of modules. For example in a <code>(library)</code> 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 <code>(module A B C)</code> to only attach these modules to the library.</p> <p>An important limitation has been that the list of modules needed to be static: written as is in the <code>dune</code> file. This limitation has now been lifted and it is possible to use <code>(:include)</code> or <code>%{read-lines:file}</code> in this field and similar ones.</p> <p>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.</p> <p>Previously, this required using OCaml syntax for the <code>dune</code> file, which has several issues, including incompatibility with features like <code>(include_subdirs)</code> and poor performance because Dune does not know the dependencies of the generator and needs to re-run the build more times than necessary.</p> <details> <summary>See full changelog</summary> <h3>Added</h3> <ul> <li> <p>Add command <code>dune cache clear</code> to completely delete all traces of the Dune cache. (#8975, @nojb)</p> </li> <li> <p>Allow to disable Coq 0.8 deprecation warning (#9439, @ejgallego)</p> </li> <li> <p>Allow <code>OCAMLFIND_TOOLCHAIN</code> to be set per context in the workspace file through the <code>env</code> stanza. (#9449, @rgrinberg)</p> </li> <li> <p>Menhir: generate <code>.conflicts</code> file by default. Add new field to the <code>(menhir)</code> stanza to control the generation of this file: <code>(explain &lt;blang expression&gt;)</code>. Introduce <code>(menhir (flags ...) (explain ...))</code> field in the <code>(env)</code> stanza, delete <code>(menhir_flags)</code> field. All changes are guarded under a new version of the Menhir extension, 3.0. (#9512, @nojb)</p> </li> <li> <p>Directory targets can now be cached. (#9535, @rleshchinskiy)</p> </li> <li> <p>It is now possible to use special forms such as <code>(:include)</code> and variables <code>%{read-lines:}</code> in <code>(modules)</code> and similar fields. Note that the dependencies introduced in this way (i.e., the files being read) must live in a different directory than the stanza making use of them. (#9578, @nojb)</p> </li> <li> <p>Remove warning 30 from default set for projects where <code>dune lang</code> is at least 3.13 (#9568, @gasche)</p> </li> <li> <p>Add <code>coqdoc_flags</code> field to <code>coq</code> field of <code>env</code> stanza, allowing the setting of workspace-wide defaults for <code>coqdoc_flags</code>. (#9280, fixes #9139, @Alizter)</p> </li> <li> <p>ctypes: fix an error where <code>(ctypes)</code> with no <code>(function_description)</code> would cause an error trying refer to a nonexistent <code>_stubs.a</code> dependency (#9302, fix #9300, @emillon)</p> </li> </ul> <h3>Changed</h3> <ul> <li>Check that package names in <code>(depends)</code> and related fields in <code>dune-project</code> are well-formed. (#9472, fixes #9270, @ElectreAAS)</li> </ul> <h3>Fixed</h3> <ul> <li> <p>Do not ignore <code>(formatting ..)</code> settings in context or workspace files (#8447, @rgrinberg)</p> </li> <li> <p>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)</p> </li> <li> <p>Copying mode for sandboxes will now follow symbolic links (#9282, @rgrinberg)</p> </li> <li> <p>Forbid the empty <code>(binaries ..)</code> field in the <code>env</code> stanza in the workspace file unless language version is at least 3.2. (#9309, @rgrinberg)</p> </li> <li> <p>[Coq] Fix bug in computation of flags when composed with boot theories. (#9347, fixes #7909, @ejgallego)</p> </li> <li> <p>Fixed a bug where the <code>(select)</code> field of the <code>(libraries)</code> field of the <code>(test)</code> stanza wasn't working properly. (#9387, fixes #9365, @Alizter)</p> </li> <li> <p>Fix handling of the <code>PATH</code> argument to <code>dune init proj NAME PATH</code>. An intermediate directory called <code>NAME</code> is no longer created if <code>PATH</code> is supplied, so <code>dune init proj my_project .</code> will now initialize a project in the current working directory. (#9447, fixes #9209, @shonfeder)</p> </li> <li> <p>Experimental doc rules: Correctly handle the case when a package depends upon its own sublibraries (#9461, fixes #9456, @jonludlam)</p> </li> <li> <p>Resolve various public binaries to their build location, rather than to where they're copied in the <code>_build/install</code> directory (#9496, fixes #7908, @rgrinberg).</p> </li> <li> <p>Correctly ignore warning flags in vendored projects (#9515, @rgrinberg)</p> </li> <li> <p>Use watch exclusions in watch mode on MacOS (#9643, fixes #9517, @PoorlyDefinedBehaviour)</p> </li> <li> <p>Fix Merlin configuration for <code>(include_subdirs qualified)</code> modules (#9659, fixes #8297, @rgrinberg)</p> </li> <li> <p>Fix handling of <code>enabled_if</code> in binary install stanzas. Previously, we'd ignore the result of <code>enabled_if</code> when evaluating <code>%{bin:..}</code> (#9707, @rgrinberg)</p> </li> </ul> </details> </div> </div> </article> <div class="pt-16 flex items-center justify-center space-x-2.5"> <a href="/changelog?p=1" class="w-10 h-10 lg:w-14 lg:h-14 rounded-lg flex items-center justify-center border-2 border-current text-primary dark:text-dark-primary"> 1 </a> <a href="/changelog?p=2" class="w-10 h-10 lg:w-14 lg:h-14 rounded-lg flex items-center justify-center border border-separator_20 dark:border-dark-separator_30 text-content dark:text-dark-content hover:opacity-60 hover:no-underline"> 2 </a> <a href="/changelog?p=3" class="w-10 h-10 lg:w-14 lg:h-14 rounded-lg flex items-center justify-center border border-separator_20 dark:border-dark-separator_30 text-content dark:text-dark-content hover:opacity-60 hover:no-underline"> 3 </a> <span class="w-10 h-10 lg:w-14 lg:h-14 border-body-100 rounded-lg flex items-center justify-center text-content hover:no-underline">...</span> <a href="/changelog?p=11" class="w-10 h-10 lg:w-14 lg:h-14 rounded-lg flex items-center justify-center border border-separator_20 dark:border-dark-separator_30 text-content dark:text-dark-content hover:opacity-60 hover:no-underline"> 11 </a> <a href="/changelog?p=2" class="w-10 h-10 lg:w-14 lg:h-14 border border-separator_20 dark:border-dark-separator_30 rounded-lg flex items-center justify-center text-content dark:text-dark-content hover:opacity-60 hover:no-underline"> <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" /> </svg> </a> </div> </div> </div> <div class="prose dark:prose-invert max-w-none mt-8"> If you want to contribute to a new release announcement, check out the <a href="https://github.com/ocaml/ocaml.org/blob/main/CONTRIBUTING.md#content-changelog" target="_blank">Contributing Guide</a> on GitHub. </div> </div> </div> </div> </div> </main> <button class="fixed bottom-8 right-10 md:bottom-[5rem] lg:bottom-[8.37rem] lg:right-[6.5rem] border-0 hidden focus:outline-none z-50 rounded-full shadow-custom p-4 bg-primary dark:bg-dark-primary" onclick="scrollToTop()" id="scrollToTop" title="Scroll to top"><svg class="h-6 w-6" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> <path d="M4.5 10.5L12 3M12 3L19.5 10.5M12 3V21" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg> </button> <footer x-data class="border-t border-separator_30 dark:border-dark-separator_30 bg-dark-sand dark:bg-dark-card" aria-labelledby="footer-heading"> <h2 id="footer-heading" class="sr-only">Footer</h2> <div class="mx-auto max-w-7xl px-6 py-16 lg:px-8"> <div class="flex w-full items-center justify-between mb-8"> <a href="/"><img class="h-8 dark:hidden" src="/_/MDBjN2M4YjIxY2Y1YWExZWE3Njk4M2FiZTg1NWZjNTM/logo-with-name.svg" alt="OCaml"> <img class="h-8 hidden dark:inline" src="/_/MTE3YWE5YzJlZmExNmYyMmI3ZmEwYjliMDEwNDBkMDY/logo-with-name-white.svg" alt="OCaml"> </a> <div class="hidden md:flex"> <button class="flex grow basis-0 justify-center items-center py-2 px-4 text-sm border rounded-l rounded-l-full border-r-0" :class='$store.themeSettings.preference === "light" ? "bg-gradient-to-r from-[#FFA932] to-[#C24F1E] text-white dark:text-dark-title outline-none" : "bg-white text-content outline-2 outline-card_border dark:outline-dark-separator_30"' @click='$store.themeSettings.setPreference("light")' > <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none" class="mr-2"> <path d="M7 0.5V2.125M11.5962 2.40378L10.4472 3.55283M13.5 7H11.875M11.5962 11.5962L10.4472 10.4472M7 11.875V13.5M3.55283 10.4472L2.40378 11.5962M2.125 7H0.5M3.55283 3.55283L2.40378 2.40378M9.70833 7C9.70833 7.71829 9.42299 8.40717 8.91508 8.91508C8.40717 9.42299 7.71829 9.70833 7 9.70833C6.28171 9.70833 5.59283 9.42299 5.08492 8.91508C4.57701 8.40717 4.29167 7.71829 4.29167 7C4.29167 6.28171 4.57701 5.59283 5.08492 5.08492C5.59283 4.57701 6.28171 4.29167 7 4.29167C7.71829 4.29167 8.40717 4.57701 8.91508 5.08492C9.42299 5.59283 9.70833 6.28171 9.70833 7Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </svg> Light </button> <button class="flex grow basis-0 justify-center items-center py-2 px-4 text-sm border border-r-0" :class='$store.themeSettings.preference === "dark" ? "bg-gradient-to-r from-[#0F254F] to-[#0B1228] text-white dark:text-dark-title outline-none" : "bg-white text-content outline-2 outline-card_border dark:outline-dark-separator_30"' @click='$store.themeSettings.setPreference("dark")' > <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" class="mr-2"> <path d="M11.1573 7.90842C10.5134 8.17678 9.8226 8.3145 9.125 8.31358C6.20812 8.31358 3.84375 5.94921 3.84375 3.03233C3.84375 2.31192 3.98783 1.62562 4.24892 1C3.28663 1.40144 2.46465 2.07865 1.88651 2.94635C1.30836 3.81404 0.999911 4.83342 1 5.87608C1 8.79296 3.36437 11.1573 6.28125 11.1573C7.32391 11.1574 8.34329 10.849 9.21099 10.2708C10.0787 9.69268 10.7559 8.8707 11.1573 7.90842Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </svg> Dark </button> <button class="flex grow basis-0 justify-center items-center py-2 px-4 text-sm border rounded-r rounded-r-full" :class='$store.themeSettings.preference === "system" ? "bg-gradient-to-r from-[#2B7866] to-[#004039] text-white dark:text-dark-title outline-none" : "bg-white text-content outline-2 outline-card_border dark:outline-dark-separator_30"' @click='$store.themeSettings.setPreference("system")' > <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" class="mr-2"> <path d="M7.19553 2.955C7.26303 2.5485 7.61553 2.25 8.02803 2.25H9.97278C10.3853 2.25 10.7378 2.5485 10.8053 2.955L10.965 3.91575C11.0123 4.19625 11.1998 4.43025 11.4488 4.56825C11.5043 4.59825 11.559 4.6305 11.6138 4.6635C11.8575 4.8105 12.1538 4.85625 12.42 4.7565L13.3328 4.4145C13.5198 4.34416 13.7258 4.34248 13.9139 4.40978C14.1021 4.47708 14.2603 4.60899 14.3603 4.782L15.3323 6.46725C15.4321 6.64028 15.4672 6.8431 15.4315 7.03962C15.3958 7.23615 15.2916 7.41363 15.1373 7.5405L14.385 8.16075C14.1653 8.3415 14.0565 8.6205 14.0625 8.90475C14.0636 8.9685 14.0636 9.03225 14.0625 9.096C14.0565 9.3795 14.1653 9.6585 14.385 9.83925L15.138 10.4595C15.456 10.722 15.5385 11.1758 15.333 11.532L14.3595 13.2172C14.2597 13.3902 14.1017 13.5222 13.9137 13.5896C13.7257 13.657 13.5198 13.6556 13.3328 13.5855L12.42 13.2435C12.1538 13.1438 11.8575 13.1895 11.613 13.3365C11.5587 13.3696 11.5037 13.4016 11.448 13.4325C11.1998 13.5697 11.0123 13.8037 10.965 14.0842L10.8053 15.045C10.7378 15.4523 10.3853 15.75 9.97278 15.75H8.02728C7.61478 15.75 7.26303 15.4515 7.19478 15.045L7.03503 14.0842C6.98853 13.8037 6.80103 13.5698 6.55203 13.4318C6.49642 13.4011 6.44141 13.3693 6.38703 13.3365C6.14328 13.1895 5.84703 13.1438 5.58003 13.2435L4.66728 13.5855C4.48033 13.6556 4.27456 13.6572 4.08656 13.5899C3.89856 13.5226 3.74051 13.3908 3.64053 13.218L2.66778 11.5328C2.56799 11.3597 2.53282 11.1569 2.56852 10.9604C2.60423 10.7639 2.7085 10.5864 2.86278 10.4595L3.61578 9.83925C3.83478 9.65925 3.94353 9.3795 3.93828 9.096C3.93711 9.03226 3.93711 8.96849 3.93828 8.90475C3.94353 8.61975 3.83478 8.3415 3.61578 8.16075L2.86278 7.5405C2.70869 7.41367 2.60454 7.23633 2.56884 7.03997C2.53314 6.84361 2.56819 6.64095 2.66778 6.468L3.64053 4.78275C3.74042 4.6096 3.89854 4.47754 4.08672 4.4101C4.27489 4.34266 4.4809 4.34422 4.66803 4.4145L5.58003 4.7565C5.84703 4.85625 6.14328 4.8105 6.38703 4.6635C6.44103 4.6305 6.49653 4.599 6.55203 4.5675C6.80103 4.43025 6.98853 4.19625 7.03503 3.91575L7.19553 2.955Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> <path d="M11.25 9C11.25 9.59674 11.0129 10.169 10.591 10.591C10.169 11.0129 9.59674 11.25 9 11.25C8.40326 11.25 7.83097 11.0129 7.40901 10.591C6.98705 10.169 6.75 9.59674 6.75 9C6.75 8.40326 6.98705 7.83097 7.40901 7.40901C7.83097 6.98705 8.40326 6.75 9 6.75C9.59674 6.75 10.169 6.98705 10.591 7.40901C11.0129 7.83097 11.25 8.40326 11.25 9Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </svg> System </button> </div> </div> <div class="xl:grid xl:grid-cols-3 xl:gap-8"> <div class="space-y-8"> <p class="text-base leading-6 text-title dark:text-dark-content">Innovation. Community. Security.</p> <div class="flex space-x-6"> <a href="https://github.com/ocaml" class="text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <span class="sr-only">GitHub</span> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path fill-rule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" clip-rule="evenodd" /> </svg> </a> <a href="https://discord.gg/cCYQbqN" class="text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <span class="sr-only">Discord</span> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path fill-rule="evenodd" d="M18.9419 5.29661C17.6473 4.69088 16.263 4.25066 14.8157 4C14.638 4.32134 14.4304 4.75355 14.2872 5.09738C12.7487 4.86601 11.2245 4.86601 9.7143 5.09738C9.57116 4.75355 9.3588 4.32134 9.17947 4C7.73067 4.25066 6.3448 4.6925 5.05016 5.29982C2.43887 9.24582 1.73099 13.0938 2.08493 16.8872C3.81688 18.1805 5.49534 18.9662 7.14548 19.4804C7.55291 18.9196 7.91628 18.3235 8.22931 17.6953C7.63313 17.4688 7.06211 17.1892 6.52256 16.8647C6.6657 16.7586 6.80571 16.6478 6.94098 16.5337C10.2318 18.0729 13.8074 18.0729 17.0589 16.5337C17.1958 16.6478 17.3358 16.7586 17.4774 16.8647C16.9362 17.1908 16.3637 17.4704 15.7675 17.697C16.0805 18.3235 16.4423 18.9212 16.8513 19.4819C18.503 18.9678 20.183 18.1822 21.915 16.8872C22.3303 12.4897 21.2056 8.67705 18.9419 5.29661ZM8.67765 14.5543C7.68977 14.5543 6.87963 13.632 6.87963 12.509C6.87963 11.3859 7.67247 10.4621 8.67765 10.4621C9.68285 10.4621 10.493 11.3843 10.4757 12.509C10.4772 13.632 9.68285 14.5543 8.67765 14.5543ZM15.3223 14.5543C14.3344 14.5543 13.5243 13.632 13.5243 12.509C13.5243 11.3859 14.3171 10.4621 15.3223 10.4621C16.3275 10.4621 17.1376 11.3843 17.1203 12.509C17.1203 13.632 16.3275 14.5543 15.3223 14.5543Z" clip-rule="evenodd" /> </svg> </a> <a href="https://twitter.com/ocaml_org" class="text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <span class="sr-only">Twitter</span> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84" /> </svg> </a> <a href="https://watch.ocaml.org/" class="text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <span class="sr-only">Peertube</span> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path fill-rule="evenodd" d="M5 2V12L12.4998 7.00047" clip-rule="evenodd" /> <path fill-rule="evenodd" d="M5 12V22L12.4998 17.0005" clip-rule="evenodd" /> <path fill-rule="evenodd" d="M12.4998 6.99951V16.9995L19.9995 12" clip-rule="evenodd" /> </svg> </a> <a href="/planet.xml" class="text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <span class="sr-only">RSS</span> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path fill-rule="evenodd" d="M15.2692 22H11.3846C11.3846 16.8462 7.11538 12.6154 2 12.6154V8.73077C9.26923 8.73077 15.2692 14.7308 15.2692 22ZM18 22C18 13.2308 10.7692 6 2 6V2C12.9615 2 22 11.0385 22 22H18Z" clip-rule="evenodd" /> <path fill-rule="evenodd" d="M4.73077 22C6.23893 22 7.46154 20.7774 7.46154 19.2692C7.46154 17.7611 6.23893 16.5385 4.73077 16.5385C3.22261 16.5385 2 17.7611 2 19.2692C2 20.7774 3.22261 22 4.73077 22Z" clip-rule="evenodd" /> </svg> </a> </div> <div class="flex w-full md:hidden"> <button class="flex grow basis-0 justify-center items-center py-2 px-4 text-sm border rounded-l rounded-l-full border-r-0" :class='$store.themeSettings.preference === "light" ? "bg-gradient-to-r from-[#FFA932] to-[#C24F1E] text-white dark:text-dark-title outline-none" : "bg-white text-content outline-2 outline-card_border dark:outline-dark-separator_30"' @click='$store.themeSettings.setPreference("light")' > <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none" class="mr-2"> <path d="M7 0.5V2.125M11.5962 2.40378L10.4472 3.55283M13.5 7H11.875M11.5962 11.5962L10.4472 10.4472M7 11.875V13.5M3.55283 10.4472L2.40378 11.5962M2.125 7H0.5M3.55283 3.55283L2.40378 2.40378M9.70833 7C9.70833 7.71829 9.42299 8.40717 8.91508 8.91508C8.40717 9.42299 7.71829 9.70833 7 9.70833C6.28171 9.70833 5.59283 9.42299 5.08492 8.91508C4.57701 8.40717 4.29167 7.71829 4.29167 7C4.29167 6.28171 4.57701 5.59283 5.08492 5.08492C5.59283 4.57701 6.28171 4.29167 7 4.29167C7.71829 4.29167 8.40717 4.57701 8.91508 5.08492C9.42299 5.59283 9.70833 6.28171 9.70833 7Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </svg> Light </button> <button class="flex grow basis-0 justify-center items-center py-2 px-4 text-sm border border-r-0" :class='$store.themeSettings.preference === "dark" ? "bg-gradient-to-r from-[#0F254F] to-[#0B1228] text-white dark:text-dark-title outline-none" : "bg-white text-content outline-2 outline-card_border dark:outline-dark-separator_30"' @click='$store.themeSettings.setPreference("dark")' > <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" class="mr-2"> <path d="M11.1573 7.90842C10.5134 8.17678 9.8226 8.3145 9.125 8.31358C6.20812 8.31358 3.84375 5.94921 3.84375 3.03233C3.84375 2.31192 3.98783 1.62562 4.24892 1C3.28663 1.40144 2.46465 2.07865 1.88651 2.94635C1.30836 3.81404 0.999911 4.83342 1 5.87608C1 8.79296 3.36437 11.1573 6.28125 11.1573C7.32391 11.1574 8.34329 10.849 9.21099 10.2708C10.0787 9.69268 10.7559 8.8707 11.1573 7.90842Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </svg> Dark </button> <button class="flex grow basis-0 justify-center items-center py-2 px-4 text-sm border rounded-r rounded-r-full" :class='$store.themeSettings.preference === "system" ? "bg-gradient-to-r from-[#2B7866] to-[#004039] text-white dark:text-dark-title outline-none" : "bg-white text-content outline-2 outline-card_border dark:outline-dark-separator_30"' @click='$store.themeSettings.setPreference("system")' > <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" class="mr-2"> <path d="M7.19553 2.955C7.26303 2.5485 7.61553 2.25 8.02803 2.25H9.97278C10.3853 2.25 10.7378 2.5485 10.8053 2.955L10.965 3.91575C11.0123 4.19625 11.1998 4.43025 11.4488 4.56825C11.5043 4.59825 11.559 4.6305 11.6138 4.6635C11.8575 4.8105 12.1538 4.85625 12.42 4.7565L13.3328 4.4145C13.5198 4.34416 13.7258 4.34248 13.9139 4.40978C14.1021 4.47708 14.2603 4.60899 14.3603 4.782L15.3323 6.46725C15.4321 6.64028 15.4672 6.8431 15.4315 7.03962C15.3958 7.23615 15.2916 7.41363 15.1373 7.5405L14.385 8.16075C14.1653 8.3415 14.0565 8.6205 14.0625 8.90475C14.0636 8.9685 14.0636 9.03225 14.0625 9.096C14.0565 9.3795 14.1653 9.6585 14.385 9.83925L15.138 10.4595C15.456 10.722 15.5385 11.1758 15.333 11.532L14.3595 13.2172C14.2597 13.3902 14.1017 13.5222 13.9137 13.5896C13.7257 13.657 13.5198 13.6556 13.3328 13.5855L12.42 13.2435C12.1538 13.1438 11.8575 13.1895 11.613 13.3365C11.5587 13.3696 11.5037 13.4016 11.448 13.4325C11.1998 13.5697 11.0123 13.8037 10.965 14.0842L10.8053 15.045C10.7378 15.4523 10.3853 15.75 9.97278 15.75H8.02728C7.61478 15.75 7.26303 15.4515 7.19478 15.045L7.03503 14.0842C6.98853 13.8037 6.80103 13.5698 6.55203 13.4318C6.49642 13.4011 6.44141 13.3693 6.38703 13.3365C6.14328 13.1895 5.84703 13.1438 5.58003 13.2435L4.66728 13.5855C4.48033 13.6556 4.27456 13.6572 4.08656 13.5899C3.89856 13.5226 3.74051 13.3908 3.64053 13.218L2.66778 11.5328C2.56799 11.3597 2.53282 11.1569 2.56852 10.9604C2.60423 10.7639 2.7085 10.5864 2.86278 10.4595L3.61578 9.83925C3.83478 9.65925 3.94353 9.3795 3.93828 9.096C3.93711 9.03226 3.93711 8.96849 3.93828 8.90475C3.94353 8.61975 3.83478 8.3415 3.61578 8.16075L2.86278 7.5405C2.70869 7.41367 2.60454 7.23633 2.56884 7.03997C2.53314 6.84361 2.56819 6.64095 2.66778 6.468L3.64053 4.78275C3.74042 4.6096 3.89854 4.47754 4.08672 4.4101C4.27489 4.34266 4.4809 4.34422 4.66803 4.4145L5.58003 4.7565C5.84703 4.85625 6.14328 4.8105 6.38703 4.6635C6.44103 4.6305 6.49653 4.599 6.55203 4.5675C6.80103 4.43025 6.98853 4.19625 7.03503 3.91575L7.19553 2.955Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> <path d="M11.25 9C11.25 9.59674 11.0129 10.169 10.591 10.591C10.169 11.0129 9.59674 11.25 9 11.25C8.40326 11.25 7.83097 11.0129 7.40901 10.591C6.98705 10.169 6.75 9.59674 6.75 9C6.75 8.40326 6.98705 7.83097 7.40901 7.40901C7.83097 6.98705 8.40326 6.75 9 6.75C9.59674 6.75 10.169 6.98705 10.591 7.40901C11.0129 7.83097 11.25 8.40326 11.25 9Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </svg> System </button> </div> </div> <div class="mt-8 grid grid-cols-2 gap-8 xl:col-span-2 xl:mt-0"> <div class="md:grid md:grid-cols-2 md:gap-8"> <div> <h3 class="text-base font-semibold leading-6 text-title dark:text-dark-content">About OCaml</h3> <ul class="mt-6 space-y-4"> <li> <a href="/changelog" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Changelog</a> </li> <li> <a href="/releases" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Releases</a> </li> <li> <a href="/industrial-users" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Industrial Users</a> </li> <li> <a href="/academic-users" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Academic Users</a> </li> <li> <a href="/about" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Why OCaml</a> </li> </ul> </div> <div class="mt-10 md:mt-0"> <h3 class="text-base font-semibold leading-6 text-title dark:text-dark-content">Resources</h3> <ul class="mt-6 space-y-4"> <li> <a href="/install" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Install OCaml</a> </li> <li> <a href="/docs/get-started" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Get Started</a> </li> <li> <a href="/docs/tools" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Platform Tools</a> </li> <li> <a href="/manual" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Language Manual</a> </li> <li> <a href="/api" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Standard Library API</a> </li> <li> <a href="/books" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Books</a> </li> <li> <a href="/exercises" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Exercises</a> </li> <li> <a href="/papers" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Papers</a> </li> <li> <a href="/play" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">OCaml Playground</a> </li> <li> <a href="/logo" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Logo</a> </li> </ul> </div> </div> <div class="md:grid md:grid-cols-2 md:gap-8"> <div> <h3 class="text-base font-semibold leading-6 text-title dark:text-dark-content">Ecosystem</h3> <ul class="mt-6 space-y-4"> <li> <a href="/packages" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Packages</a> </li> <li> <a href="/community" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Community</a> </li> <li> <a href="/events" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Events</a> </li> <li> <a href="/ocaml-planet" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">OCaml Planet</a> </li> <li> <a href="/jobs" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Jobs</a> </li> </ul> </div> <div class="mt-20 md:mt-0"> <h3 class="text-base font-semibold leading-6 text-title dark:text-dark-content">Policies</h3> <ul class="mt-6 space-y-4"> <li> <a href="/policies/carbon-footprint" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Carbon Footprint</a> </li> <li> <a href="/governance" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Governance</a> </li> <li> <a href="/policies/privacy-policy" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Privacy</a> </li> <li> <a href="/policies/code-of-conduct" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Code of Conduct</a> </li> </ul> </div> </div> </div> </div> </div> <script> document.addEventListener('alpine:init', () => { Alpine.store('themeSettings', { init() { this.storageAccess = localStorage.getItem('storageAccess') this.preference = localStorage.getItem('theme') || "system" this.isSystemDefaultDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches }, selected: '', alertOpen: false, storageAccess: false, preference: undefined, isSystemDefaultDark: false, setPreference(preference) { if (!this.storageAccess) { if (!window.confirm("We will remember your choice in your browser's LocalStorage. Allow this?")) { return; } localStorage.setItem('storageAccess', true) storageAccess = true; } this.selected = preference; this.preference = preference localStorage.setItem('theme', preference) if (preference === 'dark') { document.body.classList.add("dark"); } if (preference === 'light') { document.body.classList.remove("dark"); } if (preference === 'system') { if (this.isSystemDefaultDark) { document.body.classList.add("dark"); } else { document.body.classList.remove("dark"); } localStorage.removeItem('theme') return } }, }) }) </script> </footer> <script> function scrollToTop() { window.scrollTo(0, 0); } window.onscroll = function() { showScrollButton(); }; function showScrollButton() { if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { document.getElementById("scrollToTop").style.display = "block"; } else { document.getElementById("scrollToTop").style.display = "none"; } } </script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10