Closed rjbou closed 2 months ago
Maybe we need to update the doc. I don't remember what the make dev
target was supposed to do. What it should really be is:
make _boot/dune.exe
./dune.exe build @check
You won't be able to fully runtest because some tests need dependencies on other libraries. A simple way is to do:
opam install ./dune.opam
make dev-deps
This should install the correct deps in the existing switch rather than creating a new one using the dev version of Dune.
I hit the same issue today. Should we update the doc indeed? It does say to run make dev
first.
And we should probably also say to run make dev-deps
... or make dev-deps-sans-melange
since installing Melange failed for me after taking forever. Surprisingly, running the latter command complained about some Melange failures too.
It would be nice to have a small set of dependencies/tests sufficient for working on the build engine. Dune now supports a ton of stuff and installing everything and running all the tests locally seems like an overkill.
...and then the build still failed with pc-setup-dkml
and gh-dkml-action-yml
missing. Ugh.
Not sure why this issue was closed as "not planned". Clearly the Hacking doc and a bunch of stuff is currently broken/stale.
When opening an issue, following issue instructions i began the process to add a test & open PR. I followed the hacking instruction from an empty switch, but wasn't able to easily compile.
Expected Behavior
Update guidelines/makefile to ease install from scratch, on an empty environment.
Actual Behavior
hacking.rst
Following hacking guidelines, i went for the simple (on an empty switch).
make dev
buildsdune.exe
, but fails because of missing dependenciesHowever, it builds
dune.exe
, but checking that everything compile or launching test (the 2 other commands) fail as there is other missing dependencies (ppx_inline_test.config, ppx_inline_test.config, core_bench.inline_benchmarks, lwt, stdio, etc.).Reproduction
Using
make dev-switch
After discussion with @emillon, i was advised to use
make dev-switch
. Here it fails too, but for another reason: opam can't install dependencies at switch creation as they depend on dune.Reproduction
Using
make dev-switch
on an empty local switchFinally, I decided to create a local empty switch to not let the makefile create one, and go directly to dependencies install. It worked well! I was able to build dune, check everything, and run testsuite. The only remaining issue is a missing binary on a test:
node
Reproduction
However, it wasn't a blocker for new test addition.
Specifications
dune
(output ofdune --version
): main branch, e8ad4cd5db8b9b2ocaml
(output ofocamlc --version
): irrelevantAdditional information
Full log can be found here.
Thanks!