This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,3 @@
|
|||
(executables
|
||||
(names foo1 foo2)
|
||||
(libraries dune-action-plugin))
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
open Dune_action_plugin.V1
|
||||
|
||||
let path = Path.of_string "some_file1"
|
||||
let action = read_file ~path |> stage ~f:(fun data -> write_file ~path ~data)
|
||||
let () = run action
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
open Dune_action_plugin.V1
|
||||
|
||||
let path = Path.of_string "some_file2"
|
||||
|
||||
let action =
|
||||
let open Dune_action_plugin.V1.O in
|
||||
write_file ~path ~data:"Hello from some_file2!"
|
||||
|> stage ~f:(fun () ->
|
||||
let+ data = read_file ~path in
|
||||
print_endline data)
|
||||
;;
|
||||
|
||||
let () = run action
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(cram
|
||||
(deps
|
||||
(glob_files bin/*.exe)))
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
$ cat > dune-project << EOF
|
||||
> (lang dune 2.0)
|
||||
> (using action-plugin 0.1)
|
||||
> EOF
|
||||
|
||||
$ cat > dune << EOF
|
||||
> (rule
|
||||
> (target some_file1)
|
||||
> (action
|
||||
> (dynamic-run ./foo1.exe)))
|
||||
> \
|
||||
> (rule
|
||||
> (target some_file2)
|
||||
> (action
|
||||
> (dynamic-run ./foo2.exe)))
|
||||
> EOF
|
||||
|
||||
$ cp ./bin/foo1.exe ./
|
||||
$ cp ./bin/foo2.exe ./
|
||||
|
||||
$ dune build some_file1
|
||||
Error: Dependency cycle between:
|
||||
_build/default/some_file1
|
||||
[1]
|
||||
|
||||
$ dune build some_file2
|
||||
Error: Dependency cycle between:
|
||||
_build/default/some_file2
|
||||
[1]
|
||||
Loading…
Add table
Add a link
Reference in a new issue