Add failing reason for reason preprocessing
This commit is contained in:
parent
8d0efa347c
commit
91e96316b2
|
@ -5,7 +5,9 @@
|
|||
|
||||
(library
|
||||
((name rlib)
|
||||
(public_name rlib)))
|
||||
(public_name rlib)
|
||||
(preprocess
|
||||
(per_module ((action (run ./pp/reasononlypp.exe ${<})) (cppome))))))
|
||||
|
||||
;; we want to make sure that .rei files are present
|
||||
(alias
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
(jbuild_version 1)
|
||||
|
||||
(executable
|
||||
((name reasononlypp)))
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
let () =
|
||||
let fname = Sys.argv.(1) in
|
||||
if Filename.check_suffix fname ".re"
|
||||
|| Filename.check_suffix fname ".rei" then (
|
||||
let ch = open_in fname in
|
||||
let rec loop () =
|
||||
match input_line ch with
|
||||
| exception End_of_file -> ()
|
||||
| line -> print_endline line; loop () in
|
||||
loop ();
|
||||
close_in ch
|
||||
) else (
|
||||
Format.eprintf "%s is not a reason source@.%!" fname;
|
||||
exit 1
|
||||
)
|
|
@ -1,58 +1,19 @@
|
|||
$ $JBUILDER runtest -j1 --root .
|
||||
refmt bar.re.ml
|
||||
refmt cppome.re.ml
|
||||
ocamldep pp/reasononlypp.depends.ocamldep-output
|
||||
refmt hello.re.ml
|
||||
refmt pped.re.ml
|
||||
ocamlc rlib.{cmi,cmo,cmt}
|
||||
refmt cppome.re.mli
|
||||
refmt foo.re.mli
|
||||
refmt hello.re.mli
|
||||
refmt pped.re.mli
|
||||
ocamldep rlib.depends.ocamldep-output
|
||||
ocamlc pp/reasononlypp.{cmi,cmo,cmt}
|
||||
ocamlopt rlib.{cmx,o}
|
||||
ocamldep rlib.dependsi.ocamldep-output
|
||||
ocamlc rlib__Bar.{cmi,cmti}
|
||||
ocamlc rlib__Foo.{cmi,cmti}
|
||||
ocamlc rlib__Hello.{cmi,cmti}
|
||||
ocamlc rlib__Pped.{cmi,cmti}
|
||||
ocamlc rlib__Bar.{cmo,cmt}
|
||||
ocamlopt rlib__Bar.{cmx,o}
|
||||
ocamlc rlib__Foo.{cmo,cmt}
|
||||
ocamlopt rlib__Foo.{cmx,o}
|
||||
ocamlc rlib__Hello.{cmo,cmt}
|
||||
ocamlopt rlib__Hello.{cmx,o}
|
||||
ocamlc rlib__Pped.{cmo,cmt}
|
||||
ocamlopt rlib__Pped.{cmx,o}
|
||||
ocamlc rlib.cma
|
||||
ocamlopt rlib.{a,cmxa}
|
||||
ocamlopt rlib.cmxs
|
||||
lib: [
|
||||
"_build/install/default/lib/rlib/META" {"META"}
|
||||
"_build/install/default/lib/rlib/opam" {"opam"}
|
||||
"_build/install/default/lib/rlib/rlib__Bar.cmi"
|
||||
"_build/install/default/lib/rlib/rlib__Bar.cmx"
|
||||
"_build/install/default/lib/rlib/rlib__Bar.cmt"
|
||||
"_build/install/default/lib/rlib/rlib__Bar.cmti"
|
||||
"_build/install/default/lib/rlib/bar.mli"
|
||||
"_build/install/default/lib/rlib/rlib__Foo.cmi"
|
||||
"_build/install/default/lib/rlib/rlib__Foo.cmx"
|
||||
"_build/install/default/lib/rlib/rlib__Foo.cmt"
|
||||
"_build/install/default/lib/rlib/rlib__Foo.cmti"
|
||||
"_build/install/default/lib/rlib/foo.rei"
|
||||
"_build/install/default/lib/rlib/rlib__Hello.cmi"
|
||||
"_build/install/default/lib/rlib/rlib__Hello.cmx"
|
||||
"_build/install/default/lib/rlib/rlib__Hello.cmt"
|
||||
"_build/install/default/lib/rlib/rlib__Hello.cmti"
|
||||
"_build/install/default/lib/rlib/hello.rei"
|
||||
"_build/install/default/lib/rlib/rlib__Pped.cmi"
|
||||
"_build/install/default/lib/rlib/rlib__Pped.cmx"
|
||||
"_build/install/default/lib/rlib/rlib__Pped.cmt"
|
||||
"_build/install/default/lib/rlib/rlib__Pped.cmti"
|
||||
"_build/install/default/lib/rlib/pped.rei"
|
||||
"_build/install/default/lib/rlib/rlib.cmi"
|
||||
"_build/install/default/lib/rlib/rlib.cmx"
|
||||
"_build/install/default/lib/rlib/rlib.cmt"
|
||||
"_build/install/default/lib/rlib/rlib.ml-gen"
|
||||
"_build/install/default/lib/rlib/rlib.cma"
|
||||
"_build/install/default/lib/rlib/rlib.cmxa"
|
||||
"_build/install/default/lib/rlib/rlib.a"
|
||||
"_build/install/default/lib/rlib/rlib.cmxs"
|
||||
]
|
||||
ocamlopt pp/reasononlypp.{cmx,o}
|
||||
ocamlopt pp/reasononlypp.exe
|
||||
reasononlypp cppome.re.pp.ml (exit 1)
|
||||
(cd _build/default && ./pp/reasononlypp.exe cppome.re.ml) > _build/default/cppome.re.pp.ml
|
||||
cppome.re.ml is not a reason source
|
||||
[1]
|
||||
|
|
Loading…
Reference in New Issue