Quantcast
Channel: OCaml - Topics tagged dune
Browsing all 517 articles
Browse latest View live

Dune rules, library targets and inline test runners

Is there a simpler way than doing the following to get the path of an inline test runner to a given source file (a test in a source file): I know the path to be something like...

View Article


How can I reference a system call using ctypes-cstub and dune?

Context: I have a stream of file descriptors as text that I want to consume, parse, and do unix-y things like dup2/close/open on in OCaml. The stdlib’s Unix module does not have a way to convert a...

View Article


Newbie problem: "Error: Unbound module" with Petrol

I’m new to OCaml and interested in using Petrol to interact with an sqlite3 database. To start things out, I’m trying to run the first example in the Petrol readme.md. In particular, I want to build...

View Article

`(enabled_if (installed package))` in Dune?

Hi! Is there a booleans syntax to check for installed packages? To have an enabled_if test that mirrors a select stanza in a library. Thanks! 1 post - 1 participant Read full topic

View Article

Trying to get Cacti example working

I am extremely frustrated and hoping someone can help me. I am trying to get the example code in the Caqti github working working. It’s for a project they call bikereg. Here are the steps I take: dune...

View Article


Image may be NSFW.
Clik here to view.

With-dkml ocamlopt ... graphics.cmxa

Hello, I get always the same problem when I want to like OCaml : the graphics problem. (Like Why is building Ocaml projects still so hard? - #7 by yawaramin For me 23 years of frustrating with...

View Article

Dune-project developer workflow confusion

When we set up a new dune project with its own local opam switch for sandboxed development, the workflow doesn’t seem right. Unless they know exactly what to do here, I feel like the developer would...

View Article

Learning OCaml - a few tooling questions

I’ve created a new dune project (with dune init project <proj_name>) for the sake of solving all learning exercises with the hoped-for comfort of automated build system. So far I had no need to...

View Article


Run (preprocess ..) conditionally in dune

I’m building a library that contains inline tests with ppx_expect, and I’d like to be able to run ppx_expect only when dune runtest is called. The reason is that I’ve defined ppx-expect as a with-test...

View Article


Opam install does not install dependencies automatically

Hi, I’m building a project with opam and dune. According to the documentation of opam, command opam install . --deps-only --working-dir should install all the dependencies for me, but it didn’t do...

View Article

Image may be NSFW.
Clik here to view.

Opam init Fetching repository information fails trying to remove /.opam/repo

I am running this on a remote server from my school and cannot initialize opam. It claims it cannot remove the .opam directory. I have tried deleting it before running and it does not claim to have...

View Article

How do dune libraries and library dependencies work?

It took me a while to learn this, but I now understand that “library” is an ocaml term, not just a dune term, and that dune turns a library stanza into a library file, also called an archive file,...

View Article

Image may be NSFW.
Clik here to view.

Ahrefs is now built with Melange

Hello! Since last September, the Melange, Dune, and Ahrefs development teams have been working to enhance the integration between Dune and Melange. As a company that uses a lot of OCaml in the...

View Article


Capnproto functor inlining

I am trying to build a library that generates a capnproto schema from a file called hs_api.capnp I get an error from the generated file: File "lib/hs_api.ml", lines 444-1243, characters 0-14: 444 |...

View Article

How to compile OCaml program on Linux for running on FreeBSD

I have written a simple web application using OCaml and the Opium library. Is it possible to use either ocamlc or ocamlopt to compile the program on Ubuntu Linux in such a way that the program will...

View Article


Dune: evaluating an expression before printing its boolean value

In my dune file, I have a rule similar to this: (rule (deps (universe)) (targets "foo") (action (with-stdout-to "foo" (echo "a " (= 1 2) "\n"))) ) But the above does not parse (Error: Unexpected...

View Article

Dune: how to deal with opam extra-source?

Hi OCaml Dune experts, I’ve been trying to adopt Dune as the build system for a followup to my Orsetto project, and it’s going okay, but I haven’t yet tried to deal with the problem of the...

View Article


Image may be NSFW.
Clik here to view.

Building and Debugging a Simple Ocaml Program

Hi all, I am trying to build a basic program using the Ocaml language. However, I don’t know how to proceed with building and debugging it. Could you please suggest a valid document link or GitHub...

View Article

Enhancing Ocaml Debugging Experience in Visual Studio Code

Hi all, Ocaml debugger for Visual Studio Code I am trying to provide full language support for Ocaml in Visual Studio Code. I have already installed this extension. Now, I want to debug my Ocaml...

View Article

Image may be NSFW.
Clik here to view.

Seeking Guidance on Compiling an OCaml Program

Hi all, I am trying to compile a basic program using the Ocaml language in the mina folder.However, I don’t know how to proceed with the compilation process. Could you please suggest a valid document...

View Article
Browsing all 517 articles
Browse latest View live