Skip to content
Permalink
Browse files
Remove unused global is_ide_mode
Summary: This global ref is never set to true, so we can remove it without changing behaviour.

Reviewed By: kmeht

Differential Revision: D13715538

fbshipit-source-id: d3d99f1feccc9a1732ade8e3f1260fa904277a0c
  • Loading branch information
Wilfred authored and hhvm-bot committed Jan 21, 2019
1 parent f8abf47 commit c122f8bf79321dfb0def4ee3f8fe7e5f7260003f
Showing with 5 additions and 28 deletions.
  1. +0 −6 hphp/hack/src/globals/dune
  2. +0 −11 hphp/hack/src/globals/ide.ml
  3. +0 −1 hphp/hack/src/naming/dune
  4. +1 −1 hphp/hack/src/naming/naming.ml
  5. +0 −1 hphp/hack/src/parser/dune
  6. +4 −8 hphp/hack/src/parser/full_fidelity_parser.ml
@@ -14,9 +14,3 @@
find
heap_shared_mem
sys_utils))

(library
(name global_ide)
(wrapped false)
(modules
ide))

This file was deleted.

@@ -63,7 +63,6 @@
(libraries
ast
global_autocomplete
global_ide
common
naming_attributes
naming_heap
@@ -282,7 +282,7 @@ end = struct
env

let make_typedef_genv tcopt cstrs tdef = {
in_mode = FileInfo.(if !Ide.is_ide_mode then Mpartial else Mstrict);
in_mode = FileInfo.Mstrict;
tcopt;
in_try = false;
in_finally = false;
@@ -191,7 +191,6 @@
little_magic_cache
parserSig)
(libraries
global_ide
parser_env
parser_smart_constructor)
(preprocess (pps ppx_deriving.std)))
@@ -188,14 +188,10 @@ let get_language_and_mode text =
if l < 2 || s.[0] <> '/' || s.[1] <> '/' then "" else
String.trim (String.sub s 2 (l - 2))
in
let mode =
try
let mode = List.hd (Str.split (Str.regexp " +") mode) in
FileInfo.parse_mode mode
with _ -> if language = hh then Some FileInfo.Mpartial else None in
match mode with
| Some FileInfo.Mstrict when !Ide.is_ide_mode -> Some FileInfo.Mpartial
| _ -> mode
try
let mode = List.hd (Str.split (Str.regexp " +") mode) in
FileInfo.parse_mode mode
with _ -> if language = hh then Some FileInfo.Mpartial else None
in
language, mode
)

0 comments on commit c122f8b

Please sign in to comment.