This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,3 @@
|
|||
(executable
|
||||
(name main)
|
||||
(libraries otherlib vendored_lib pmodlib))
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(lang dune 3.5)
|
||||
(implicit_transitive_deps false)
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 3.5)
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
(library
|
||||
(name imp_lib))
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
let imp_x = 42
|
||||
type t
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(library
|
||||
(name otherlib)
|
||||
(libraries imp_lib))
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
type u = Imp_lib.t
|
||||
|
||||
let fromotherlib = 36
|
||||
let do_something () = ignore fromotherlib
|
||||
|
||||
include Imp_lib
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
val do_something : unit -> unit
|
||||
val fromotherlib : int
|
||||
|
||||
|
||||
include (module type of Imp_lib)
|
||||
type u = Imp_lib.t
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
print_int Othermod.(other + Otherlib.fromotherlib + Otherlib.imp_x);;
|
||||
print_int Vendored_lib.value;;
|
||||
print_int Pmodlib.x;;
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
let y = 36
|
||||
let other = 42 + y
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(library
|
||||
(name pmodlib)
|
||||
(private_modules pmod ))
|
||||
|
|
@ -0,0 +1 @@
|
|||
let x = 42
|
||||
|
|
@ -0,0 +1 @@
|
|||
include Pmod
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
$ mkdir bin
|
||||
$ cp $(which ocaml_index) bin/ocaml-index
|
||||
$ export PATH=bin:$PATH
|
||||
|
||||
$ dune exec ./main.exe
|
||||
1564242
|
||||
|
||||
The @check alias does not build indexes:
|
||||
(it might at some point if the process becomes fast-enough)
|
||||
|
||||
$ dune build @check
|
||||
|
||||
$ find . -name '*.ocaml-index' | sort
|
||||
|
||||
The @ocaml-index indexes the entire workspace, including librairies that might
|
||||
not be directly used and thus usually not built by @check:
|
||||
|
||||
$ dune build @ocaml-index
|
||||
|
||||
$ find . -name '*.ocaml-index' | sort
|
||||
./_build/default/.main.eobjs/cctx.ocaml-index
|
||||
./_build/default/implicit-lib/.imp_lib.objs/cctx.ocaml-index
|
||||
./_build/default/lib/.otherlib.objs/cctx.ocaml-index
|
||||
./_build/default/private-module/.pmodlib.objs/cctx.ocaml-index
|
||||
./_build/default/sub-project/.subprojectlib.objs/cctx.ocaml-index
|
||||
./_build/default/vendor/otherproject/.private_lib.objs/cctx.ocaml-index
|
||||
./_build/default/vendor/otherproject/.vendored_lib.objs/cctx.ocaml-index
|
||||
|
||||
|
||||
$ FILE=$PWD/main.ml
|
||||
$ printf "(4:File%d:%s)" ${#FILE} $FILE | dune ocaml-merlin |
|
||||
> sed -E "s/[[:digit:]]+:/\?:/g" | tr '(' '\n' | grep ":INDEX?"
|
||||
?:INDEX?:$TESTCASE_ROOT/_build/default/.main.eobjs/cctx.ocaml-index)
|
||||
?:INDEX?:$TESTCASE_ROOT/_build/default/implicit-lib/.imp_lib.objs/cctx.ocaml-index)
|
||||
?:INDEX?:$TESTCASE_ROOT/_build/default/lib/.otherlib.objs/cctx.ocaml-index)
|
||||
?:INDEX?:$TESTCASE_ROOT/_build/default/private-module/.pmodlib.objs/cctx.ocaml-index)
|
||||
?:INDEX?:$TESTCASE_ROOT/_build/default/sub-project/.subprojectlib.objs/cctx.ocaml-index)
|
||||
?:INDEX?:$TESTCASE_ROOT/_build/default/vendor/otherproject/.private_lib.objs/cctx.ocaml-index)
|
||||
?:INDEX?:$TESTCASE_ROOT/_build/default/vendor/otherproject/.vendored_lib.objs/cctx.ocaml-index)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(library
|
||||
(name subprojectlib)
|
||||
(public_name subprojectlib))
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
(lang dune 3.5)
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
let subproject_value = 42
|
||||
let () = print_int subproject_value
|
||||
|
|
@ -0,0 +1 @@
|
|||
(vendored_dirs *)
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
(library
|
||||
(name vendored_lib)
|
||||
(public_name vendored_lib)
|
||||
(modules vendored_lib))
|
||||
|
||||
(library
|
||||
(name private_lib) ; This private lib is not built when vendored
|
||||
(modules private_lib))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 2.0)
|
||||
|
|
@ -0,0 +1 @@
|
|||
let more = "less"
|
||||
|
|
@ -0,0 +1 @@
|
|||
let value = 42
|
||||
Loading…
Add table
Add a link
Reference in a new issue