Official documentation for Dune is available here: https://dune.readthedocs.io/en/latest/index.html
Questions tagged [dune]
30 questions
0
votes
0 answers
Using dune to copy files from one directory to another
I know about the copy_files stanza, but I'm stuck trying to copy files from one subdirectory to another (e.g. the root). Specifically, I'm trying to copy %{workspace_root}/static/ to _build/default/ instead of _build/default/static.
Doing so from…

s1gtrap
- 162
- 2
- 10
0
votes
1 answer
How can I see how dune is invoking the ocaml compiler?
I'd like to reproduce some of dune's functionality in buck2, but have no idea how to implement dune's functionality where a wrapped module can specify a library interface.
I'd like to see how dune is invoking ocaml tools such as ocamlopt.opt, to see…

Max Heiber
- 14,346
- 12
- 59
- 97
0
votes
0 answers
Calculating number of validators on dune
to find total validators on eth , i am using below logics :
SELECT sum(amount_staked) FROM staking_ethereum.deposits as a,
SELECT sum(amount)/1e9 FROM ethereum.withdrawals as b
and my output is (a-b)/32 , am i making a mistake ?
I saw some query…
0
votes
0 answers
In dune, doing a build check doesn't seem to find a large number of compiler errors
I usually use dune build @check to quickly check if my code can compile. I've run into a number of cases where the command returns a clean output, but doing a dune build . will return a large number of compiler errors.
Is there a reason for this, or…

David 天宇 Wong
- 3,724
- 4
- 35
- 47
0
votes
1 answer
How to only build/check a single package in OCaml?
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 @./check
the same command but with --root…

David 天宇 Wong
- 3,724
- 4
- 35
- 47
0
votes
3 answers
How does one pin/freeze a version of the dependencies of an opam project/package and then install the project with such specified dependencies?
How do we freeze an entire dependency tree/chain from an already working opam install?
I have a bunch of coq projects installed via opam right now. I'd like to figure out what commit they are using for their current install. I want to know this --…

Charlie Parker
- 5,884
- 57
- 198
- 323
0
votes
0 answers
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 code.
Here is more or less my project…

user2347300
- 39
- 1
- 1
- 6
0
votes
0 answers
How to filter after group by in this Dune Analytics example?
This dune analytics script is trying to 1) obtain the list of the most traded NFT projects in the last 30 days and 2) add a row of a single collection ("Wicked Ape Bone Club" - contract address = 0xbe6e3669464E7dB1e1528212F0BfF5039461CB82).
While it…

KubiK888
- 4,377
- 14
- 61
- 115
0
votes
1 answer
Dune SQL column with running totals and group by
I am trying to write a Dune analytics query using their native SQL language using the Dune v2 engine. I'm not very experienced in writing SQL queries - it's been 10+ years.
At the moment I have written the following query, which works as intended…

Zkoh
- 2,932
- 3
- 18
- 14
0
votes
1 answer
What is the namespace in utop for definitions in .ml file listed in dune's (executable ...) rule?
What is the namespace of the test0 definition in dune utop . environment, given the following ocaml code with dune build definition:
~/_ocaml_/n01$ cat bin/dune
(executable
(public_name n01)
(name main))
~/_ocaml_/n01$ cat bin/main.ml
let test0…

Krzysztof Kielak
- 108
- 6
0
votes
1 answer
Is there a way to to return one variable each from two separate tables, but only when two variables from each table match?
I have two separate queries that both work correctly. I have two common columns in each table "Day" and "Wallet". I have one table that returns (Day, Wallet, Withdrawals) and another that returns (Day, Wallet, Sales). I'd like to have a single…

Sevik
- 1
0
votes
2 answers
PostgreSQL: How to truncate and group timestamps?
I am working with a database and am using the following query:
SELECT
evt_block_time,
COUNT(*) filter (
WHERE
uniswap_version = 'v1'
) OVER (
ORDER BY
evt_block_time
) as v1_pairs,
COUNT(*) filter (
WHERE
…

Chris Miller
- 3
- 2
0
votes
1 answer
How can I create a query to display the development of new created ERC-20 contracts on Ethereum with Dune without counting duplicates?
I am trying to display the development of new created ERC-20 smart contracts on Ethereum. For this purpose I am using the Analytics platform Dune which provides a several databases for SQL querying.
My problem is the following one:
I have a table…

Chris
- 3
- 2
0
votes
1 answer
OCaml: dune build error after running `dune init exec`
I am new to OCaml, and I followed the tutorial to set up a developpement environment. I then tried the helloworld example with dune and OCaml but encoutered the following error:
$ dune init exe helloworld
Success: initialized executable component…

douyu
- 2,377
- 2
- 14
- 27
-1
votes
1 answer
Cannot install dune on MacOS for OUnit2
So, I need to install OUnit2 and I'm on a 2015 MacBook Pro running MacOS Monterey 12.6. I have homebrew, I have Ocaml, I have opam. Dune is one of Ounit2's dependencies, so obviously I need it to have OUnit2. However, this is what I get:
$ opam…

unhappycat
- 406
- 1
- 4
- 16