forked from ocaml/dune
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
"Select" rule prevent the case when we endup on require and forbiden empty. Skipping bigarray could result having require and forbiden empty that case is the same as no literals "(_ -> dummy)". Some test-cases for "Direct", "Re-export" and "Select" Signed-off-by: Alpha DIALLO <[email protected]> Signed-off-by: Etienne Millon <[email protected]>
- Loading branch information
1 parent
089579a
commit 87fff6c
Showing
13 changed files
with
75 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
let _c = Bigarray.C_layout_typ | ||
|
||
let () = Printf.eprintf "Welcome to a\n%!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(executable | ||
(name a) | ||
(libraries bigarray)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
let _c1 = B_lib.v | ||
let _c2 = Bigarray.C_layout_typ | ||
|
||
let () = Printf.eprintf "Welcome to b\n%!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
let v = Bigarray.C_layout_typ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
(library | ||
(name b_lib) | ||
(libraries (re_export bigarray)) | ||
(modules b_lib)) | ||
|
||
(executable | ||
(name b) | ||
(libraries b_lib) | ||
(modules b)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
let _c = Bigarray.C_layout_typ | ||
|
||
let () = Printf.eprintf "Welcome to c WITH bigarray support\n%!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
let () = Printf.eprintf "Welcome to c with nothing inferred\n%!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
let () = Printf.eprintf "Welcome to c WITHOUT bigarray support\n%!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(executable | ||
(name c) | ||
(libraries (select c.ml from (!bigarray -> c.nobigarray.ml) (bigarray -> c.bigarray.ml) ( -> c.dummy.ml)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(lang dune 3.0) | ||
|
||
(implicit_transitive_deps false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Bigarray library is included in the Standard libraries since OCaml 5.00.0. | ||
And now dune skip it by #5526 PR when included in libraries doing like "(libraries bigarray)". | ||
|
||
$ dummy="_build/default/c/c.dummy.ml" | ||
$ found="$(ocamlfind query bigarray -p-format)_found" | ||
$ cat > done.sh <<EOF | ||
> #!/usr/bin/env bash | ||
> if [[ "$found" != "bigarray_found" && -e $dummy ]]; then | ||
> echo "Success skipping bigarray" | ||
> elif [[ "$found" != "bigarray_found" && ! -e $dummy ]]; then | ||
> echo "Fail skipping bigarray" | ||
> else | ||
> echo "Success skipping bigarray" | ||
> fi | ||
> EOF | ||
$ dune build @install | ||
$ chmod +x done.sh | ||
$ ./done.sh | ||
Success skipping bigarray |