Fix mod_dep for reason conversion, add mod_dep.pdf

Summary:
Generation of the module dependency graph was broken (all IR modules
were omitted) by the reason conversion.

Reviewed By: cristianoc

Differential Revision: D3541395

fbshipit-source-id: e5af125
master
Josh Berdine 9 years ago committed by Facebook Github Bot 1
parent b9384aab2e
commit e8fd648fe8

1
.gitignore vendored

@ -120,3 +120,4 @@ infer/src/.project
/dependencies/ocamldot/ocamldot
/dependencies/ocamldot/ocamldot.ml
/infer/src/mod_dep.dot
/infer/src/mod_dep.pdf

@ -231,14 +231,19 @@ $(DEPENDENCIES_DIR)/ocamldot/ocamldot:
roots:=Infer Inferanalyze CMain JMain Inferprint
src_dirs:=$(shell find * -type d)
src_files:=$(shell find $(src_dirs) -regex '.*\.ml\(i\)*' -not -path facebook/scripts/eradicate_stats.ml)
ml_src_files:=$(shell find $(src_dirs) -regex '.*\.ml\(i\)*' -not -path facebook/scripts/eradicate_stats.ml)
re_src_files:=$(shell find $(src_dirs) -regex '.*\.re\(i\)*')
inc_flags:=$(foreach dir,$(src_dirs),-I $(dir))
root_flags:=$(foreach root,$(roots),-r $(root))
mod_dep.dot: $(DEPENDENCIES_DIR)/ocamldot/ocamldot $(src_files)
ocamldep.opt $(inc_flags) $(src_files) \
mod_dep.dot: $(DEPENDENCIES_DIR)/ocamldot/ocamldot $(ml_src_files) $(re_src_files)
{ ocamldep.opt $(inc_flags) -ml-synonym .re -mli-synonym .rei $(ml_src_files); \
ocamldep.opt $(inc_flags) -ml-synonym .re -mli-synonym .rei -pp refmt $(re_src_files); } \
| $(DEPENDENCIES_DIR)/ocamldot/ocamldot -lr $(root_flags) \
> mod_dep.dot
mod_dep.pdf: mod_dep.dot
dot -Tpdf -o mod_dep.pdf mod_dep.dot
define gen_atdgen_rules
# generate files using atdgen
# parameters:
@ -326,6 +331,7 @@ endif
$(REMOVE) $(CLANG_ATDGEN_STUBS)
$(REMOVE) $(INFER_CLANG_FCP_MIRRORED_FILES)
$(REMOVE) mod_dep.dot
$(REMOVE) mod_dep.pdf
# convert to reason
%.re : %.ml

@ -10,6 +10,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
open! Utils;
type t = {
sum: float,
avg: float,

@ -10,6 +10,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
open! Utils;
type t;
let to_json: t => Yojson.Basic.json;

Loading…
Cancel
Save