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">▾</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="" >All Tags</option> <option value="developer-preview" >developer-preview</option> <option value="dune" selected>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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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 <src> <dst>)</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-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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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/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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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-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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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 >= 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 "hidden" 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-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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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 <TOOL> -- [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: "ocaml" {!= "5.2.0"} </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 > 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 <TOOL></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'>"</span><span class='bash-string-quoted-double'>_build/_private/default/.dev-tool/ocamlformat/ocamlformat/target</span><span class='bash-punctuation-definition-string-end'>"</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 > /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="$PWD/$OCAMLFORMAT_TARGET/bin:$PATH" </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 -- "$@" </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 "Editor Configuration" 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-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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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 >= 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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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<TAB> cache clean coq </code></pre> <p>...or:</p> <pre><code>$ dune build -<TAB> --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 <TAB></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 <TAB> 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-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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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 <repo></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 <name></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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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-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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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-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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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-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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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-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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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-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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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-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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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-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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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-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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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 "conflicts" 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 <blang expression>)</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> <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-05-dune-3.12.2">Dune 3.12.2</a> </h2> <time datetime="2024-01-05" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">05 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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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.12.2 with 2 bugfixes.</p> <details> <summary>See full changelog</summary> <h2>Fixed</h2> <ul> <li> <p>Fix version check in <code>runtest_alias</code> for <code>cram</code> stanza (#9454, @emillon)</p> </li> <li> <p>Fix stack overflow when a <code>(run)</code> action can not be parsed. (#9530, fixes #9529, @gridbugs)</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/2023-11-29-dune-3.12.1">Dune 3.12.1</a> </h2> <time datetime="2023-11-29" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">29 Nov 2023</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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 pleased to announce the release of Dune 3.12!</p> <p>Note that due to a mistake during the release process, version <code>3.12.0</code> was not published to opam and should not be used.</p> <p>This version contains many fixes but we would like to highlight the following features:</p> <ul> <li><code>dune ocaml doc</code> is a new command that will build the docs of your package, and open them in a web browser directly.</li> <li>a new set of odoc rules will build documentation for the whole switch. It can be invoked by <code>dune build @doc-new</code>. Note that this is still experimental.</li> <li>Dune can now be built and installed on Haiku.</li> </ul> <details> <summary>See full changelog</summary> <h2>Added</h2> <ul> <li> <p>Introduce <code>$ dune ocaml doc</code> to open and browse documentation. (#7262, fixes #6831, @EmileTrotignon)</p> </li> <li> <p><code>dune cache trim</code> now accepts binary byte units: <code>KiB</code>, <code>MiB</code>, etc. (#8618, @Alizter)</p> </li> <li> <p>Introduce the <code>runtest_alias</code> field to the <code>cram</code> stanza. This allows removing default <code>runtest</code> alias from tests. (@rgrinberg, #8887)</p> </li> <li> <p>Display cache location in Dune log (#8974, @nojb)</p> </li> <li> <p>Dune can now be built and installed on Haiku (#8795, fix #8551, @Alizter)</p> </li> <li> <p>Mark installed directories in <code>dune-package</code> files. This fixes <code>(package)</code> dependencies against packages that contain such directories. (#8953, fixes #8915, @emillon)</p> </li> <li> <p>Introduce new experimental odoc rules (#8803, @jonjudlam)</p> </li> </ul> <h2>Changed</h2> <ul> <li> <p>dune-build-info: when <code>version=""</code> is found in a <code>META</code> file, we now return <code>None</code> as a version string (#9177, @emillon)</p> </li> <li> <p>No longer force colors for OCaml 4.03 and 4.04 (#8778, @rgrinberg)</p> </li> <li> <p>Dependencies in the copying sandbox are now writeable (#8920, @rgrinberg)</p> </li> <li> <p>Rules that only use internal dune actions (<code>write-file</code>, <code>echo</code>, etc.) can now be sandboxed. (#9041, fixes #8854, @rgrinberg)</p> </li> <li> <p>Add <code>test_</code> prefix to default test name in <code>dune init project</code> (#9257, fixes #9131, @9sako6)</p> </li> </ul> <h2>Fixed</h2> <ul> <li> <p>Do not ignore libraries named <code>bigarray</code> when they are defined in conjunction with OCaml 5.0 (#8902, fixes #8901, @rgrinberg)</p> </li> <li> <p>Correctly ignore <code>bigarray</code> on recent versions of OCaml (#9076, @rgrinberg)</p> </li> <li> <p>Absent packages shouldn't prevent all rules from being loaded (#8948, fixes #8630, @rgrinberg)</p> </li> <li> <p>Correctly determine the stanza of menhir modules when <code>(include_subdirs qualified)</code> is enabled (@rgrinberg, #8949, fixes #7610)</p> </li> <li> <p>Re-run actions whenever <code>(expand_aliases_in_sandbox)</code> changes (#8990, @rgrinberg)</p> </li> <li> <p>Do not re-run rules when their location changes (#9052, @rgrinberg)</p> </li> <li> <p>[coq rules] Be more tolerant when coqc --print-version / --config don't work properly, and fallback to a reasonable default. This fixes problems when building Coq projects with <code>(stdlib no)</code> and likely other cases. (#8966, fix #8958, @Alizter, reported by Lasse Blaauwbroek)</p> </li> <li> <p>Dune will now run at a lower framerate of 15 fps rather than 60 when <code>INSIDE_EMACS</code>. (#8812, @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/2023-10-12-dune-3.11.1">Dune 3.11.1</a> </h2> <time datetime="2023-10-12" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">12 Oct 2023</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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>Following the release of Dune 3.11.0 a few days ago, we've just released version 3.11.1 with a couple of bug fixes:</p> <ul> <li>Fix the <code>dune rpc status</code> command that was incorrectly showing that there were no RPC servers running on Windows.</li> <li>Fix a bogus error when no inline test was declared in a library using <code>(inline_tests)</code>.</li> </ul> <details> <summary>See full changelog</summary> <h2>Fixed</h2> <ul> <li> <p>Fix <code>dune rpc</code> commands on Windows (#8806, fixes #8799, @nojb)</p> </li> <li> <p>Fix <code>inline_tests</code> when the partition list is empty (#8849, fixes #8848, @hhugo)</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/2023-10-04-dune-3.11.0">Dune 3.11.0</a> </h2> <time datetime="2023-10-04" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">04 Oct 2023</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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 pleased to announce the release of Dune 3.11!</p> <p>Here are some highlights from this release.</p> <h3>Dune Terminal User Interface (TUI)</h3> <p>The biggest highlight in this release is the introduction of the new Terminal User Interface (TUI) display mode.</p> <p>You can now run <code>dune build --display tui</code> to open a TUI. We recommend using it in conjunction with Dune watch mode (<code>dune build -w --display tui</code>).</p> <p>From the TUI, you will be able to navigate messages from Dune build, scroll through them, or click to minimize them. Press <code>?</code> to show the help screen.</p> <h3>Installing Source Directories</h3> <p>Another exciting feature in this release is the <a href="https://dune.readthedocs.io/en/stable/dune-files.html#installing-source-directories">new <code>(source_trees ..)</code> field</a> added to the <code>(install ..)</code> stanzas to add every files in a directory to the installation. For instance, to add your manual to the installation, you can use:</p> <pre><code>(install (section doc) (source_trees manual)) </code></pre> <hr> <p>Let us know what you think about these features, and don't hesistate to open issues on Dune's bug tracker if you encounter any issue.</p> <details> <summary>See full changelog</summary> <h2>Added</h2> <ul> <li> <p><code>enabled_if</code> now supports <code>arch_sixtyfour</code> variable (#8023, fixes #7997, @Alizter)</p> </li> <li> <p>Experimental: Added a <code>$ dune monitor</code> command that can connect to a running <code>dune build</code> in watch mode and display the errors and progress. (#8152, @Alizter)</p> </li> <li> <p>The <code>progress</code> RPC procedure now has an extra field for the <code>In_progress</code> constructor for the number of failed jobs. (#8212, @Alizter)</p> </li> <li> <p>Add a <code>--preview</code> flag to <code>dune fmt</code> which causes it to print out the changes it would make without applying them (#8289, @gridbugs)</p> </li> <li> <p>Introduce <code>(source_trees ..)</code> to the install stanza to allow installing entire source trees. (#8349, @rgrinberg)</p> </li> <li> <p>Add <code>--stop-on-first-error</code> option to <code>dune build</code> which will terminate the build when the first error is encountered. (#8400, @pmwhite and @Alizter)</p> </li> <li> <p>Dune now displays the number of errors when waiting for changes in watch mode. (#8408, fixes #6889, @Alizter)</p> </li> <li> <p>Add <code>with_prefix</code> keyword for changing the prefix of the destination of installed files matched by globs. (#8416, @gridbugs)</p> </li> <li> <p>Added experimental <code>--display tui</code> option for Dune that opens an interactive Terminal User Interface (TUI) when Dune is running. Press '?' to open up a help screen when running for more information. (#8429, @Alizter and @rgrinberg)</p> </li> <li> <p>Add a <code>warnings</code> field to <code>dune-project</code> files as a unified mechanism to enable or disable dune warnings (@rgrinberg, 8448)</p> </li> <li> <p><code>dune exec</code>: support syntax like <code>%{bin:program}</code>. This can appear anywhere in the command line, so things like <code>dune exec time %{bin:program}</code> now work. (#6035, #8474, fixes #2691, @emillon, @Leonidas-from-XIV)</p> </li> <li> <p>Add a new alias <code>@doc-json</code> to build odoc documentation in JSON format. This output can be consumed by external tools. (#8178, @emillon)</p> </li> </ul> <h2>Changed and Fixed</h2> <ul> <li> <p>Use <code>posix_spawn</code> instead of <code>fork</code> on MacOS. This gives us a performance boost and allows us to re-enable thread. (#8090, @rgrinberg)</p> </li> <li> <p>Modules that were declared in <code>(modules_without_implementation)</code>, <code>(private_modules)</code> or <code>(virtual_modules)</code> but not declared in <code>(modules)</code> will raise an error. (#7674, @Alizter)</p> </li> <li> <p>No longer emit linkopts(javascript) in META files (#8168, @hhugo)</p> </li> <li> <p>RPC message styles are now serialised meaning that RPC diagnostics keep their ANSI styling. (#8516, fixes #6921, @Alizter)</p> </li> <li> <p>Truncate output from actions that produce too much output (@tov, #8351)</p> </li> <li> <p>Allow libraries to shadow OCaml built-in libraries. Previously, built-in libraries would always take precedence. (@rgrinberg, #8558)</p> </li> <li> <p><code>dune utop</code> no longer links <code>utop</code> in "custom" mode, which should make this command considerably faster. (#8631, fixes #6894, @nojb)</p> </li> <li> <p>Ensure that package names in <code>dune-project</code> are valid opam package names. (#8331, @emillon)</p> </li> <li> <p>init: check that module names are valid (#8644, fixes #8252, @emillon)</p> </li> <li> <p>dune init: parse <code>--public</code> as a public name (#8603, fixes #7108, @emillon)</p> </li> <li> <p>Stop signing source files with substitutions. Sign only binaries instead (#8361, fixes #8360, @anmonteiro)</p> </li> <li> <p>Make copy sandbox support directory targets. (#8705, fixes #7724, @emillon)</p> </li> </ul> <h2>Deprecated and Removed</h2> <ul> <li> <p>Deprecate install destination paths beginning with ".." to prevent packages escaping their designated installation directories. (#8350, @gridbugs)</p> </li> <li> <p>Remove warning against <code>.dune</code> files generated by pre Dune 2.0 (#8611, @rgrinberg)</p> </li> <li> <p>Remove versions 0.1 and 0.2 of the experimental ctypes extension. (#8293, @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/2023-07-31-dune-3.9.3">Dune 3.9.3</a> </h2> <time datetime="2023-07-31" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">31 Jul 2023</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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 fix to <code>sendfile</code> in 3.9.2 was not quite enough so here is the last part of the fix. It brings compatibility with filesystems where <code>sendfile</code> is not available, in particular when <code>ecryptfs</code> is used.</p> <details> <summary>See full changelog</summary> <h2>Fixes</h2> <ul> <li>Fix flushing when using <code>sendfile</code> fallback (#8288, fixes #8284, @alan-j-hu)</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/2023-07-31-dune-3.10.0">Dune 3.10.0</a> </h2> <time datetime="2023-07-31" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">31 Jul 2023</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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.10.0. It comes with some internal fixes as well as some interesting features:</p> <ul> <li>some changes in <code>dune describe</code> that will allow a better implementation of <a href="https://github.com/ocurrent/opam-dune-lint">opam-dune-lint</a> to check the consistency between library and package dependencies</li> <li>more commands made available under <code>dune show</code> for a more consistent command line interface</li> </ul> <details> <summary>See full changelog</summary> <h2>Added</h2> <ul> <li> <p>Add <code>dune show rules</code> as alias of the <code>dune rules</code> command. (#8000, @Alizter)</p> </li> <li> <p>Add <code>dune show installed-libraries</code> as an alias of the <code>dune installed-libraries</code> command. (#8135, @Alizter)</p> </li> <li> <p>Add <code>dune build --dump-gc-stats FILE</code> argument to dump garbage collection stats to a named file. (#8072, @Alizter)</p> </li> <li> <p>Add <code>dune describe package-entries</code> to print all package entries (#7480, @moyodiallo)</p> </li> </ul> <h2>Fixed</h2> <ul> <li> <p>Fix <code>%{deps}</code> to expand properly in <code>(cat ...)</code> when containing 2 or more items. (#8196, @Alizter)</p> </li> <li> <p>Fix the <code>severity</code> of error messages sent over RPC which was missing. (#8193, @Alizter)</p> </li> <li> <p>Fix bug with ppx and Reason syntax due to missing dependency in sandboxed action (#7932, fixes #7930, @Alizter)</p> </li> </ul> <h2>Changed</h2> <ul> <li> <p>Improve <code>dune describe external-lib-deps</code> by adding the internal dependencies for more information. (#7478, @moyodiallo)</p> </li> <li> <p>Re-enable background file digests on Windows. The files are now open in a way that prevents race condition around deletion. (#8262, fixes #8268, @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/2023-07-25-dune-3.9.2">Dune 3.9.2</a> </h2> <time datetime="2023-07-25" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">25 Jul 2023</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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>This bugfix-only release contains two platform-specific changes: one fixes the Dune cache on Windows, and the other one completes the fix on Linux when <code>sendfile</code> is not available. This makes Dune available where user directories are encrypted using <code>ecryptfs</code> for example.</p> <details> <summary>See full changelog</summary> <h2>Fixes</h2> <ul> <li> <p>Disable background digests on Windows. This prevents an issue where unremovable files would make Dune crash when the shared cache is enabled. (#8243, fixes #8228, @emillon)</p> </li> <li> <p>Fix permission errors when <code>sendfile</code> is not available (#8234, fixes #8210, @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/2023-07-06-dune-3.9.1">Dune 3.9.1</a> </h2> <time datetime="2023-07-06" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">06 Jul 2023</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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>In Dune 3.9.0, we added a feature that offloads some computations to background threads. Unfortunately, this has a bad interaction on macOS, where we fork processes to implement the RPC server and watch mode.</p> <p>We marked Dune 3.9.0 unavailable on macOS, and released 3.9.1 with some mitigations: we don't offload these computations on macOS, and we only fork when necessary.</p> <p>The plan for the next release is to stop forking processes on macOS.</p> <details> <summary>See full changelog</summary> <h2>Fixes</h2> <ul> <li> <p>Disable background operations and threaded console on macOS and other Unixes where we rely on fork. (#8100, #8121, fixes #8083, @rgrinberg, @emillon)</p> </li> <li> <p>Initialize async I/O thread lazily. (#8122, @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/2023-06-30-dune-3.9.0">Dune 3.9.0</a> </h2> <time datetime="2023-06-30" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">30 Jun 2023</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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 thrilled to announce the release of Dune 3.9.0. This version ships with a host of new features and improvements, including:</p> <ul> <li><strong>New <code>dune show</code> Command:</strong> This command enables you to display various pieces of information. For instance, you can use <code>dune show pp</code> to display the preprocessed output of a file or <code>dune show aliases [DIR]</code> to list the aliases available in <code>DIR</code>. Read more about the command on its manpage using <code>dune show --help</code>.</li> <li><strong>Improved Dialect Support:</strong> We have rolled out several fixes related to dialect support. These changes make it easier to work with Dream's <code>.eml</code> files.</li> <li><strong>Introduction of <code>(build_if)</code> Toggle in <code>(test)</code> Stanza:</strong> This new field facilitates the packaging of non-portable tests and benchmarks. If you have tests that don't build on a specific platform, you can now tell Dune not to build them on other Platforms with the <code>build_if</code> field.</li> </ul> <p>Enjoy the new features and improvements incorporated into this version!</p> <details> <summary>See full changelog</summary> <h2>Added</h2> <ul> <li> <p>Include the time it takes to read/write state files when <code>--trace-file</code> is enabled (<a href="https://github.com/ocaml/dune/pull/7960">#7960</a>, @rgrinberg)</p> </li> <li> <p>Include source tree scans in the traces produced by <code>--trace-file</code> (<a href="https://github.com/ocaml/dune/pull/7937">#7937</a>, @rgrinberg)</p> </li> <li> <p>Add <code>--all</code> option to <code>dune rpc status</code> to show all Dune RPC servers running. (<a href="https://github.com/ocaml/dune/pull/8011">#8011</a>, fix <a href="https://github.com/ocaml/dune/pull/7902">#7902</a>, @Alizter)</p> </li> <li> <p>Add additional metadata to the traces provided by <code>--trace-file</code> whenever <code>--trace-extended</code> is passed (<a href="https://github.com/ocaml/dune/pull/7778">#7778</a>, @rleshchinskiy)</p> </li> <li> <p><code>$ dune describe</code> is now a command group, so arguments to subcommands must be passed after subcommand itself. (<a href="https://github.com/ocaml/dune/pull/7919">#7919</a>, @Alizter)</p> </li> <li> <p>Add <code>dune show</code> command group which is an alias of <code>dune describe</code>. (<a href="https://github.com/ocaml/dune/pull/7946">#7946</a>, @Alizter)</p> </li> <li> <p>Add <code>dune show env</code> command and make <code>dune printenv</code> an alias of it. (<a href="https://github.com/ocaml/dune/pull/7985">#7985</a>, @Alizter)</p> </li> <li> <p>Add commands <code>dune show targets</code> and <code>dune show aliases</code> that display all the available targets and aliases in a given directory respectively. (<a href="https://github.com/ocaml/dune/pull/7770">#7770</a>, grants <a href="https://github.com/ocaml/dune/pull/265">#265</a>, @Alizter)</p> </li> <li> <p>Extensions used in <code>(dialect)</code> can contain periods (e.g., <code>cppo.ml</code>). (<a href="https://github.com/ocaml/dune/pull/7782">#7782</a>, fixes <a href="https://github.com/ocaml/dune/pull/7777">#7777</a>, @nojb)</p> </li> <li> <p>The <code>interface</code> and <code>implementation</code> fields of a <code>(dialect)</code> are now optional (<a href="https://github.com/ocaml/dune/pull/7757">#7757</a>, @gpetiot)</p> </li> <li> <p>Add <code>(build_if)</code> to the <code>(test)</code> stanza. When it evaluates to false, the executable is not built. (<a href="https://github.com/ocaml/dune/pull/7899">#7899</a>, fixes <a href="https://github.com/ocaml/dune/pull/6938">#6938</a>, @emillon)</p> </li> <li> <p>Allow <code>(include_subdirs qualified)</code> to be used when libraries define a <code>(modules ...)</code> field (<a href="https://github.com/ocaml/dune/pull/7797">#7797</a>, fixes <a href="https://github.com/ocaml/dune/pull/7597">#7597</a>, @anmonteiro)</p> </li> <li> <p>Allow multiple globs in library's <code>(stdlib (internal_modules ..))</code> (@anmonteiro, <a href="https://github.com/ocaml/dune/pull/7878">#7878</a>)</p> </li> </ul> <h2>Changed</h2> <ul> <li> <p>Do not rerun OCaml syntax files on every iteration of the watch mode. This is too memory consuming. (<a href="https://github.com/ocaml/dune/pull/7894">#7894</a>, fix <a href="https://github.com/ocaml/dune/pull/6900">#6900</a>, @rgrinberg)</p> </li> <li> <p>Attach melange rules to the default alias (<a href="https://github.com/ocaml/dune/pull/7926">#7926</a>, @haochenx)</p> </li> <li> <p>Compute digests and manage sandboxes in background threads (<a href="https://github.com/ocaml/dune/pull/7947">#7947</a>, @rgrinberg)</p> </li> </ul> <h2>Fixed</h2> <ul> <li> <p>Validate file extension for <code>$ dune ocaml top-module</code>. (<a href="https://github.com/ocaml/dune/pull/8005">#8005</a>, fixes <a href="https://github.com/ocaml/dune/pull/8004">#8004</a>, @3Rafal)</p> </li> <li> <p>Cinaps: The promotion rules for cinaps would only offer one file at a time no matter how many promotions were available. Now we offer all the promotions at once (<a href="https://github.com/ocaml/dune/pull/7901">#7901</a>, @rgrinberg)</p> </li> <li> <p>Add necessary parentheses in generated opam constraints (<a href="https://github.com/ocaml/dune/pull/7682">#7682</a>, fixes <a href="https://github.com/ocaml/dune/pull/3431">#3431</a>, @Lucccyo)</p> </li> </ul> <h2>Removed</h2> <ul> <li> <p>Remove some compatibility code for old version of dune that generated <code>.merlin</code> files. Now dune will never remove <code>.merlin</code> files automatically (<a href="https://github.com/ocaml/dune/pull/7562">#7562</a>)</p> </li> <li> <p>In opam constraints, reject <code>(and)</code> and <code>(or)</code> with no arguments at parse time (<a href="https://github.com/ocaml/dune/pull/7730">#7730</a>, @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/2023-06-28-dune-3.8.3">Dune 3.8.3</a> </h2> <time datetime="2023-06-28" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">28 Jun 2023</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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>This point release fixes two important issues on Windows and Linux.</p> <details> <summary>See full changelog</summary> <ul> <li>Fix deadlock on Windows (<a href="https://github.com/ocaml/dune/pull/8044">dune#8044</a>, @nojb)</li> <li>When using <code>sendfile</code> to copy files on Linux, fall back to the portable version if it fails at runtime for some reason (NFS, etc). (<a href="https://github.com/ocaml/dune/pull/8049">dune#8049</a>, fixes <a href="https://github.com/ocaml/dune/issues/8041">dune#8041</a>, @emillon)</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/2023-06-19-dune-3.8.2">Dune 3.8.2</a> </h2> <time datetime="2023-06-19" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">19 Jun 2023</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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've released Dune 3.8.2 with a few bug fixes.</p> <details> <summary>See full changelog</summary> <ul> <li>Switch back to threaded console for all systems; fix unresponsive console on Windows (<a href="https://github.com/ocaml/dune/pull/7906">dune#7906</a>, @nojb)</li> <li>Respect <code>-p</code> / <code>--only-packages</code> for <code>melange.emit</code> artifacts (<a href="https://github.com/ocaml/dune/pull/7849">dune#7849</a>, @anmonteiro)</li> <li>Fix scanning of Coq installed files (@ejgallego, reported by @palmskog, <a href="https://github.com/ocaml/dune/pull/7895">dune#7895</a> , fixes <a href="https://github.com/ocaml/dune/issues/7893">dune#7893</a>)</li> <li>Fix RPC buffer corruption issues due to multi threading. This issue was only reproducible with large RPC payloads (<a href="https://github.com/ocaml/dune/pull/7418">dune#7418</a>)</li> <li>Fix printing errors from excerpts whenever character offsets span multiple lines (<a href="https://github.com/ocaml/dune/pull/7950">dune#7950</a>, fixes <a href="https://github.com/ocaml/dune/issues/7905">dune#7905</a>, @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/2023-06-06-dune-3.8.1">Dune 3.8.1</a> </h2> <time datetime="2023-06-06" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">06 Jun 2023</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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've just released a patch version of Dune to fix regressions introduced in Dune 3.8.0.</p> <p>In particular, we've reverted some cross-compilation improvements that caused build failures when using <code>ppx_runtime_libraries</code> and we'll revisit them in a future version of Dune.</p> <details> <summary>See full changelog</summary> <ul> <li>Fix a crash when using a version of Coq < 8.13 due to the native compiler config variable being missing. We now explicitly default to <code>(mode vo)</code> for these older versions of Coq. (<a href="https://github.com/ocaml/dune/pull/7847">dune#7847</a>, fixes <a href="https://github.com/ocaml/dune/issues/7846">dune#7846</a>, @Alizter)</li> <li>Duplicate installed Coq theories are now allowed with the first appearing in COQPATH being preferred. This is inline with Coq's loadpath semantics. This fixes an issue with install layouts based on COQPATH such as those found in nixpkgs. (<a href="https://github.com/ocaml/dune/pull/7790">dune#7790</a>, @Alizter)</li> <li>Revert <a href="https://github.com/ocaml/dune/pull/7415">dune#7415</a> and <a href="https://github.com/ocaml/dune/pull/7450">dune#7450</a> (Resolve <code>ppx_runtime_libraries</code> in the target context when cross compiling) (<a href="https://github.com/ocaml/dune/pull/7887">dune#7887</a>, fixes <a href="https://github.com/ocaml/dune/issues/7875">dune#7875</a>, @emillon)</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/2023-05-31-dune-3.8.0">Dune 3.8.0</a> </h2> <time datetime="2023-05-31" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">31 May 2023</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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 pleased to announce the release of Dune 3.8.0.</p> <p>It is now available in <code>opam-repository</code>. As usual, it should always be safe to upgrade your <code>dune</code> package: new features and deprecations are only available if you upgrade the language version in your <code>dune-project</code> files.</p> <h2>🌟 Spotlight Features</h2> <ol> <li><strong>Dune <code>concurrent</code> action</strong></li> </ol> <p>Dune 3.8.0 introduced the new <code>concurrent</code> action. You can now use it instead of the <code>progn</code> action to execute actions concurrently.</p> <p>For instance:</p> <pre><code>(rule (action (concurrent (write-file A "I am file A.\n") (write-file B "I am certainly file B.\n") (write-file C "I am most certainly file C.\n")))) </code></pre> <p>will write to files <code>A</code>, <code>B</code> and <code>C</code> concurrently.</p> <ol start="2"> <li><strong>Support for <code>.mld</code> files</strong></li> </ol> <p>In Dune 3.7.0, we introduced version <code>0.3</code> of the <code>mdx</code> stanza, which came with support for <code>.mld</code> files.</p> <p>In Dune 3.8.0, <code>.mld</code> files are now supported by default with version <code>0.4</code> of the <code>mdx</code> stanza!</p> <p>Have a look at <a href="https://github.com/tmattio/demo-mdx-mld/compare/dune-3-8-0">this diff</a> to see how to migrate your code to the new stanza version.</p> <details> <summary>See full changelog</summary> <h2>Added</h2> <ul> <li> <p>Introduce mdx stanza 0.4 requiring mdx >= 2.3.0 which updates the default list of files to include <code>*.mld</code> files (#7582, @Leonidas-from-XIV)</p> </li> <li> <p>Allow <code>(stdlib ...)</code> to be used with <code>(wrapped false)</code> in library stanzas (#7139, @anmonteiro).</p> </li> <li> <p>Allow the main module of a library with <code>(stdlib ...)</code> to depend on other libraries (#7154, @anmonteiro).</p> </li> <li> <p>Support <code>(link_flags ...)</code> in <code>(cinaps ...)</code> stanza. (#7423, fixes #7416, @nojb)</p> </li> <li> <p>Allow <code>(package ...)</code> in any position within <code>(rule ...)</code> stanza (#7445, @Leonidas-from-XIV)</p> </li> <li> <p>Added a new user action <code>(concurrent )</code> which is like <code>(progn )</code> but runs the actions concurrently. (#6933, @Alizter)</p> </li> <li> <p>Accept the Ordered Set Language for the <code>modes</code> field in <code>library</code> stanzas (#6611, @anmonteiro).</p> </li> <li> <p>Allow parallel execution of inline tests partitions (#7012, @hhugo)</p> </li> <li> <p>Add the <code>--display-separate-messages</code> flag to separate the error messages produced by commands with a blank line. (#6823, fixes #6158, @esope)</p> </li> <li> <p>Add <code>--watch-exclusions</code> to Dune build options (#7216, @jonahbeckford)</p> </li> <li> <p>Adds support for loading plugins in toplevels (#6082, fixes #6081, @ivg, @richardlford)</p> </li> <li> <p>Introduce a <code>public_headers</code> field on libraries. This field is like <code>install_c_headers</code>, but it allows to choose the extension and choose the paths for the installed headers. (#7512, @rgrinberg)</p> </li> <li> <p>Dune can now detect Coq theories from outside the workspace. This allows for composition with installed theories (not necessarily installed with Dune). (#7047, @Alizter, @ejgallego)</p> </li> <li> <p>Added a <code>--no-build</code> option to <code>dune coq top</code> for avoiding rebuilds (#7380, fixes #7355, @Alizter)</p> </li> <li> <p>Add a <code>coqdoc_flags</code> field to the <code>coq.theory</code> stanza allowing the user to pass extra arguments to <code>coqdoc</code>. (#7676, fixes #7954 @Alizter)</p> </li> <li> <p>Preliminary support for Coq compiled intefaces (<code>.vos</code> files) enabled via <code>(mode vos)</code> in <code>coq.theory</code> stanzas. This can be used in combination with <code>dune coq top</code> to obtain fast re-building of dependencies (with no checking of proofs) prior to stepping into a file. (#7406, @rlepigre)</p> </li> <li> <p>Read <code>pkg-config</code> arguments from the <code>PKG_CONFIG_ARGN</code> environment variable (#1492, #7734, @anmonteiro)</p> </li> <li> <p>Use <code>$PKG_CONFIG</code>, when set, to find the <code>pkg-config</code> binary (#7469, fixes #2572, @anmonteiro)</p> </li> </ul> <h2>Changed</h2> <ul> <li> <p>Bootstrap: remove reliance on shell. Previously, we'd use the shell to get the number of processors. (#7274, @rgrinberg)</p> </li> <li> <p>Non-user proccesses such as version control or config checking are now run silently. (#6994, fixes #4066, @Alizter)</p> </li> <li> <p>Bytecode executables built for JSOO are linked with <code>-noautolink</code> and no longer depend on the shared stubs of their dependent libraries (#7156, @nojb)</p> </li> <li> <p>Always include <code>opam</code> files in the generated <code>.install</code> file. Previously, it would not be included whenever <code>(generate_opam_files true)</code> was set and the <code>.install</code> file wasn't yet generated. (#7547, @rgrinberg)</p> </li> </ul> <h2>Deprecated</h2> <ul> <li> <p>Modules that were declared in <code>(modules_without_implementation)</code>, <code>(private_modules)</code> or <code>(virtual_modules)</code> but not declared in <code>(modules)</code> will cause Dune to emit a warning which will become an error in 3.9. (#7608, fixes #7026, @Alizter)</p> </li> <li> <p>Coq language versions less 0.8 are deprecated, and will be removed in an upcoming Dune version. All users are required to migrate to <code>(coq lang 0.8)</code> which provides the right semantics for theories that have been globally installed, such as those coming from opam (@ejgallego, @Alizter)</p> </li> </ul> <h2>Fixed</h2> <ul> <li> <p>Find <code>pps</code> dependencies in the host context when cross-compiling, (#7415, fixes #4156, @anmonteiro)</p> </li> <li> <p>Fix plugin loading with findlib. The functionality was broken in 3.7.0. (#7556, @anmonteiro)</p> </li> <li> <p>Load the host context <code>findlib.conf</code> when cross-compiling (#7428, fixes #1701, @rgrinberg, @anmonteiro)</p> </li> <li> <p>Allow overriding the <code>ocaml</code> binary with findlib configuration (#7648, @rgrinberg)</p> </li> <li> <p>Resolve <code>ppx_runtime_libraries</code> in the target context when cross compiling (#7450, fixes #2794, @anmonteiro)</p> </li> <li> <p>Fix <code>dune install</code> when cross compiling (#7410, fixes #6191, @anmonteiro, @rizo)</p> </li> <li> <p>Fix string quoting in the json file written by <code>--trace-file</code> (#7773, @rleshchinskiy)</p> </li> <li> <p>Correctly set <code>MANPATH</code> in <code>dune exec</code>. Previously, we would use the <code>bin/</code> directory of the context. (#7655, @rgrinberg)</p> </li> <li> <p>merlin: ignore instrumentation settings for preprocessing. (#7606, fixes #7465, @Alizter)</p> </li> <li> <p>When a rule's action is interrupted, delete any leftover directory targets. This is consistent with how we treat file targets. (#7564, @rgrinberg)</p> </li> <li> <p>Fix dune crashing on MacOS in watch mode whenever <code>$PATH</code> contains <code>$PWD</code> (#7441, fixes #6907, @rgrinberg)</p> </li> <li> <p>Dune in watch mode no longer builds concurrent rules in serial (#7395 @rgrinberg, @jchavarri)</p> </li> <li> <p><code>dune coq top</code> now correctly respects the project root when called from a subdirectory. However, absolute filenames passed to <code>dune coq top</code> are no longer supported (due to being buggy) (#7357, fixes #7344, @rlepigre and @Alizter)</p> </li> <li> <p>RPC: Ignore SIGPIPE when clients suddenly disconnect (#7299, #7319, fixes #6879, @rgrinberg)</p> </li> <li> <p>Always clean up the UI on exit. (#7271, fixes #7142 @rgrinberg)</p> </li> <li> <p>Bootstrap: correctly detect the number of processors by allowing <code>nproc</code> to be looked up in <code>$PATH</code> (#7272, @Alizter)</p> </li> <li> <p>Speed up file copying on macos by using <code>clonefile</code> when available (@rgrinberg, #7210)</p> </li> <li> <p>Support commands that output 8-bit and 24-bit colors in the terminal (#7188, @Alizter)</p> </li> <li> <p>Speed up rule generation for libraries and executables with many modules (#7187, @jchavarri)</p> </li> <li> <p>Do not re-render UI on every frame if the UI doesn't change (#7186, fix #7184, @rgrinberg)</p> </li> <li> <p>Make <code>coq_db</code> creation in scope lazy (@ejgallego, #7133)</p> </li> <li> <p>dune install now respects --display quiet mode (#7116, fixes #4573, fixes #7106, @Alizter)</p> </li> <li> <p>Stub shared libraries (<code>dllXXX_stubs.so</code>) in Dune-installed libraries could not be used as dependencies of libraries in the workspace (eg when compiling to bytecode and/or Javascript). This is now fixed. (#7151, @nojb)</p> </li> <li> <p>Fix regression where Merlin was unable to handle filenames with uppercase letters under Windows. (#7577, @nojb)</p> </li> <li> <p>On nix+macos, pass <code>-f</code> to the codesign hook to avoid errors when the binary is already signed (#7183, fixes #6265, @greedy)</p> </li> <li> <p>Fix bug where RPC clients built with dune-rpc-lwt would crash when closing their connection to the server (#7581, @gridbugs)</p> </li> <li> <p>Fix RPC server on Windows (used for OCaml-LSP). (#7666, @nojb)</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/2023-04-05-dune-3.7.1">Dune 3.7.1</a> </h2> <time datetime="2023-04-05" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">05 Apr 2023</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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 are excited to announce the release of Dune 3.7.1, which brings a few bug fixes from the recent 3.7.0 release:</p> <ul> <li>Resolved watch mode issue for executables on macOS: We have addressed a problem with the recently introduced watch mode for executables that was causing segmentation faults on macOS. Users can now enjoy a stable watch mode without unexpected crashes on macOS.</li> <li>Fixed "Too many links" error on Windows: We have fixed an issue that caused Dune build failures with a "Too many links" error on Windows when using Dune cache.</li> </ul> <p>... and a few more, you can consult the changelog for a full list of bug fixes.</p> <details> <summary>See full changelog</summary> <ul> <li> <p>Fix segfault on MacOS when dune was being shutdown while in watch mode. (#7312, fixes #6151, @gridbugs, @emillon)</p> </li> <li> <p>Fix preludes not being recorded as dependencies in the <code>(mdx)</code> stanza (#7109, fixes #7077, @emillon).</p> </li> <li> <p>Pass correct flags when compiling <code>stdlib.ml</code>. (#7241, @emillon)</p> </li> <li> <p>Handle "Too many links" errors when using Dune cache on Windows. The fix in 3.7.0 for this same issue was not effective due to a typo. (#7472, @nojb)</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/2023-02-20-dune-3.7.0">Dune 3.7.0</a> </h2> <time datetime="2023-02-20" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">20 Feb 2023</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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 pleased to announce the release of Dune 3.7.0.</p> <p>As in <a href="https://discuss.ocaml.org/t/ann-dune-3-6-0/10811">the previous announce</a>, here is a changelog split in several parts: changes to the <code>dune</code> executable itself (new commands or options, etc) and changes to the dune language. Most of the changes to the latter are only enabled when you opt-in to the new version by specifying <code>(lang dune 3.7)</code> in the corresponding <code>dune-project</code> file. In other words, it should always be safe to upgrade the <code>dune</code> package.</p> <h2>🌟 Spotlight Features</h2> <ol> <li><strong>Watch mode for executables</strong></li> </ol> <p>Dune 3.7 now supports watch mode for executables! 🎉</p> <p>It works just as you'd expect, if you define an executable, you can run it with</p> <pre><code><span class='sh-source'>dune </span><span class='sh-support-function-builtin'>exec</span><span class='sh-source'> -w my-executable </span></code></pre> <p>It will interrupt the process when a file change and re-start the application.</p> <p>For a practical example of the workflows enabled by watch-mode, check <a href="https://github.com/tmattio/dune-watchmode-livereload-demo">this demo</a> of a live reload for web development:</p> <video src="https://user-images.githubusercontent.com/6162008/231740987-b2def52a-5369-4288-b895-006795777782.mov" data-canonical-src="https://user-images.githubusercontent.com/6162008/231740987-b2def52a-5369-4288-b895-006795777782.mov" controls="controls" muted="muted" class="d-block rounded-bottom-2 border-top width-fit" style="max-height:640px; min-height: 200px"> </video> <ol start="2"> <li><strong>Native Windows Polling</strong></li> </ol> <p>Starting from Dune 3.7, Dune watch mode is now available on Windows!</p> <p><a href="https://github.com/yams-yams">@yams-yams</a> and <a href="https://github.com/nojb">@nojb</a> from Lexifi have been working on integrating Windows native polling API with Dune to supplement the support for <code>fswatch</code>, which is unavailable on Windows.</p> <p>Windows users can now run <code>dune build -w</code> out of the box!</p> <ol start="3"> <li><strong>Qualified Subdirs</strong></li> </ol> <p>It's quite common to organise your code into subdirectories to separate components. Until now, you could do this by including <code>(include_subdirs unqualified)</code> in your dune files, but this wasn't completely satisfying since all of your modules were available in the top-level. If you wanted to expose modules in subdirectories under another module, you had to create a separate library, which was.. quite the overhead.</p> <p>Dune 3.7 brings support for the highly-anticipated qualified sub-directories. You can now write <code>(include_subdirs qualified)</code> in your dune file, and modules in your subdirectories will be exposed under a module with the name of the directory.</p> <p><img src="https://i.imgur.com/Lf4OhSX.jpg" alt="" ></p> <details> <summary>See full changelog</summary> <h2>dune executable</h2> <h3>Added</h3> <ul> <li> <p>Allow running <code>$ dune exec</code> in watch mode (with the <code>-w</code> flag). In watch mode, <code>$ dune exec</code> the executed binary whenever it is recompiled. (#6966, @gridbugs)</p> </li> <li> <p>Add a <code>dune cache size</code> command for displaying the size of the cache (#6638, @Alizter)</p> </li> <li> <p>Allow <code>$ dune ocaml dump-dot-merlin</code> to run in watch mode. Also this command shouldn't print "Entering Directory" mesages. (#6497, @rgrinberg)</p> </li> <li> <p>Add native support for polling mode on Windows (#7010, @yams-yams, @nojb, review by @Rucikir and @jbeckford)</p> </li> <li> <p>Auto-detect <code>dune-workspace</code> files as <code>dune</code> files in Emacs (#7061, @ilankri)</p> </li> <li> <p>Allow <code>$ dune utop</code> to load libraries defined in data only directories defined using <code>(subdir ..)</code> (#6631, @rgrinberg)</p> </li> </ul> <h3>Changed</h3> <ul> <li> <p>Make <code>dune describe workspace</code> return consistent dependencies for executables and for libraries. By default, compile-time dependencies towards PPX-rewriters are from now not taken into account (but runtime dependencies always are). Compile-time dependencies towards PPX-rewriters can be taken into account by providing the <code>--with-pps</code> flag. (#6727, fixes #6486, @esope)</p> </li> <li> <p>Use colored output with MDX when Dune colors are enabled. (#6462, @MisterDA)</p> </li> <li> <p>Use colored output with GCC and Clang when compiling C stubs. The flag <code>-fdiagnostics-color=always</code> is added to the <code>:standard</code> set of flags. (#4083, @MisterDA)</p> </li> <li> <p>Move <code>$ dune ocaml-merlin -dump-config=$dir</code> to <code>$ dune ocaml merlin dump-config $dir</code>. (#6547, @rgrinberg)</p> </li> </ul> <h3>Fixed</h3> <ul> <li> <p>Fix parsing of OCaml errors that contain code excerpts with <code>...</code> in them. (#7008, @rgrinberg)</p> </li> <li> <p>Fix <code>--trace-file</code> output. Dune now emits a single <em>complete</em> event for every executed process. Unterminated <em>async</em> events are no longer written. (#6892, @rgrinberg)</p> </li> <li> <p>Print missing newline after <code>$ dune exec</code>. (#6821, fixes #6700, @rgrinberg, @Alizter)</p> </li> <li> <p>Fix binary corruption when installing or promoting in parallel (#6669, fixes #6668, @edwintorok)</p> </li> <li> <p>Report an error if <code>dune init ...</code> would create a "dune" file in a location which already contains a "dune" directory (#6705, @gridbugs)</p> </li> <li> <p>Fix the parsing of alerts. They will now show up in diagnostics correctly. (#6678, @rginberg)</p> </li> <li> <p>Print "Leaving Directory" whenever "Entering Directory" is printed. (#6419, fixes #138, @cpitclaudel, @rgrinberg)</p> </li> <li> <p>Remove "Entering Directory" messages for <code>$ dune install</code>. (#6513, @rgrinberg)</p> </li> <li> <p><code>dune clean</code> should no longer fail under Windows due to the inability to remove the <code>.lock</code> file. Also, bring the implementation of the global lock under Windows closer to that of Unix. (#6523, @nojb)</p> </li> <li> <p>Fix missing dependencies when detecting the kind of C compiler we're using (#6610, fixes #6415, @emillon)</p> </li> <li> <p>Remove spurious build dir created when running <code>dune init proj ...</code> (#6707, fixes #5429, @gridbugs)</p> </li> <li> <p>Validate the command line arguments for <code>$ dune ocaml top-module</code>. This command requires one positional argument (#6796, fixes #6793, @rgrinberg)</p> </li> <li> <p>Fix dependency cycle when installing files to the bin section with <code>glob_files</code> (#6764, fixes #6708, @gridbugs)</p> </li> <li> <p>Handle "Too many links" errors when using Dune cache on Windows (#6993, @nojb)</p> </li> <li> <p>Pre-emptively clear screen in watch mode (#6987, fixes #6884, @rgrinberg)</p> </li> <li> <p>Allow <code>--sandbox</code> to affect <code>ocamldep</code> invocations. Previously, they were wrongly marked as incompatible (#6749, @rgrinberg)</p> </li> </ul> <h2>dune language</h2> <h3>Added</h3> <ul> <li> <p>Allow <code>(include_subdirs qualified)</code> for OCaml projects. (#6594, fixes #1084, @rgrinberg)</p> </li> <li> <p>Format dune files when they are named <code>dune-file</code>. This occurs when we enable the alternative file names project option. (#6566, @rgrinberg)</p> </li> <li> <p>Add <code>map_workspace_root</code> dune-project stanza to allow disabling of mapping of workspace root to <code>/workspace_root</code>. (#6988, fixes #6929, @richardlford)</p> </li> <li> <p>Allow the <code>cinaps</code> stanza to set a custom alias. By default, if the alias is not set then the cinaps actions will be attached to both <code>@cinaps</code> and <code>@runtest</code> (#6991, @rgrinberg)</p> </li> <li> <p>Add <code>(using ctypes 0.3)</code>. When used, paths in <code>(ctypes)</code> are interpreted relative to where the stanza is defined. (#6883, fixes #5325, @emillon)</p> </li> </ul> <h3>Changed</h3> <ul> <li> <p>Stop passing <code>-q</code> flag in <code>dune coq top</code>, which allows for <code>.coqrc</code> to be loaded. (#6848, fixes #6847, @Alizter)</p> </li> <li> <p>Coq native mode is now automatically detected by Dune starting with Coq lang 0.7. <code>(mode native)</code> has been deprecated in favour of detection from the configuration of Coq. (#6409, @Alizter)</p> </li> <li> <p>Accurately determine merlin configuration for all sources selected with <code>copy#</code> and <code>copy_files#</code>. The old heuristic of looking for a module in parent directories is removed (#6594, @rgrinberg)</p> </li> </ul> <h3>Fixed</h3> <ul> <li> <p>Fix parsing of the <code><=</code> operator in <em>blang</em> expressions of <code>dune</code> files. Previously, the operator would be interpreted as <code><</code>. (#6928, @tatchi)</p> </li> <li> <p>Fix preprocessing with <code>staged_pps</code> (#6748, fixes #6644, @rgrinberg)</p> </li> <li> <p>Fix the parsing of decimal and hexadecimal escape literals in <code>dune</code>, <code>dune-package</code>, and other dune s-expression based files (#6710, @shym)</p> </li> <li> <p>Fix cross compilation configuration when a context with targets is itself a host of another context (#6958, fixes #6843, @rgrinberg)</p> </li> <li> <p>Allow compilation rules to be impacted by <code>(env ..)</code> stanzas that modify the environment or set binaries. (#6527, @rgrinberg)</p> </li> <li> <p>Fix handling of support files generated by odoc. (#6913, @jonludlam)</p> </li> <li> <p>Fix the compilation of modules generated at link time when <code>implicit_transitive_deps</code> is enabled (#6642, @rgrinberg)</p> </li> <li> <p>Fix inline tests with <em>js_of_ocaml</em> and whole program compilation mode enabled (#6645, @hhugo)</p> </li> <li> <p>Fix <em>js_of_ocaml</em> separate compilation rules when <code>--enable=effects</code> ,<code>--enable=use-js-string</code> or <code>--toplevel</code> is used. (#6714, #6828, #6920, @hhugo)</p> </li> <li> <p>Fix <em>js_of_ocaml</em> separate compilation in presence of linkall (#6832, #6916, @hhugo)</p> </li> <li> <p><code>coqdep</code> is now called once per theory, instead of one time per Coq file. This should significantly speed up some builds, as <code>coqdep</code> startup time is often heavy (#7048, @Alizter, @ejgallego)</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/2023-02-07-dune-3.6.2">Dune 3.6.2</a> </h2> <time datetime="2023-02-07" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">07 Feb 2023</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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"> <details> <summary>See full changelog</summary> <ul> <li> <p>Fix configurator when using the MSVC compiler (#6538, fixes #6537, @nojb)</p> </li> <li> <p>Fix running the RPC server on windows (#6721 fixes #6720, @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/2022-11-24-dune-3.6.1">Dune 3.6.1</a> </h2> <time datetime="2022-11-24" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">24 Nov 2022</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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"> <details> <summary>See full changelog</summary> <ul> <li> <p>Fix status line enabled when ANSI colors are forced. (#6503, @MisterDA)</p> </li> <li> <p>Fix build with MSVC compiler (#6517, @nojb)</p> </li> <li> <p>Do not shadow library interface modules (#6549, fixes #6545, @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/2022-11-17-dune-3.6.0">Dune 3.6.0</a> </h2> <time datetime="2022-11-17" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">17 Nov 2022</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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>Dear dune users, It is my pleasure to announce that dune 3.6.0 is now available on opam 🎉. Here's the changelog - I reused the same classification as in the <a href="https://discuss.ocaml.org/t/ann-dune-3-5-0/10660">previous announce for dune 3.5.0</a>. Thanks again to all the contributors including bug reporters.</p> <details> <summary>See full changelog</summary> <h2>dune executable</h2> <p>This lists features of the “dune” executable itself. Upgrading dune will bring in these changes. We consider these changes safe, but it is difficult to define what a breaking change is for a command-line tool (for example, some error messages change). It is important to note that just upgrading the dune executable is not supposed to change how dune interprets existing projects. If just upgrading dune breaks compilation, it is a bug in dune, please report it!</p> <h3>Added</h3> <ul> <li>Introduce a <code>$ dune ocaml top-module</code> subcommand to load modules directly without sealing them behind the signature. (#5940, @rgrinberg)</li> <li>Revive <code>$ dune external-lib-deps</code> under <code>$ dune describe external-lib-deps</code>. (#6045, @moyodiallo)</li> <li>Extend the promotion CLI to a <code>dune promotion</code> group: <code>dune promote</code> is moved to <code>dune promotion apply</code> (the former still works) and the new <code>dune promotion diff</code> command can be used to just display the promotion without applying it. (#6160, fixes #5368, @emillon)</li> <li>Build progress status now shows number of failed jobs (#6242, @Alizter)</li> <li>Allow promoting into source directories specified by <code>subdir</code> (#6404, fixes #3502, @rgrinberg)</li> <li>Support <code>CLICOLOR</code> and <code>CLICOLOR_FORCE</code> to enable/disable/force ANSI colors. (#6340, fixes #6323, @MisterDA).</li> <li>Create a fake socket file <code>_build/.rpc/dune</code> on windows to allow rpc clients to connect using the build directory. (#6329, @rgrinberg)</li> </ul> <h3>Fixed</h3> <ul> <li>Forbid multiple instances of dune running concurrently in the same workspace. (#6360, fixes #236, @rgrinberg)</li> <li>Make dune describe workspace return the correct root path (#6380, fixes #6379, @esope)</li> <li>Fix running inline tests in bytecode mode (#5622, fixes #5515, @dariusf)</li> </ul> <h2>(lang dune 3.6)</h2> <p>This lists changes if you opt into the new <code>(lang dune 3.6)</code> version in your dune-project file. For this too, these are changes that we consider safe, but they can require changes to your dune files. For example, sandboxing is enabled in more places, which means that you might have to be more precise in expressing your dependencies. Please reach out on the issue tracker if you have trouble fixing your dune file or if something does not seem to be possible anymore.</p> <h3>Added</h3> <ul> <li>Add <code>(glob_files <glob>)</code> and <code>(glob_files_rec <glob>)</code> terms to the <code>files</code> field of the <code>install</code> stanza (#6250, closes #6018, @gridbugs)</li> <li>Allow <code>Byte_complete</code> binaries to be installable (#4837, @AltGr, @rgrinberg)</li> <li>Allow <code>:standard</code> in the <code>(modules)</code> field of the <code>coq.pp</code> stanza (#6229, fixes #2414, @Alizter)</li> </ul> <h3>Fixed</h3> <ul> <li>Allow absolute build directories to find public executables. For example, those specified with <code>(deps %{bin:...})</code> (#6326, @anmonteiro)</li> <li>[ctypes] do not mangle user written names in the ctypes stanza (#6374, fixes #5561, @rgrinberg)</li> <li>Forbid private libraries with <code>(package ..)</code> set from depending on private libraries that don't belong to a package (#6385, fixes #6153, @rgrinberg)</li> <li>[ctypes] always re-run <code>pkg-config</code> because we aren't tracking its external dependencies (#6052, @rgrinberg)</li> <li>[ctypes] remove dependency on configurator in the generated rules (#6052, @rgrinberg)</li> <li>Fix passing of flags to dune coq top (#6369, fixes #6366, @Alizter)</li> <li>Prevent crash if absolute paths are used in the install stanza and in recursive globs. These cases now result in a user error. (#6331, @gridbugs)</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/2022-10-20-dune-3.5.0">Dune 3.5.0</a> </h2> <time datetime="2022-10-20" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">20 Oct 2022</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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>I'd like to announce the release of dune 3.5.0 on opam. This release is packed with fixes and new features, that are described below with a description of what this means for project maintainers.</p> <details> <summary>See full changelog</summary> <h2>dune executable</h2> <p>This lists features of the "dune" executable itself. Upgrading dune will bring in these changes. We consider these changes safe, but it is difficult to define what a breaking change is for a command-line tool (for example, some error messages change). It is important to note that just upgrading the dune executable is not supposed to change how dune interprets existing projects. If just upgrading dune breaks compilation, it is a bug in dune, please report it!</p> <h3>Added</h3> <ul> <li>Allow dune describe workspace to accept directories as arguments. The provided directories restrict the worskpace description to those directories. (#6107, fixes #3893, @esope)</li> <li>Add a terminal persistence mode that attempts to clear the terminal history. It is enabled by setting terminal persistence to <code>clear-on-rebuild-and-flush-history</code> (#6065, @rgrinberg)</li> </ul> <h3>Fixed</h3> <ul> <li>Fix build-info version when used with flambda (#6089, fixes #6075, @jberdine)</li> <li>Fix compilation of Dune under esy on Windows (#6109, fixes #6098, @nojb)</li> <li>Improve error message when parsing several licenses in <code>(license)</code> (#6114, fixes #6103, @emillon)</li> <li>Handle CSI n K code in ANSI escape codes from commands. (#6214, fixes #5528, @emillon)</li> <li>Do not ignore rules marked <code>(promote (until-clean))</code> when <code>--ignore-promoted-rules</code> (or <code>-p</code>) is passed. (#6010, fixes #4401, @emillon)</li> </ul> <h3>Changed</h3> <ul> <li>dune install: copy files in an atomic way (#6150, @emillon)</li> <li>update vendored copy of cmdliner to 1.1.1. This improves the built-in documentation for command groups such as <code>dune ocaml</code>. (#6038, @emillon, #6169, @shonfeder)</li> <li>Extend dune describe to include the root path of the workspace and the relative path to the build directory. (#6136, @reubenrowe)</li> </ul> <h2>macOS support</h2> <p>This is technically a subset of above section. For M1 mac users, dune 3.5.0 is the first version which will correctly support <code>dune-build-info</code>.</p> <h3>Added</h3> <ul> <li>on macOS, sign executables produced by artifact substitution (#6137, #6231, fixes #5650, fixes #6226, @emillon)</li> <li>Enable file watching on MacOS SDK < 10.13. (#6218, @rgrinberg)</li> </ul> <h3>Fixed</h3> <ul> <li>macOS: Handle unknown fsevents without crashing (#6217, @rgrinberg)</li> </ul> <h2>(lang dune 3.5)</h2> <p>This lists changes if you opt into the new <code>(lang dune 3.5)</code> version in your <code>dune-project</code> file. For this too, these are changes that we consider safe, but they can require changes to your <code>dune</code> files. For example, sandboxing is enabled in more places, which means that you might have to be more precise in expressing your dependencies. Please reach out on the issue tracker if you have trouble fixing your dune file or if something does not seem to be possible anymore.</p> <h3>Added</h3> <ul> <li>Add a <code>runtime_deps</code> field in the <code>cinaps</code> stanza to specify runtime dependencies for running the cinaps preprocessing action (#6175, @rgrinberg)</li> <li>Allow rules producing directory targets to be not sandboxed (#6056, @rgrinberg)</li> <li>Introduce a <code>dirs</code> field in the <code>install</code> stanza to install entire directories (#5097, fixes #5059, @rgrinberg)</li> <li>Add an <code>(include <file>)</code> term to the <code>include_dirs</code> field for adding directories to the include paths sourced from a file. (#6058, fixes #3993, @gridbugs)</li> <li>Support <code>(extra_objects ...)</code> field in <code>(executable ...)</code> and <code>(library ...)</code> stanzas (#6084, fixes #4129, @gridbugs)</li> <li>Allow rules producing directory targets to create symlinks (#6077, fixes #5945, @rgrinberg)</li> <li>Added an (aliases ...) field to the (rules ...) stanza which allows the specification of multiple aliases per rule (#6194, @Alizter)</li> <li>Allow include statement in install stanza (#6139, fixes #256, @gridbugs)</li> <li>Add a new experimental feature <code>mode_specific_stubs</code> that allows the specification of different flags and sources for foreign stubs depending on the build mode (#5649, @voodoos)</li> </ul> <h3>Changed</h3> <ul> <li>Sandbox running cinaps actions starting from cinaps 1.1 (#6176, @rgrinberg)</li> <li>Cinaps actions are now sandboxed by default (#6062, @rgrinberg)</li> <li>Menhir rules are now sandboxed by default (#6076, @rgrinberg)</li> <li>Inline tests are now sandboxed by default (#6079, @rgrinberg)</li> </ul> <h3>Fixed</h3> <ul> <li>Shadow alias module <code>Foo__</code> when building a library <code>Foo</code> (#6126, @rgrinberg)</li> <li>Disallow generating targets in sub direcories in inferred rules. The check to forbid this was accidentally done only for manually specified targets (#6031, @rgrinberg)</li> <li>odoc rules now about <code>ODOC_SYNTAX</code> and will rerun accordingly (#6010, fixes #1117, @emillon)</li> </ul> <h2>Coq support</h2> <p>These changes, associated with <code>(lang dune 3.5)</code>, are specific to <code>coq</code>.</p> <h3>Added</h3> <ul> <li>Add <code>%{coq:...}</code> macro for accessing data about the configuration about Coq. For instance <code>%{coq:version}</code> (#6049, @Alizter)</li> <li>Starting with Coq build language 0.6, theories can be built without importing Coq's standard library by including <code>(stdlib no)</code>. (#6165 #6164, fixes #6163, @ejgallego @Alizter @LasseBlaauwbroek)</li> </ul> <h3>Changed</h3> <ul> <li>Dune no longer considers .aux files as targets during Coq compilation. This means that .aux files are no longer cached. (#6024, fixes #6004, @alizter)</li> <li>The test suite for Coq now requires Coq >= 8.16 due to changes in the plugin loading mechanism upstream (which now uses <code>Findlib</code>).</li> <li>The <code>(coq.theory ...)</code> stanza will now ensure that for each declared <code>(plugin ...)</code>, the <code>META</code> file for it is built before calling <code>coqdep</code>. This enables the use of the new <code>Findlib</code>-based loading method in Coq 8.16; however as of Coq 8.16.0, Coq itself has some bugs preventing this to work yet. (#6167 , workarounds #5767, @ejgallego)</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/2022-07-26-dune-3.4.1">Dune 3.4.1</a> </h2> <time datetime="2022-07-26" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">26 Jul 2022</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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"> <details> <summary>See full changelog</summary> <ul> <li>Fix build on cygwin/i686-w64-mingw32 (#6008, @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/2022-07-21-dune-3.4.0">Dune 3.4.0</a> </h2> <time datetime="2022-07-21" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">21 Jul 2022</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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>On behalf of the dune team, I’m pleased to announce the release of version 3.4.0.</p> <p>Bug fixes, a couple new features, better hints and error messages - I won't restate what's in the changelog below. Thanks to everyone involved in this release!</p> <details> <summary>See full changelog</summary> <ul> <li> <p>Make <code>dune describe</code> correctly handle overlapping implementations for virtual libraries (#5971, fixes #5747, @esope)</p> </li> <li> <p>Building the <code>@check</code> alias should make sure the libraries and executables don't have dependency cycles (#5892, @rgrinberg)</p> </li> <li> <p>[ctypes] Add support for the <code>errno</code> parameter using the <code>errno_policy</code> field in the ctypes settings. (#5827, @droyo)</p> </li> <li> <p>Fix <code>dune coq top</code> when it is invoked on files from a subdirectory of the directory containing the associated stanza (#5784, fixes #5552, @ejgallego, @rlepigre, @Alizter)</p> </li> <li> <p>Fix hint when an invalid module name is found. (#5922, fixes #5273, @emillon)</p> </li> <li> <p>The <code>(cat)</code> action now supports several files. (#5928, fixes #5795, @emillon)</p> </li> <li> <p>Dune no longer uses shimmed <code>META</code> files for OCaml 5.x, solely using the ones installed by the compiler. (#5916, @dra27)</p> </li> <li> <p>Fix handling of the <code>(deps)</code> field in <code>(test)</code> stanzas when there is an <code>.expected</code> file. (#5952, #5951, fixes #5950, @emillon)</p> </li> <li> <p>Ignore insignificant filesystem events. This stops RPC in watch mode from flashing errors on insignificant file system events such as changes in the <code>.git/</code> directory. (#5953, @rgrinberg)</p> </li> <li> <p>Fix parsing more error messages emitted by the OCaml compiler. In particular, messages where the excerpt line number started with a blank character were skipped. (#5981, @rgrinberg)</p> </li> <li> <p>env stanza: warn if some rules are ignored because they appear after a wildcard rule. (#5898, fixes #5886, @emillon)</p> </li> <li> <p>On Windows, XDG_CACHE_HOME is taken to be the <code>FOLDERID_InternetCache</code> if unset, and XDG_CONFIG_HOME and XDG_DATA_HOME are both taken to be <code>FOLDERID_LocalAppData</code> if unset. (#5943, fixes #5808, @nojb)</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/2022-06-21-dune-3.3.1">Dune 3.3.1</a> </h2> <time datetime="2022-06-21" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">21 Jun 2022</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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"> <details> <summary>See full changelog</summary> <ul> <li> <p>Improve parsing of ocamlc errors. We now correctly strip excerpts and parse alerts (#5879, @rgrinberg)</p> </li> <li> <p>The <code>(libraries)</code> field of the <code>coq.theory</code> stanza has been renamed to <code>(plugins)</code> and the Coq language version has been bumped to 0.5.</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/2022-06-17-dune-3.3.0">Dune 3.3.0</a> </h2> <time datetime="2022-06-17" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">17 Jun 2022</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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>On behalf of the dune team, I’m pleased to announce the release of version 3.3.0. This is the first version that supports the upcoming OCaml 5.0. It also improves safety by sandboxing more rules and enabling more warnings, and there's a bunch of new features on the coq side too. Full changelog follows.</p> <p>Note that as usual, dune works hard not to break existing packages. So even if it mentions that rules require precise dependencies, for example, this new safety net is only enabled for project that use <code>(lang dune 3.3)</code>.</p> <p>Happy hacking.</p> <details> <summary>See full changelog</summary> <ul> <li> <p>Sandbox preprocessing, lint, and dialect rules by default. All these rules now require precise dependency specifications (#5807, @rgrinberg)</p> </li> <li> <p>Allow list expansion in the <code>pps</code> specification for preprocessing (#5820, @Firobe)</p> </li> <li> <p>Add warnings 67-69 to dune's default set of warnings. These are warnings of the form "unused X.." (#5844, @rgrinberg)</p> </li> <li> <p>Introduce project "composition" for coq theories. Coq theories in separate projects can now refer to each other when in the same workspace (#5784, @Alizter, @rgrinberg)</p> </li> <li> <p>Fix hint message for <code>data_only_dirs</code> that wrongly mentions the unknown constructor <code>data_only</code> (#5803, @lambdaxdotx)</p> </li> <li> <p>Fix creating sandbox directory trees by getting rid of buggy memoization (#5794, @rgrinberg, @snowleopard)</p> </li> <li> <p>Handle directory dependencies in sandboxed rules. Previously, the parents of these directory dependencies weren't created. (#5754, @rgrinberg)</p> </li> <li> <p>Set the exit code to 130 when dune is terminated with a signal (#5769, fixes #5757)</p> </li> <li> <p>Support new locations of unix, str, dynlink in OCaml >= 5.0 (#5582, @dra27)</p> </li> <li> <p>The <code>coq.theory</code> stanza now produces rules for running <code>coqdoc</code>. Given a theory named <code>mytheory</code>, the directory targets <code>mytheory.html/</code> and <code>mytheory.tex/</code> or additionally the aliases <code>@doc</code> and <code>@doc-latex</code> will build the HTML and LaTeX documentation repsectively. (#5695, fixes #3760, @Alizter)</p> </li> <li> <p>Coq theories marked as <code>(boot)</code> cannot depend on other theories (#5867, @ejgallego)</p> </li> <li> <p>Ignore <code>bigarray</code> in <code>(libraries)</code> with OCaml >= 5.0. (#5526, fixes #5494, @moyodiallo)</p> </li> <li> <p>Start with :standard when building the ctypes generated foreign stubs so that we include important compiler flags, such as -fPIC (#5816, fixes #5809).</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/2022-05-20-dune-3.2.0">Dune 3.2.0</a> </h2> <time datetime="2022-05-20" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">20 May 2022</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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>On behalf of the dune team, I'm pleased to announce the availability of version 3.2.0. This release contains few new features, but is packed with bug fixes and usability improvements. In particular, I'd like to point out that we've continued to improve the user experience with the watch mode. I encourage you all to try it out if you haven't already.</p> <p>Happy Hacking.</p> <details> <summary>See full changelog</summary> <ul> <li> <p>Fixed <code>dune describe workspace --with-deps</code> so that it correctly handles Reason files, as well as files any other dialect. (#5701, @esope)</p> </li> <li> <p>Disable alerts when compiling code in vendored directories (#5683, @NathanReb)</p> </li> <li> <p>Fixed <code>dune describe --with-deps</code>, that crashed when some preprocessing was required in a dune file using <code>per_module</code>. (#5682, fixes #5680, @esope)</p> </li> <li> <p>Add <code>$ dune describe pp</code> to print the preprocssed ast of sources. (#5615, fixes #4470, @cannorin)</p> </li> <li> <p>Report dune file evaluation errors concurrently. In the same way we report build errors. (#5655, @rgrinberg)</p> </li> <li> <p>Watch mode now default to clearing the terminal on rebuild (#5636, fixes, #5216, @rgrinberg)</p> </li> <li> <p>The output of jobs that finished but were cancelled is now omitted. (#5631, fixes #5482, @rgrinberg)</p> </li> <li> <p>Allows to configure all the default destination directories with <code>./configure</code> (adds <code>bin</code>, <code>sbin</code>, <code>data</code>, <code>libexec</code>). Use <code>OPAM_SWITCH_PREFIX</code> instead of calling the <code>opam</code> binaries in <code>dune install</code>. Fix handling of multiple <code>libdir</code> in <code>./configure</code> for handling <code>/usr/lib/ocaml/</code> and <code>/usr/local/lib/ocaml</code>. In <code>dune install</code> forbid relative directories in <code>libdir</code>, <code>docdir</code> and others specific directory setting because their handling was inconsistent (#5516, fixes #3978 and #5455, @bobot)</p> </li> <li> <p><code>--terminal-persistence=clear-on-rebuild</code> will no longer destroy scrollback on some terminals (#5646, @rgrinberg)</p> </li> <li> <p>Add a fmt command as a shortcut of <code>dune build @fmt --auto-promote</code> (#5574, @tmattio)</p> </li> <li> <p>Watch mode now tracks copied external files, external directories for dependencies, dune files in OCaml syntax, files used by <code>include</code> stanzas, dune-project, opam files, libraries builtin with compiler, and foreign sources (#5627, #5645, #5652, #5656, #5672, #5691, #5722, fixes #5331, @rgrinberg)</p> </li> <li> <p>Improve metrics for cram tests. Include test names in the event and add a category for cram tests (#5626, @rgrinberg)</p> </li> <li> <p>Allow specifying multiple licenses in project file (#5579, fixes #5574, @liyishuai)</p> </li> <li> <p>Match <code>glob_files</code> only against files in external directories (#5614, fixes #5540, @rgrinberg)</p> </li> <li> <p>Add pid's to chrome trace output (#5617, @rgrinberg)</p> </li> <li> <p>Fix race when creating local cache directory (#5613, fixes #5461, @rgrinberg)</p> </li> <li> <p>Add <code>not</code> to boolean expressions (#5610, fix #5503, @rgrinberg)</p> </li> <li> <p>Fix relative dependencies outside the workspace (#4035, fixes #5572, @bobot)</p> </li> <li> <p>Allow to specify <code>--prefix</code> via the environment variable <code>DUNE_INSTALL_PREFIX</code> (#5589, @vapourismo)</p> </li> <li> <p>Dune-site.plugin: add support for <code>archive(native|byte, plugin)</code> used in the wild before findlib documented <code>plugin(native|byte)</code> in 2015 (#5518, @bobot)</p> </li> <li> <p>Fix a bug where Dune would not correctly interpret <code>META</code> files in alternative layout (ie when the META file is named <code>META.$pkg</code>). The <code>Llvm</code> bindings were affected by this issue. (#5619, fixes #5616, @nojb)</p> </li> <li> <p>Support <code>(binaries)</code> in <code>(env)</code> in dune-workspace files (#5560, fix #5555, @emillon)</p> </li> <li> <p>(mdx) stanza: add support for (locks). (#5628, fixes #5489, @emillon)</p> </li> <li> <p>(mdx) stanza: support including files in different directories using relative paths, and provide better error messages when paths are invalid (#5703, #5704, fixes #5596, @emillon)</p> </li> <li> <p>Fix ctypes rules for external lib names which aren't valid ocaml names (#5667, fixes #5511, @Khady)</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/2022-04-20-dune-3.1.1">Dune 3.1.1</a> </h2> <time datetime="2022-04-20" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">20 Apr 2022</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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"> <details> <summary>See full changelog</summary> <ul> <li> <p>Fix build on Cygwin. (#5593, fixes 5577, @nojb)</p> </li> <li> <p>Fix execution of <code>(system ..)</code> actions on Windows. (#5593, fixes #5523, @nojb)</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/2022-04-18-dune-3.1.0">Dune 3.1.0</a> </h2> <time datetime="2022-04-18" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">18 Apr 2022</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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>On behalf of the dune team, I'm pleased to announce version 3.1.0. This release contains some small, but interesting features, and some important quality of life bug fixes. I encourage everyone to upgrade as soon as possible.</p> <p>Happy Hacking.</p> <details> <summary>See full changelog</summary> <ul> <li> <p>Add <code>sourcehut</code> as an option for defining project sources in dune-project files. For example, <code>(source (sourcehut user/repo))</code>. (#5564, @rgrinberg)</p> </li> <li> <p>Add <code>dune coq top</code> command for running a Coq toplevel (#5457, @rlepigre)</p> </li> <li> <p>Fix dune exec dumping database in wrong directory (#5544, @bobot)</p> </li> <li> <p>Always output absolute paths for locations in RPC reported diagnostics (#5539, @rgrinberg)</p> </li> <li> <p>Add <code>(deps <deps>)</code> in ctype field (#5346, @bobot)</p> </li> <li> <p>Add <code>(include <file>)</code> constructor to dependency specifications. This can be used to introduce dynamic dependencies (#5442, @anmonteiro)</p> </li> <li> <p>Ensure that <code>dune describe</code> computes a transitively closed set of libraries (#5395, @esope)</p> </li> <li> <p>Add direct dependencies to $ dune describe output (#5412, @esope)</p> </li> <li> <p>Show auto-detected concurrency on Windows too (#5502, @MisterDA)</p> </li> <li> <p>Fix operations that remove folders with absolute path. This happens when using esy (#5507, @EduardoRFS)</p> </li> <li> <p>Dune will not fail if some directories are non-empty when uninstalling. (#5543, fixes #5542, @nojb)</p> </li> <li> <p><code>coqdep</code> now depends only on the filesystem layout of the .v files, and not on their contents (#5547, helps with #5100, @ejgallego)</p> </li> <li> <p>The mdx stanza 0.2 can now be used with <code>(implicit_transitive_deps false)</code> (#5558, fixes #5499, @emillon)</p> </li> <li> <p>Fix missing parenthesis in printing of corresponding terminal command for <code>(with-outputs-to )</code> (#5551, fixes #5546, @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/2022-03-02-dune-3.0.3">Dune 3.0.3</a> </h2> <time datetime="2022-03-02" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">02 Mar 2022</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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"> <details> <summary>See full changelog</summary> <ul> <li> <p>Do not enable warnings 63-70 by default (#5476, fixes #5464, @rgrinberg)</p> </li> <li> <p>Allow %{read-lines} to introduce dynamic dependencies like %{read}. (#5440, @anmonteiro)</p> </li> <li> <p>Look up <code>gmake</code> before <code>make</code> (#5474, fixes #5470, @rgrinberg)</p> </li> <li> <p>Handle empty output from <code>getconf</code> (#5473 fixes #5471, @mndrix)</p> </li> <li> <p>Depend on any provided <code>foreign_archives</code> for ctypes stub generation (#5475, @mbacarella)</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/2022-02-19-dune-3.0.2">Dune 3.0.2</a> </h2> <time datetime="2022-02-19" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">19 Feb 2022</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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"> <details> <summary>See full changelog</summary> <ul> <li> <p>Fix compilation on MacOS SDK < 10.13. The native watch mode is disabled in such instances (#5431 fix #5430, @rgrinberg)</p> </li> <li> <p>Do no add workspace_root to <code>BUILD_PATH_PREFIX_MAP</code> for projects before 3.0 (5448, @rgrinberg)</p> </li> <li> <p>Fix performance regression in incremental builds (#5439, @snowleopard)</p> </li> <li> <p>Fix digest computation bug introduced in 3.0.1 (#5451, @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/2022-02-11-dune-3.0.0">Dune 3.0.0</a> </h2> <time datetime="2022-02-11" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">11 Feb 2022</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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>On behalf of the dune team, I’m delighted to announce the availability of dune 3.0.</p> <p>The team has been working on this release for over 6 months, and there’s a bunch of new work to report. I’ll only highlight the some of the interesting new developments:</p> <ul> <li> <p>The watch mode has been rewritten from scratch to be faster and more scalable. We also no longer rely on any 3rd party tools such as fswatch. If any of you still have a dune workspace dune is still struggling with, we cannot wait to hear from you.</p> </li> <li> <p>The watch mode now also starts an RPC server in the background. This RPC protocol is going to be the basis for other tools to interact with dune. Watch out for announcement on the LSP side to see how we’ll be making use of it to improve the editing experience.</p> </li> <li> <p>The dune cache has been rewritten as well. It is now simpler and more reliable. There are still some components missing, such as distribution of the artifacts over the network. Nevertheless, we welcome you all to experiment with this feature and give us feedback.</p> </li> <li> <p>We’ve addressed one of our oldest feature requests: high level rules for ctypes projects. This feature is still experimental, so we need feedback from real world projects before declaring it as mature.</p> </li> </ul> <p>Of course, there are many other fixes, enhancements, and only a few breaking changes in this release. We hope you have an easy time upgrading.</p> <p>Happy Hacking.</p> <details> <summary>See full changelog</summary> <ul> <li> <p>Remove <code>uchar</code> and <code>seq</code> dummy ocamlfind libraries from dune's builtin library database (#5260, @kit-ty-kate)</p> </li> <li> <p>Add a <code>DUNE_DIFF_COMMAND</code> environment variable to match <code>--diff-command</code> command-line parameter (@raphael-proust, fix #5369, #5375)</p> </li> <li> <p>Add support for odoc-link rules (#5045, @jonludlam, @lubegasimon)</p> </li> <li> <p>Dune will no longer generate documentation for hidden modules (#5045, @jonludlam, @lubegasimon)</p> </li> <li> <p>Parse the <code>native_pack_linker</code> field of <code>ocamlc -config</code> (#5281, @TheLortex)</p> </li> <li> <p>Fix plugins with dot in the name (#5182, @bobot, review @rgrinberg)</p> </li> <li> <p>Don't generate the dune-site build part when not needed (#4861, @bobot, review @kit-ty-kate)</p> </li> <li> <p>Fix installation of implementations of virtual libraries (#5150, fix #3636, @rgrinberg)</p> </li> <li> <p>Run tests in all modes defined. Previously, jsoo was excluded. (@hhugo, #5049, fix #4951)</p> </li> <li> <p>Allow to configure the alias to run the jsoo tests (@hhugo, #5049, #4999)</p> </li> <li> <p>Set jsoo compilation flags in the <code>env</code> stanza (@hhugo, #5049, #1613)</p> </li> <li> <p>Allow to configure jsoo separate compilation in the <code>env</code> stanza. Previously, it was hard coded to always be enabled in the <code>dev</code> profile. (@hhugo, #5049, fix #970)</p> </li> <li> <p>Fix build-info version in jsoo executables (@hhugo, #5049, fix #4444)</p> </li> <li> <p>Pass <code>-no-check-prims</code> when building bytecode for jsoo (@hhugo, #5049, #4027)</p> </li> <li> <p>Fix jsoo builds when dynamically linked foreign archives are disabled (@hhugo, #5049)</p> </li> <li> <p>Disallow empty packages starting from 3.0. Empty packages may be re-enabled by adding the <code>(allow_empty)</code> to the package stanza in the dune-project file. (#4867, fix #2882, @kit-ty-kate, @rgrinberg)</p> </li> <li> <p>Add <code>link_flags</code> field to the <code>executable</code> field of <code>inline_tests</code> (#5088, fix #1530, @jvillard)</p> </li> <li> <p>In watch mode, use fsevents instead of fswatch on OSX (#4937, #4990, fixes #4896 @rgrinberg)</p> </li> <li> <p>Remove <code>inotifywait</code> watch mode backend on Linux. We now use the inotify API exclusively (#4941, @rgrinberg)</p> </li> <li> <p>Report cycles between virtual libraries and their implementation (#5050, fixes #2896, @rgrinberg)</p> </li> <li> <p>Warn when lang versions have an ignored suffix. <code>(lang dune 2.3.4)</code> or <code>(lang dune 2.3suffix)</code> were silently parsed as <code>2.3</code> and we know suggest to remove the prefix. (#5040, @emillon)</p> </li> <li> <p>Allow users to specify dynamic dependencies in rules. For example <code>(deps %{read:foo.gen})</code> (#4662, fixes #4089, @jeremiedimino)</p> </li> <li> <p>Sandbox infer rules for menhir. Fixes possible "inconsistent assumptions" errors (#5015, @rgrinberg)</p> </li> <li> <p>Experimental support for ctypes stubs (#3905, fixes #135, @mbacarella)</p> </li> <li> <p>Fix interpretation of <code>binaries</code> defined in the <code>env stanza</code>. Binaries defined in <code>x/dune</code> wouldn't be visible in `x/*/**/dune. (#4975, fixes #4976, @Leonidas-from-XIV, @rgrinberg)</p> </li> <li> <p>Do not list private libraries in package listings (#4945, fixes #4799, @rgrinberg)</p> </li> <li> <p>Allow spaces in cram test paths (#4980, fixes #4162, @rgrinberg)</p> </li> <li> <p>Improve error handling of misbehaving cram scripts. (#4981, fix #4230, @rgrinberg)</p> </li> <li> <p>Fix <code>foreign_stubs</code> inside a <code>tests</code> stanza. Previously, dune would crash when this field was present (#4942, fix #4946, @rgrinberg)</p> </li> <li> <p>Add the <code>enabled_if</code> field to <code>inline_tests</code> within the <code>library</code> stanza. This allows us to disable executing the inline tests while still allowing for compilation (#4939, @rgrinberg)</p> </li> <li> <p>Generate a <code>dune-project</code> when initializing projects with <code>dune init proj ...</code> (#4881, closes #4367, @shonfeder)</p> </li> <li> <p>Allow spaces in the directory argument of the <code>subdir</code> stanza (#4943, fixes #4907, @rgrinberg)</p> </li> <li> <p>Add a <code>%{toolchain}</code> expansion variable (#4899, fixes #3949, @rgrinberg)</p> </li> <li> <p>Include dependencies of executables when creating toplevels (either <code>dune top</code> or <code>dune utop</code>) (#4882, fixes #4872, @Gopiancode)</p> </li> <li> <p>Fixes <code>opam</code> META file requires entry for private libs (#4841, fixes #4839, @toots)</p> </li> <li> <p>Fixes <code>dune exec</code> not adding .exe on Windows (#4371, fixes #3322, @MisterDA)</p> </li> <li> <p>Allow multiple cinaps stanzas in the same directory (#4460, @rgrinberg)</p> </li> <li> <p>Fix <code>$ dune subst</code> in empty git repositories (#4441, fixes #3619, @rgrinberg)</p> </li> <li> <p>Improve interpretation of ansi escape sequence when spawning processes (#4408, fixes #2665, @rgrinberg)</p> </li> <li> <p>Allow <code>(package pkg)</code> in dependencies even if <code>pkg</code> is an installed package (#4170, @bobot)</p> </li> <li> <p>Allow <code>%{version:pkg}</code> to work for external packages (#4104, @kit-ty-kate)</p> </li> <li> <p>Add <code>(glob_files_rec <dir>/<glob>)</code> for globbing files recursively (#4176, @jeremiedimino)</p> </li> <li> <p>Automatically generate empty <code>.mli</code> files for executables and tests (#3768, fixes #3745, @CraigFe)</p> </li> <li> <p>Add <code>ocaml</code> command subgroup for OCaml related commands such as <code>utop</code>, <code>top</code>, and <code>merlin</code> (#3936, @rgrinberg).</p> </li> <li> <p>Detect unknown variables more eagerly (#4184, @jeremiedimino)</p> </li> <li> <p>Improve location of variables and macros in error messages (#4205, @jeremiedimino)</p> </li> <li> <p>Auto-detect <code>dune-project</code> files as <code>dune</code> files in Emacs (#4222, @shonfeder)</p> </li> <li> <p>Dune no longer automatically create or edit <code>dune-project</code> files (#4239, fixes #4108, @jeremiedimino)</p> </li> <li> <p>Warn if <code>dune-project</code> is not found (fatal in release mode) (#5343, @emillon)</p> </li> <li> <p>Cleanup temporary files after running <code>$ dune exec</code>. (#4260, fixes #4243, @rgrinberg)</p> </li> <li> <p>Add a new subcommand <code>dune ocaml dump-dot-merlin</code> that prints a mix of all the merlin configuration of a directory (defaulting to the current directory) in the Merlin configuration syntax. (#4250, @voodoos)</p> </li> <li> <p>Enable cram tests by default (#4262, @rgrinberg)</p> </li> <li> <p>Drop support for opam 1.x (#4280, @jeremiedimino)</p> </li> <li> <p>Stop calling <code>ocamlfind</code> to determine the library search path or library installation directory. This makes the behavior of Dune simpler and more reproducible (#4281, @jeremiedimino)</p> </li> <li> <p>Remove the <code>external-lib-deps</code> command. This command was only approximative and the cost of maintainance was getting too high. We removed it to make room for new more important features (#4298, @jeremiedimino)</p> </li> <li> <p>It is now possible to define action dependencies through a chain of aliases. (#4303, @aalekseyev)</p> </li> <li> <p>If an .ml file is not used by an executable, Dune no longer report parsing error in this file (#4330, @jeremiedimino)</p> </li> <li> <p>Add support for sandboxing using hard links (#4360, Andrey Mokhov)</p> </li> <li> <p>Fix dune crash when <code>subdir</code> is an absolute path (#4366, @anmonteiro)</p> </li> <li> <p>Changed the implementation of actions attached to aliases, as in <code>(rule (alias runtest) (action (run ./test)))</code>. A visible result for users is that such actions are now memoized for longer. For instance:</p> <pre><code>$ echo '(rule (alias runtest) (action (echo "X=%{env:X=0}\n")))` > dune $ X=1 dune runtest X=1 $ X=2 dune runtest X=2 $ X=1 dune runtest </code></pre> <p>Previously, Dune would have re-executed the action again at the last line. Now it remembers the result of the first execution.</p> </li> <li> <p>Fix a bug where dune would always re-run all actions that produce symlinks, even if their dependencies did not change. (#4405, @aalekseyev)</p> </li> <li> <p>Fix a bug that was causing Dune to re-hash generated files more often than necessary (#4419, @jeremiedimino)</p> </li> <li> <p>Fields allowed in the config file are now also allowed in the workspace file (#4426, @jeremiedimino)</p> </li> <li> <p>Add options to control how Dune should handle stdout and stderr of actions when then succeed. It is now possible to ask Dune to ignore the stdout of actions when they succeed or to request that the stderr of actions must be empty. This allows to reduce the noise of large builds (#4422, #4515, @jeremiedimino)</p> </li> <li> <p>The <code>@all</code> alias no longer depends directly on copies of files from the source directory (#4461, @nojb)</p> </li> <li> <p>Allow dune-file as an alternative file name for dune files (needs to be enabled in the dune-project file) (#4428, @nojb)</p> </li> <li> <p>Drop support for upgrading jbuilder projects (#4473, @jeremiedimino)</p> </li> <li> <p>Extend the environment variable <code>BUILD_PATH_PREFIX_MAP</code> to rewrite the root of the build dir (or sandbox) to <code>/workspace_root</code> (#4466, @jeremiedimino)</p> </li> <li> <p>Simplify the implementation of build cache. We stop using the cache daemon to access the cache and instead write to and read from it directly. The new cache implementation is based on Jenga's cache library, which was thoroughly tested on large-scale builds. Using Jenga's cache library will also make it easier for us to port Jenga's cloud cache to Dune. (#4443, #4465, Andrey Mokhov)</p> </li> <li> <p>More informative error message when Dune can't read a target that's supposed to be produced by the action. Old message is still produced on ENOENT, but other errors deserve a more detailed report. (#4501, @aalekseyev)</p> </li> <li> <p>Fixed a bug where a sandboxed action would fail if it declares no dependencies in its initial working directory or any directory it <code>chdir</code>s into. (#4509, @aalekseyev)</p> </li> <li> <p>Fix a crash when clearing temporary directories (#4489, #4529, Andrey Mokhov)</p> </li> <li> <p>Dune now memoizes all errors when running in the file-watching mode. This speeds up incremental rebuilds but may be inconvenient in rare cases, e.g. if a build action fails due to a spurious error, such as running out of memory. Right now, the only way to force such actions to be rebuilt is to restart Dune, which clears all memoized errors. In future, we would like to provide a way to rerun all actions failed due to errors without restarting the build, e.g. via a Dune RPC call. (#4522, Andrey Mokhov)</p> </li> <li> <p>Remove <code>dune compute</code>. It was broken and unused (#4540, @jeremiedimino)</p> </li> <li> <p>No longer generate an approximate merlin files when computing the ocaml flags fails, for instance because they include the contents of a file that failed to build. This was a niche feature and it was getting in the way of making Dune's core better. (#4607, @jeremiedimino)</p> </li> <li> <p>Make Dune display the progress indicator in all output modes except quiet (#4618, @aalekseyev)</p> </li> <li> <p>Report accurate process timing information in trace mode (enabled with <code>--trace-file</code>) (#4517, @rgrinberg)</p> </li> <li> <p>Do not log <code>live_words</code> and <code>free_words</code> in trace file. This allows using <code>Gc.quick_stat</code> which does not scan the heap. (#4643, @emillon)</p> </li> <li> <p>Don't let command run by Dune observe the environment variable <code>INSIDE_EMACS</code> in order to improve reproducibility (#4680, @jeremiedimino)</p> </li> <li> <p>Fix <code>root_module</code> when used in public libraries (#4685, fixes #4684, @rgrinberg, @CraigFe)</p> </li> <li> <p>Fix <code>root_module</code> when used with preprocessing (#4683, fixes #4682, @rgrinberg, @CraigFe)</p> </li> <li> <p>Display Coq profile flags in <code>dune printenv</code> (#4767, @ejgallego)</p> </li> <li> <p>Introduce mdx stanza 0.2, requiring mdx >= 1.9.0, with a new generic <code>deps</code> field and the possibility to statically link <code>libraries</code> in the test executable. (#3956, #5391, fixes #3955)</p> </li> <li> <p>Improve lookup of optional or disabled binaries. Previously, we'd treat every executable with missing libraries as optional. Now, we treat make sure to look at the library's optional or enabled_if status (#4786).</p> </li> <li> <p>Always use 7 char hash prefix in build info version (#4857, @jberdine, fixes #4855)</p> </li> <li> <p>Allow to explicitly disable/enable the use of <code>dune subst</code> by adding a new <code>(subst <disable|enable>)</code> stanza to the <code>dune-project</code> file. (#4864, @kit-ty-kate)</p> </li> <li> <p>Simplify the way <code>dune</code> discovers the root of the workspace. It now stops at the first <code>dune-workspace</code> file it encounters, and fails if it finds neither a <code>dune-workspace</code> nor a <code>dune-project</code> file (#4921, fixes #4459, @jeremiedimino)</p> </li> <li> <p>Dune no longer reads installed META files for libraries distributed with the compiler, instead using its own internal database. (#4946, @nojb)</p> </li> <li> <p>Add support for <code>(empty_module_interface_if_absent)</code> in executable and library stanzas. (#4955, @nojb)</p> </li> <li> <p>Add support for <code>%{bin-available:...}</code> (#4995, @jeremiedimino)</p> </li> <li> <p>Make sure running <code>git</code> or <code>hg</code> in a sandboxed action, such as a cram test cannot escape the sandbox and pick up some random git or mercurial repository on the file system (#4996, @jeremiedimino)</p> </li> <li> <p>Allow <code>%{read:...}</code> in more places such as <code>(enabled_if ...)</code> (#4994, @jeremiedimino)</p> </li> <li> <p>Run each action in its own process group so that we don't leave stray processes behind when killing actions (#4998, @jeremiedimino)</p> </li> <li> <p>Add an option <code>expand_aliases_in_sandbox</code> (#5003, @jeremiedimino)</p> </li> <li> <p>Allow to cancel the initial scan via Control+C (#4460, fixes #4364 @jeremiedimino)</p> </li> <li> <p>Add experimental support for directory targets (#3316, #5025, Andrey Mokhov), enabled via <code>(using directory-targets 0.1)</code> in <code>dune-project</code>.</p> </li> <li> <p>Delete old <code>promote-into</code>, <code>promote-until-clean</code> and <code>promote-until-clean-into</code> syntax (#5091, Andrey Mokhov).</p> </li> <li> <p>Add link_flags in the env stanza (#5215)</p> </li> <li> <p>Bootstrap: ignore errors when trying to remove generated files. (#5407, @damiendoligez)</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/2022-01-28-dune-2.9.3">Dune 2.9.3</a> </h2> <time datetime="2022-01-28" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">28 Jan 2022</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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"> <details> <summary>See full changelog</summary> <ul> <li>Disable warning for deprecated Toploop functions used in dune files written in OCaml syntax. Restores 4.02 compatibility. (#5381, @nojb)</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/2022-01-23-dune-2.9.2">Dune 2.9.2</a> </h2> <time datetime="2022-01-23" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">23 Jan 2022</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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"> <details> <summary>See full changelog</summary> <ul> <li> <p>Fix missing -linkall flag when linking library dune-sites.plugin ( #4348, @kakadu, @bobot, reported by @kakadu)</p> </li> <li> <p>No longer reference deprecated Toploop functions when using dune files in OCaml syntax. (#4834, fixes #4830, @nojb)</p> </li> <li> <p>Use the stag format API to be compatible with OCaml 5.0 (#5351, @emillon).</p> </li> <li> <p>Fix post-processing of dune-package (fix #4389, @strub)</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/2021-09-08-dune-2.9.1">Dune 2.9.1</a> </h2> <time datetime="2021-09-08" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">08 Sep 2021</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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>Dear all,</p> <p>on behalf of the Dune team I'm pleased to announce the release of Dune 2.9.1.</p> <p>This is a minor release, fixing an important problem with opam file generation when <code>(lang dune 2.9)</code> was set, and a few other minor fixes.</p> <details> <summary>See full changelog</summary> <ul> <li> <p>Don't use <code>subst --root</code> in Opam files (https://github.com/ocaml/dune/pull/4806, @MisterDA)</p> </li> <li> <p>Fix compilation on Haiku (https://github.com/ocaml/dune/pull/4885, @Sylvain78)</p> </li> <li> <p>Allow depending on <code>ocamldoc</code> library when <code>ocamlfind</code> is not installed. (https://github.com/ocaml/dune/pull/4811, fixes https://github.com/ocaml/dune/issues/4809, @nojb)</p> </li> <li> <p>Fix <code>(enabled_if ...)</code> for installed libraries (https://github.com/ocaml/dune/pull/4824, fixes https://github.com/ocaml/dune/issues/4821, @dra27)</p> </li> <li> <p>Create more future-proof opam files using <code>--promote-install-files=false</code> (https://github.com/ocaml/dune/pull/4860, @bobot)</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/2021-07-01-dune-2.9.0">Dune 2.9.0</a> </h2> <time datetime="2021-07-01" class="block mt-3 font-sans text-sm text-content dark:text-dark-content">01 Jul 2021</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-primary dark:bg-dark-primary text-white dark:text-dark-white hover:bg-primary_dark dark:hover:bg-dark-card_hover">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>Dear all, on behalf of the Dune team I'm pleased to announce the release of Dune 2.9.0. This is the last release on the Dune 2.x series and could be considered a maintenance release as it mostly consists on bug fixes and miscellaneous tweaks and features for sites, instrumentation, and mdx support.</p> <details> <summary>See full changelog</summary> <ul> <li> <p>Add <code>(enabled_if ...)</code> to <code>(mdx ...)</code> (https://github.com/ocaml/dune/pull/4434, @emillon)</p> </li> <li> <p>Add support for instrumentation dependencies (https://github.com/ocaml/dune/pull/4210, fixes https://github.com/ocaml/dune/issues/3983, @nojb)</p> </li> <li> <p>Add the possibility to use <code>locks</code> with the cram tests stanza (https://github.com/ocaml/dune/pull/4480, @voodoos)</p> </li> <li> <p>Allow to set up merlin in a variant of the default context (https://github.com/ocaml/dune/pull/4145, @TheLortex, @voodoos)</p> </li> <li> <p>Add <code>(package ...)</code> to <code>(mdx ...)</code> (https://github.com/ocaml/dune/pull/4691, fixes https://github.com/ocaml/dune/issues/3756, @emillon)</p> </li> <li> <p>Handle renaming of <code>coq.kernel</code> library to <code>coq-core.kernel</code> in Coq 8.14 (https://github.com/ocaml/dune/pull/4713, @proux01)</p> </li> <li> <p>Fix generation of merlin configuration when using <code>(include_subdirs unqualified)</code> on Windows (https://github.com/ocaml/dune/pull/4745, @nojb)</p> </li> <li> <p>Fix bug for the install of Coq native files when using <code>(include_subdirs qualified)</code> (https://github.com/ocaml/dune/pull/4753, @ejgallego)</p> </li> <li> <p>Allow users to specify install target directories for <code>doc</code> and <code>etc</code> sections. We add new options <code>--docdir</code> and <code>--etcdir</code> to both Dune's configure and <code>dune install</code> command. (https://github.com/ocaml/dune/pull/4744, fixes https://github.com/ocaml/dune/issues/4723, @ejgallego, thanks to @JasonGross for reporting this issue)</p> </li> <li> <p>Fix issue where Dune would ignore <code>(env ... (coq (flags ...)))</code> declarations appearing in <code>dune</code> files (https://github.com/ocaml/dune/pull/4749, fixes https://github.com/ocaml/dune/issues/4566, @ejgallego @rgrinberg)</p> </li> <li> <p>Disable some warnings on Coq 8.14 and <code>(lang coq (>= 0.3))</code> due to the rework of the Coq "native" compilation system (https://github.com/ocaml/dune/pull/4760, @ejgallego)</p> </li> <li> <p>Fix a bug where instrumentation flags would be added even if the instrumentatation was disabled (@nojb, https://github.com/ocaml/dune/pull/4770)</p> </li> <li> <p>Fix https://github.com/ocaml/dune/issues/4682: option <code>-p</code> takes now precedence on environement variable <code>DUNE_PROFILE</code> (https://github.com/ocaml/dune/pull/4730, https://github.com/ocaml/dune/pull/4774, @bobot, reported by @dra27 https://github.com/ocaml/dune/issues/4632)</p> </li> <li> <p>Fix installation with opam of package with dune sites. The <code>.install</code> file is now produced by a local <code>dune install</code> during the build phase (https://github.com/ocaml/dune/pull/4730, https://github.com/ocaml/dune/pull/4645, @bobot, reported by @kit-ty-kate https://github.com/ocaml/dune/issues/4198)</p> </li> <li> <p>Fix multiple issues in the sites feature (https://github.com/ocaml/dune/pull/4730, https://github.com/ocaml/dune/pull/4645 @bobot, reported by @Lelio-Brun https://github.com/ocaml/dune/issues/4219, by @Kakadu https://github.com/ocaml/dune/issues/4325, by @toots https://github.com/ocaml/dune/issues/4415)</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&t=dune" 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&t=dune" 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&t=dune" 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> <a href="/changelog?p=2&t=dune" 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>