[ANN] Dune dev meeting
Hi We are organizing a new public Dune dev meeting on Wednesday, July, 24th at 10am CET. It will be one hour long. Whether you are a maintainer, a regular contributor, a new joiner or just curious,...
View Article[ANN] Dune Developer Preview Updates
Hi folks! Just wanted to share some of the work the Dune has been up to lately re: the Developer Preview we announced here – we’ll be using this thread to share more updates as things go. As always,...
View Article"dunelongcmd" Linking Error on Windows using ocamlopt
Hello everyone, Because Opam now supports Windows I have experimented with moving my Ocaml-Workspaces from WSL into Windows proper. This was successful and on my laptop there was a noticeable...
View ArticleIs there an easy way to tell opam or dune that a library dependency is...
Hello, I am thinking about opam packages which rely on some system-wide installation of a dependency. E.g. nlopt-ocaml relies on nlopt being installed in the right place. Is there a way to support...
View ArticleImproved Toplevel Workflow in Dune
I’d like to highlight a new toplevel feature introduced in the recently released dune 3.6.0. We have the new top-module subcommand for loading modules without hiding their interface behind their mli....
View ArticleWhy does clarifying the namespace lead to unbound error but not adding the...
let file = "example.dat" let message = "Hello!" let () = (* Write message to file *) let oc = open_out file in (* create or truncate file, return channel *) Printf.fprintf oc "%s\n" message; (* write...
View ArticleInconsistencies in dune Warnings
I have my dune-workspace configured with (dev (flags (:standard -warn-error +A-26-27-K-58)) It seems like dune is caching module builds with warnings so subsequent rebuilds aren’t showing warnings...
View ArticleError: unbound module for local import of dune package
Hi, I have written a library “ocaml_component_framework” with dune intended to be used locally (in another repo that does not use dune but a legacy makefile). When I run “opam pin add .” it runs, I...
View ArticleIs opam using the dune cache when building packages?
I can’t seem to figure this out. I have enabled the dune cache in ~/.cache/dune. This directory grows in size when I do dune build, so it seems to be working. However, if I nuke the cache and install...
View Article[ANN] Dune 3.17
The Dune team is happy to announce the release of Dune 3.17.0! Among the list of changes, this minor release enables the Dune cache by default for known-safe operations, adds out-of-the-box support...
View ArticlePreprocess causes "Multiple rules generated for...
Hi everyone, when I write two executable stanza in dune file for “hello world” program, dune build is ok. This error occures when preprocess are added to both exectables below. Any ideas how to let...
View ArticleForeign_archives in dune really seem to want a dll
I’m trying to include my self-built library (let’s call it libx.a), but when I include it in a “foreign_archives” stanza (foreign_archives ../my-library/x), dune really wants a dynamic library...
View Article[ANN] "Cram tests: a hidden gem of dune" and "Snapshot tests for your own ppx"
Hi, I wrote 2 blog posts about cram tests and It’s a good idea to share them together. Cram tests: a hidden gem of dune I’m a strong advocate of unit tests, I can confidently say that it has saved me...
View ArticleDune, emacs compilation error, and setting the directory in actions
Hello, TL/DR: compiling a file using an action in dune seem to run directly in the directory where the dependency lives, breaking error reporting in emacs. When compiling an OCaml file for a project,...
View ArticleEnabling and disabling preprocessors with dune
Is it possible to enable and disable preprocessors with dune actions, profiles, or dune-workspace? My use case is that I would like to use a preprocessor when I compile with dune build...
View Article[Real world Ocaml] How do I import core_unix time?
So, I’ve been following Real World OCaml, the 2nd edition and I hit a block I’m afraid I cannot overcome with google, documentation or AI help. The code in question: open Core let () =...
View ArticleIncr_dom installing dependencies?
Hey all, I’m currently a sophomore in college and am completely new to OCaml trying to run the helloworld example with incr_dom from here. I’m currently in the helloworld working directory, am running...
View ArticleLinking problem in compiling my binding of Allegro 5
Hello. I am working on a binding of Allegro 5, a C library similar to SDL, aimed at video games. It compiles well with my default switch which uses OCaml 5.2, but I can’t have it to compile with OCaml...
View ArticleInvalid cross-device link when using Eio.Path.load
I am getting the following error when using Eio.Path.load: Fatal error: exception Eio.Io Fs Permission_denied Unix_error (Invalid cross-device link, "openat2", ""), examining...
View ArticleInstalling dune in opam Debian docker container on arm host for platform amd64
On an apple silicon macos, given the following repro.dockerfile: FROM ocaml/opam:debian-ocaml-5.1 ENV DEBIAN_FRONTEND=noninteractive RUN opam install dune.3.16.0 -y running docker build -f...
View ArticleDoes dune support user-defined variables?
Like makefile, we can define custom variables. But I didn’t find out how to do so in dune file. Does anyone know whether dune support this? 3 posts - 3 participants Read full topic
View ArticleHow to generate different code based on an environmental variable at build time
I would like to read a OCaml variable, based on an environmental variable that was passed at build time. Currently I am doing the following: env_gen.ml let () = let env = Sys.getenv_opt "MY_ENV" |>...
View ArticleDune build compilation error
dune build File "bin/dune", line 3, characters 7-11: 3 | (name main) ^^^^ /bin/bash: C:UserschukwAppDataLocalTempbuild_a3f8e9_dunelongcmdebe3b0: No such file or directory ** Fatal error: Error during...
View ArticleDunolint status update
To my fellow OCaml & Dune users, A while ago, I mentioned that I was using an internal tool to help me maintain the dune files of my monorepo. This tool wasn’t really designed to be shared from...
View ArticleDune Compilation Error on Setting Up postgresql
I am facing an error message trying to use postgres, caqti on my project, but i am getting this error message, when i try, dune build. dune build File "bin/dune", line 3, characters 7-11: 3 | (name...
View ArticleJane Street Base changes the semantics of String.concat on my MacOS system
Hello, I am trying to learn OCaml and I have installed the binary OCaml-5.3.0 distribution on my MacOS where “uname -a” gives Darwin Kernel Version 20.6.0: Thu Sep 29 20:15:11 PDT 2022;...
View ArticleHelp wanted: make ppx_expect bazel-friendly
I just discovered that ppx_expect expects that source files are located in the directory from which the test runner was launched. That is never the case under Bazel. I can’t think of a workaround; I...
View ArticleInstalling shell completion file in an opam package
I’ve been working on a simple library to automatically generate shell completion files from spec for the Arg module. I’ve been having trouble figuring out how to properly install these completions...
View ArticleNewbie dune question
I’m trying to learn dune, and am finding that there’s a lot to learn. Can someone explain to me, or point me to the relevant dune docs, why it works this way: Here’s what I have done: Created a new...
View ArticleUsing dune with git submodules
I have two dune projects and I would like one to include the other as a git submodule. Thus, both projects have their own dune-project file, and (after updating the submodule) one project will be a...
View Article