40 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
124
views
Conditional library dependencies in dune-project
This seems like it should be obvious bug how do I have a conditional dependency in dune-project? Specifically I want to depend on a library but only on Unix-like systems:
(package
(name foo)
(...
Timmmm's user avatar
- 99.3k
3
votes
1
answer
83
views
Adding C and C++ files to a dune build of ocaml app
I'm trying to port an open source existing ocaml app from Makefiles to dune. The application includes some C and C++ stubs. I tried to add a test.c file in a library like this:
(library
(name cdk)
...
0
votes
0
answers
144
views
Calculate marketcap of a token in Dune Analytics
For an use case need to know the market cap of few coins across various blockchains. Using Dune analytics for this purpose but seems there is no direct way to know the market cap of coin in a ...
2
votes
2
answers
108
views
How can OCaml dune test program find test input files?
── test
├── dune
├── test_program.ml
└── foo_files
├── foo_a
└── foo_b
How can test_program find the files under folder foo_files when run using dune test?
I can see that ...
1
vote
1
answer
523
views
Left side of LIKE expression must evaluate to a varchar (actual: varbinary). What's an alternative to converting from varbinary to varchar?
I have the following query on dune.com:
SELECT
th.value / 1e18 as amount,
tr.success,
th."from",
th.to,
tr.hash,
tr.data,
FROM
table1 tr
table2 th ON tr.hash = th.evt_hash
...
0
votes
1
answer
165
views
Unbound value error for custom module function
I’m working on a project in OCaml using Dune, and I’m encountering an "Unbound value" error for a function defined in a custom module. I’ve ensured that the module is correctly defined and imported, ...
-1
votes
1
answer
227
views
How to debug OCaml dune test program?
Let's say I:
dune init proj foobar
cd foobar
Then modify test/test_foobar.ml to be:
let () = print_endline "First"
let () = print_endline "Second"
let () = print_endline "...
0
votes
1
answer
331
views
How to use `dune test` for a program which reads files from the local directory?
I have a project built in Dune, with the structure
| project_dir
-| bin
| dune
| main.ml
-| lib
| dune
| libfile.ml
-| test
| dune
| test.ml
| data.csv
The libfile.ml reads ...
Addem's user avatar
- 4,013
0
votes
2
answers
236
views
Why can't dune recognize ppx_jane?
I am now writing a project in OCaml v4.06, and I have installed ppx_jane v0.11.0. Actually the environment is based on a docker image.
Now here is the dune file
(menhir
(modules parser))
(ocamllex ...
0
votes
1
answer
482
views
Installing Dune with the help of Opam
I have somehow managed to install Opam on MSYS2 on Windows.
When I open the MSYS2 MING64 (the blue one) shell and enter
opam --version
it tells me that it is installed.
When I run
opam install dune
,...
-1
votes
1
answer
255
views
Dune-SDK-Unable to parse query or install Dune-sdk
I'm trying to retrieve results from Dune Analytics. I have already retrieved the Dune API.
However, I'm unable to query it.
Can someone help?
I'm also unable to install Dune-sdk and can't find the ...
0
votes
0
answers
153
views
How to include Z3 in Dune project?
I've been using ocamlbuild to build my projects, but OCaml has abandoned ocamlbuild so I wanted to dunify my projects. I'm trying to compile a project with the opam Z3 package. However, I'm ...
1
vote
1
answer
846
views
Token Holder History By Date Query In Dune Analytics
I'm trying to create a simple query for a token in Dune Analytics. The purpose of the query is to show token holder history by date.
Here is the code. Can anyone fix it?
SELECT
DATE_TRUNC('day', ...
0
votes
1
answer
99
views
How can I add the -ml flag (or any flag, really) to ocamllex in a dune file?
Here is my current dune file:
(library
(name parsing)
(libraries toto fmt menhirLib)
(modules parser lexer lex_and_parse)
)
(ocamllex lexer)
(menhir
(modules parser)
(flags --explain -v))
I know ...
1
vote
1
answer
299
views
How to cast uint256 to varchar in DuneSQL?
How to cast uint256 to varchar in DuneSQL?
Here is an example query
Here is an output
Error: Line 36:11: Cannot cast array(uint256) to uint256 at line 36, position 11 [Execution ID: ...