Skip to content

Commit

Permalink
Remove -open(Utils) compile flag hack
Browse files Browse the repository at this point in the history
Summary:public
Eliminate the use of the -open Utils command line option passed to the compiler in favor of `open! Utils` in each source file.  While slightly convenient, this option causes more headaches than it is worth with other tools e.g. merlin.

Reviewed By: jvillard

Differential Revision: D3168193

fb-gh-sync-id: 4285ef6
fbshipit-source-id: 4285ef6
  • Loading branch information
jberdine authored and Facebook Github Bot 0 committed Apr 12, 2016
1 parent 037b27d commit e1020c8
Show file tree
Hide file tree
Showing 285 changed files with 564 additions and 6 deletions.
4 changes: 0 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,3 @@ us a line at [email protected]. Thanks!
`infer/tests/codetoanalyze/` and
`infer/tests/{endtoend,frontend}/`. To run the all tests, execute
`make test`.

## Hacking

* Be aware that the build system implicitly opens the Utils module.
1 change: 0 additions & 1 deletion infer/.merlin
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ PKG str
PKG unix
PKG yojson
PKG zip
FLG -open Utils
FLG -principal -safe-string -short-paths -strict-formats -strict-sequence
FLG -w +a-4-9-40-41-42-45-48-50
2 changes: 2 additions & 0 deletions infer/src/IR/attributesTable.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

module F = Format
module L = Logging

Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/attributesTable.mli
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Module to manage the table of attributes. *)


Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/cfg.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

module L = Logging
module F = Format

Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/cfg.mli
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Control Flow Graph for Interprocedural Analysis *)

(** {2 ADT node and proc_desc} *)
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/cg.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Module for call graphs *)

module L = Logging
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/cg.mli
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Module for call graphs *)

type in_out_calls =
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/csu.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Internal representation of data structure for Java, Objective-C and C++ classes,
C-style structs struct and union,
And Objective C protocol *)
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/csu.mli
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Internal representation of data structure for Java, Objective-C and C++ classes,
C-style structs struct and union,
And Objective C protocol *)
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/ident.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Module for Names and Identifiers *)

module L = Logging
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/ident.mli
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Identifiers: program variables and logical variables *)

(** Program and logical variables. *)
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/location.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

module F = Format
module L = Logging

Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/location.mli
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Location in the original source file *)
type t = {
line: int; (** The line number. -1 means "do not know" *)
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/mangled.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Module for Mangled Names *)

module F = Format
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/mangled.mli
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Module for Mangled Names *)

(** Type of mangled names *)
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/procAttributes.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Attributes of a procedure. *)

module L = Logging
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/procAttributes.mli
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Attributes of a procedure. *)

type objc_accessor_type =
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/procname.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Module for Procedure Names *)

module L = Logging
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/procname.mli
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Module for Procedure Names. *)

(** Type of java procedure names. *)
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/pvar.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** The Smallfoot Intermediate Language *)

module L = Logging
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/pvar.mli
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Program variables. *)

module F = Format
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/sil.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** The Smallfoot Intermediate Language *)

module L = Logging
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/sil.mli
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** The Smallfoot Intermediate Language *)

module F = Format
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/tenv.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Module for Type Environments. *)

(** Hash tables on strings. *)
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/tenv.mli
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Module for Type Environments. *)

type t (** Type for type environment. *)
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/typename.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

module F = Format

(** Named types. *)
Expand Down
2 changes: 2 additions & 0 deletions infer/src/IR/typename.mli
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Named types. *)
type t =
| TN_typedef of Mangled.t
Expand Down
1 change: 0 additions & 1 deletion infer/src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ OCAMLBUILD_OPTIONS = \
-cflags -strict-sequence \
-cflags -w,$(OCAML_FATAL_WARNINGS)-4-9-40-41-42-45-48-50 \
-tag-line "<*{clang/clang_ast_*,backend/jsonbug_*}>: warn(-27-32-35-39)" \
-tag-line "not <**/{config,iList,utils}.*>: open(Utils)" \
-pkgs atdgen,extlib,oUnit,str,unix,yojson,zip

ifeq (@ENABLE_OCAML_ANNOT@,yes)
Expand Down
2 changes: 2 additions & 0 deletions infer/src/backend/DB.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Database of analysis results *)

module F = Format
Expand Down
2 changes: 2 additions & 0 deletions infer/src/backend/DB.mli
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Database of analysis results *)

(** {2 Filename} *)
Expand Down
2 changes: 2 additions & 0 deletions infer/src/backend/abs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Implementation of Abstraction Functions *)

module L = Logging
Expand Down
2 changes: 2 additions & 0 deletions infer/src/backend/abs.mli
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Implementation of Abstraction Functions *)

(** Abstraction rules discovered *)
Expand Down
2 changes: 2 additions & 0 deletions infer/src/backend/absarray.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Abstraction for Arrays *)

module L = Logging
Expand Down
2 changes: 2 additions & 0 deletions infer/src/backend/absarray.mli
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Abstraction for Arrays *)

(** Apply array abstraction and check the result *)
Expand Down
2 changes: 2 additions & 0 deletions infer/src/backend/autounit.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Generate unit tests automatically from specs *)

module L = Logging
Expand Down
2 changes: 2 additions & 0 deletions infer/src/backend/autounit.mli
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Generate unit tests automatically from specs *)

(** type of generated code *)
Expand Down
2 changes: 2 additions & 0 deletions infer/src/backend/buckets.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Classify bugs into buckets *)

module L = Logging
Expand Down
2 changes: 2 additions & 0 deletions infer/src/backend/buckets.mli
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Classify bugs into buckets *)

(** Classify the bucket of an error desc using Location.access and nullable information *)
Expand Down
2 changes: 2 additions & 0 deletions infer/src/backend/builtin.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Module for builtin functions with their symbolic execution handler *)

type args = {
Expand Down
2 changes: 2 additions & 0 deletions infer/src/backend/builtin.mli
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Module for builtin functions with their symbolic execution handler *)

type args = {
Expand Down
2 changes: 2 additions & 0 deletions infer/src/backend/callbacks.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

module L = Logging

(** Module to register and invoke callbacks *)
Expand Down
2 changes: 2 additions & 0 deletions infer/src/backend/callbacks.mli
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

(** Module to register and invoke callbacks *)

type proc_callback_args = {
Expand Down
2 changes: 2 additions & 0 deletions infer/src/backend/cluster.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)

open! Utils

module L = Logging
module F = Format

Expand Down
Loading

0 comments on commit e1020c8

Please sign in to comment.