-
Notifications
You must be signed in to change notification settings - Fork 469
dune-site does not work with opam #4198
Copy link
Copy link
Closed
Description
Expected Behavior
dune-site should work when used in a package installed by opam.
In my opinion the destination directory given by dune-site should always return exactly one directory:
- either
_build/install/default/<dir>when called from the source code by dune - or
../<dir>when called from a directory calledbin/(e.g._build/install/default/bin/or$prefix/bin) - default to
/usr/local/<dir>otherwise (or maybe give justNone)
Actual Behavior
The current implementation of dune-site does not work when the package in installed by opam.
The destination directory given by dune-site returns [] when the program is called directly without having called dune install before.
Reproduction
$ cat dune-project
(lang dune 2.8)
(using dune_site 0.1)
(package
(name test)
(sites (lib_root test)))
$ cat dune
(executable
(public_name test)
(libraries dune-site))
(generate_sites_module
(module test_libdir)
(sites test))
(install
(section (site (test test)))
(files a))
$ touch a
$ cat test.ml
let _ = List.hd Test_libdir.Sites.test
$ dune build -p test
$ ./_build/install/default/bin/test
Fatal error: exception Failure("hd")
Specifications
- Version of
dune(output ofdune --version): 2.8.2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels