Quantcast
Browsing all 520 articles
Browse latest View live

Using a local version of lwt in my project?

Hi, for learning ocaml, I’m writing a program that uses GitHub - vbmithr/ocaml-websocket: Websocket library for OCaml and Lwt. My program is a websocket client. I’m investigating an issue where if the...

View Article


Dune wish list for 2023

How about we all try a slightly less serious discussion about tooling for once. I invite you to respond with a list of most desired features, most hated bugs, and anything else you might like to see...

View Article


How to use `menhir --explain` with dune?

I use the (menhir) stanza in dune to compile grammars, but I don’t know how to conveniently use the menhir --explain feature. The naïve approach of using (flags --explain) used to work before the...

View Article

Image may be NSFW.
Clik here to view.

Is there a ppxlib template repository somewhere? Should there be?

One hurdle to getting started with developing a ppx rewriter for use in another project seems to be that there’s little guidance in terms of how to turn it into an installable package (I’ve seen...

View Article

Is it possible to refer to the current display mode in a dune rule?

A subdirectory of my dune project contains C++ code that is compiled through cmake. This can be done easily via a custom rule, and I can translate dune’s profile into cmake’s BUILD_TYPE with an...

View Article


What Dune stanzas will create a .cmo?

I’m trying to debug a compiler I’ve written. To help with debugging, I’ve written print functions for some of its internal datatypes, and put them in a file called ‘print.ml’. I want to load them into...

View Article

Using files in tests with Dune

Hi folks, Often, when I write tests, I want to use separate files for, say, expected output rather than putting that in the .ml file of the tests. If I just create a file under test (i.e next to the...

View Article

Image may be NSFW.
Clik here to view.

[ANN] odep initial release

I’m glad to announce the initial release of odep – dependency graphs generator for OCaml modules, libraries and packages. Some months ago I was frustrated with the lack of such modern tool (list of...

View Article


Using ocamldebug with dune

I have a problem trying to use ocamldebug on programs compiled with dune. Suppose I have the following dune project: <root>/src/lib/foo.ml /dune <root>/example/main.ml /dune where foo.ml...

View Article


Using an executable as library in dune

I’m building a project using dune and I’m facing the following situation. Essentially, my project depends on another project, not developed by me, from which I want to use some parts of the source...

View Article

How to properly exclude directories from cram tests?

The documentation for cram mentions (cram (applies_to * \ foo bar) (deps ../foo.exe)) We use the Predicate Language to apply this stanza to all tests in this directory, except for foo.t and bar.t. But...

View Article

Libraries to link "just in case", such as threads

We just noticed that one of Frama-C’s tutorials, which tells users to try bogue on a simple plug-in, is broken due to the lack of threads in the libraries section of our dune file. Frama-C uses...

View Article

OCaml compiler/tools error message explanatory links (shortlinks)

Perhaps there has been some discussion of this, but I could find it after some quick searches here and in GitHub. I would like to float the idea of adding short, explanatory links to compiler error...

View Article


Making it possible to vendor an opam package inside a dune project

I’ve recently been doing some work to benchmark dune building a large monorepo. This has involved constructing a large monorepo by vendoring as many packages from the opam repository as I can. In this...

View Article

Is there a better technique to copy `cmi` files using dune?

Recently I have been working on making toplevels that run on browsers. There is a need to pack cmi files for merlin. It is conventional to use ppx_blob for the heavy lifting to actually pack the...

View Article


[ANN] Dune 3.7.0

The dune team is pleased to announce the release of Dune 3.7.0. As in the previous announce, here is a changelog split in several parts: changes to the dune executable itself (new commands or options,...

View Article

How to only build/check a single package?

I’m inside a large project with many internal packages. I just want to check/build one of the package. I’ve tried the following while inside the package folder containing the dune file: run dune build...

View Article


Dune 3.7.0's native support for watch mode on Windows (blog post)

The recently released Dune 3.7.0 includes native support for watch mode on Windows. This feature was implemented by a student, Uma Kothuri of the US, who interned at LexiFi last year for this project....

View Article

How to avoid having a bunch of opam files at the project root?

Hello, I must admit I haven’t looked deeply into the issue but I didn’t find an obvious solution, so hopefully, a solution will be posted here. Problem: Our growing OCaml project has many opam files...

View Article

Foreign_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
Browsing all 520 articles
Browse latest View live