From fe701a17ccb642249d1f6bf1bd79e9c3141ee913 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Fri, 2 Aug 2019 10:26:45 -0700 Subject: [PATCH] [diff] delete infer-diff Summary: It's not being worked on and is not in a state where it works. It would probably better to write this as a script of some kind or else resurrect this subcommand in a form where it behaves more like a script, ie fork/execs infer analyses instead of having them be function calls (but then it might as well *be* a script as it would likely be more flexible). In any case... youarealreadydead Reviewed By: ezgicicek Differential Revision: D16602417 fbshipit-source-id: d0d129539 --- Makefile | 2 - infer/man/man1/infer-full.txt | 62 ++++--------- infer/man/man1/infer.txt | 53 ++++------- infer/src/atd/InferCommand.ml | 3 +- infer/src/atd/InferCommand.mli | 1 - infer/src/base/CommandDoc.ml | 9 -- infer/src/base/Config.ml | 44 +-------- infer/src/base/Config.mli | 6 -- infer/src/base/Memcached.ml | 2 - infer/src/base/Memcached.mli | 3 - infer/src/base/ResultsDatabase.ml | 8 -- infer/src/base/ResultsDatabase.mli | 3 - infer/src/base/ResultsDir.ml | 10 -- infer/src/base/ResultsDir.mli | 3 - infer/src/infer.ml | 4 - infer/src/integration/Diff.ml | 93 ------------------- infer/src/integration/Diff.mli | 11 --- infer/src/integration/Driver.ml | 2 +- infer/src/integration/Driver.mli | 3 - infer/tests/build_systems/diff/Makefile | 26 ------ .../build_systems/diff/changed_files.txt | 1 - infer/tests/build_systems/diff/fixed.exp | 1 - infer/tests/build_systems/diff/introduced.exp | 1 - .../tests/build_systems/diff/preexisting.exp | 1 - .../diff_gen_build_script/Makefile | 28 ------ .../diff_gen_build_script/changed_files.txt | 2 - .../diff_gen_build_script/file_renamings.json | 6 -- .../diff_gen_build_script/fixed.exp | 1 - .../diff_gen_build_script/introduced.exp | 1 - .../diff_gen_build_script/preexisting.exp | 1 - 30 files changed, 40 insertions(+), 351 deletions(-) delete mode 100644 infer/src/integration/Diff.ml delete mode 100644 infer/src/integration/Diff.mli delete mode 100644 infer/tests/build_systems/diff/Makefile delete mode 100644 infer/tests/build_systems/diff/changed_files.txt delete mode 100644 infer/tests/build_systems/diff/fixed.exp delete mode 100644 infer/tests/build_systems/diff/introduced.exp delete mode 100644 infer/tests/build_systems/diff/preexisting.exp delete mode 100644 infer/tests/build_systems/diff_gen_build_script/Makefile delete mode 100644 infer/tests/build_systems/diff_gen_build_script/changed_files.txt delete mode 100644 infer/tests/build_systems/diff_gen_build_script/file_renamings.json delete mode 100644 infer/tests/build_systems/diff_gen_build_script/fixed.exp delete mode 100644 infer/tests/build_systems/diff_gen_build_script/introduced.exp delete mode 100644 infer/tests/build_systems/diff_gen_build_script/preexisting.exp diff --git a/Makefile b/Makefile index b300ea3c3..a66069cb2 100644 --- a/Makefile +++ b/Makefile @@ -34,8 +34,6 @@ BUILD_SYSTEMS_TESTS += \ clang_with_MD_flag \ deduplicate_template_warnings \ delete_results_dir \ - diff \ - diff_gen_build_script \ duplicate_symbols \ fail_on_issue \ j1 \ diff --git a/infer/man/man1/infer-full.txt b/infer/man/man1/infer-full.txt index b08766b01..7ad55424d 100644 --- a/infer/man/man1/infer-full.txt +++ b/infer/man/man1/infer-full.txt @@ -192,7 +192,7 @@ OPTIONS --changed-files-index file Specify the file containing the list of source files from which reactive analysis should start. Source files should be specified - relative to project root or be absolute See also infer-analyze(1) and infer-diff(1). + relative to project root or be absolute See also infer-analyze(1). --clang-biniou-file file Specify a file containing the AST of the program, in biniou format @@ -247,11 +247,6 @@ OPTIONS Costs report of the base revision to use for comparison See also infer-reportdiff(1). - --current-to-previous-script shell - Specify a script to checkout a previous version of the project to - compare against, assuming we are on the current version already. - See also infer-diff(1). - --custom-symbols json Specify named lists of symbols available to rules See also infer-analyze(1). @@ -269,8 +264,8 @@ OPTIONS --reports-include-ml-loc, --no-only-cheap-debug, --trace-error, --write-dotty, --write-html) (Conversely: --no-debug | -G) See also infer-analyze(1), infer-capture(1), infer-compile(1), - infer-diff(1), infer-events(1), infer-report(1), - infer-reportdiff(1), and infer-run(1). + infer-events(1), infer-report(1), infer-reportdiff(1), and + infer-run(1). --debug-level level Debug level (sets --bo-debug level, --debug-level-analysis level, @@ -279,26 +274,26 @@ OPTIONS - 1: verbose debugging enabled - 2: very verbose debugging enabled See also infer-analyze(1), infer-capture(1), infer-compile(1), - infer-diff(1), infer-events(1), infer-report(1), - infer-reportdiff(1), and infer-run(1). + infer-events(1), infer-report(1), infer-reportdiff(1), and + infer-run(1). --debug-level-analysis int Debug level for the analysis. See --debug-level for accepted values. See also infer-analyze(1), infer-capture(1), infer-compile(1), - infer-diff(1), infer-events(1), infer-report(1), - infer-reportdiff(1), and infer-run(1). + infer-events(1), infer-report(1), infer-reportdiff(1), and + infer-run(1). --debug-level-capture int Debug level for the capture. See --debug-level for accepted values. See also infer-analyze(1), infer-capture(1), infer-compile(1), - infer-diff(1), infer-events(1), infer-report(1), - infer-reportdiff(1), and infer-run(1). + infer-events(1), infer-report(1), infer-reportdiff(1), and + infer-run(1). --debug-level-linters int Debug level for the linters. See --debug-level for accepted values. See also infer-analyze(1), infer-capture(1), infer-compile(1), - infer-diff(1), infer-events(1), infer-report(1), - infer-reportdiff(1), and infer-run(1). + infer-events(1), infer-report(1), infer-reportdiff(1), and + infer-run(1). --no-default-checkers Deactivates: Default checkers: --biabduction, @@ -541,8 +536,7 @@ OPTIONS --force-delete-results-dir Activates: Do not refuse to delete the results directory if it doesn't look like an infer results directory. (Conversely: - --no-force-delete-results-dir) See also infer-capture(1), infer-compile(1), infer-diff(1), and - infer-run(1). + --no-force-delete-results-dir) See also infer-capture(1), infer-compile(1), and infer-run(1). --force-integration command Proceed as if the first argument after -- was command. Possible @@ -570,11 +564,6 @@ OPTIONS for frontend tests (also sets --print-types) (Conversely: --no-frontend-tests) See also infer-capture(1). - --gen-previous-build-command-script shell - Specify a script that outputs the build command to capture in the - previous version of the project. The script should output the - command on stdout. For example "echo make". See also infer-diff(1). - --generated-classes path Specify where to load the generated class files See also infer-capture(1). @@ -584,20 +573,20 @@ OPTIONS --help Show this manual See also infer-analyze(1), infer-capture(1), infer-compile(1), - infer-diff(1), infer-events(1), infer-explore(1), infer-report(1), + infer-events(1), infer-explore(1), infer-report(1), infer-reportdiff(1), and infer-run(1). --help-format { auto | groff | pager | plain } Show this help in the specified format. auto sets the format to plain if the environment variable TERM is "dumb" or undefined, and to pager otherwise. See also infer-analyze(1), infer-capture(1), infer-compile(1), - infer-diff(1), infer-events(1), infer-explore(1), infer-report(1), + infer-events(1), infer-explore(1), infer-report(1), infer-reportdiff(1), and infer-run(1). --help-full Show this manual with all internal options in the INTERNAL OPTIONS section See also infer-analyze(1), infer-capture(1), infer-compile(1), - infer-diff(1), infer-events(1), infer-explore(1), infer-report(1), + infer-events(1), infer-explore(1), infer-report(1), infer-reportdiff(1), and infer-run(1). --no-hoisting-report-only-expensive @@ -790,13 +779,6 @@ OPTIONS Activates: Output issues in (PMD) XML format (Conversely: --no-pmd-xml) See also infer-run(1). - --previous-to-current-script shell - Specify a script to checkout the current version of the project. - The project is supposed to already be at that current version when - running infer diff; the script is used after having analyzed the - current and previous versions of the project, to restore the - project to the current version. See also infer-diff(1). - --print-active-checkers Activates: Print the active checkers before starting the analysis (Conversely: --no-print-active-checkers) See also infer-analyze(1). @@ -1261,9 +1243,6 @@ INTERNAL OPTIONS --coverage analysis mode to maximize coverage (can take longer) - --current-to-previous-script-reset - Cancel the effect of --current-to-previous-script. - --debug-exceptions Activates: Generate lightweight debugging information: just print the internal exceptions during analysis (also sets @@ -1370,9 +1349,6 @@ INTERNAL OPTIONS Activates: Do function pointer preprocessing (clang only). (Conversely: --no-function-pointer-specialization) - --gen-previous-build-command-script-reset - Cancel the effect of --gen-previous-build-command-script. - --generated-classes-reset Cancel the effect of --generated-classes. @@ -1541,9 +1517,6 @@ INTERNAL OPTIONS Activates: Print stats about preconditions to standard output (Conversely: --no-precondition-stats) - --previous-to-current-script-reset - Cancel the effect of --previous-to-current-script. - --print-buckets Activates: Show the internal bucket of Infer reports in their textual description (Conversely: --no-print-buckets) @@ -1879,9 +1852,8 @@ FILES SEE ALSO - infer-analyze(1), infer-capture(1), infer-compile(1), infer-diff(1), - infer-events(1), infer-explore(1), infer-report(1), - infer-reportdiff(1), infer-run(1) + infer-analyze(1), infer-capture(1), infer-compile(1), infer-events(1), + infer-explore(1), infer-report(1), infer-reportdiff(1), infer-run(1) diff --git a/infer/man/man1/infer.txt b/infer/man/man1/infer.txt index e7cde60a7..9375b822c 100644 --- a/infer/man/man1/infer.txt +++ b/infer/man/man1/infer.txt @@ -192,7 +192,7 @@ OPTIONS --changed-files-index file Specify the file containing the list of source files from which reactive analysis should start. Source files should be specified - relative to project root or be absolute See also infer-analyze(1) and infer-diff(1). + relative to project root or be absolute See also infer-analyze(1). --clang-biniou-file file Specify a file containing the AST of the program, in biniou format @@ -247,11 +247,6 @@ OPTIONS Costs report of the base revision to use for comparison See also infer-reportdiff(1). - --current-to-previous-script shell - Specify a script to checkout a previous version of the project to - compare against, assuming we are on the current version already. - See also infer-diff(1). - --custom-symbols json Specify named lists of symbols available to rules See also infer-analyze(1). @@ -269,8 +264,8 @@ OPTIONS --reports-include-ml-loc, --no-only-cheap-debug, --trace-error, --write-dotty, --write-html) (Conversely: --no-debug | -G) See also infer-analyze(1), infer-capture(1), infer-compile(1), - infer-diff(1), infer-events(1), infer-report(1), - infer-reportdiff(1), and infer-run(1). + infer-events(1), infer-report(1), infer-reportdiff(1), and + infer-run(1). --debug-level level Debug level (sets --bo-debug level, --debug-level-analysis level, @@ -279,26 +274,26 @@ OPTIONS - 1: verbose debugging enabled - 2: very verbose debugging enabled See also infer-analyze(1), infer-capture(1), infer-compile(1), - infer-diff(1), infer-events(1), infer-report(1), - infer-reportdiff(1), and infer-run(1). + infer-events(1), infer-report(1), infer-reportdiff(1), and + infer-run(1). --debug-level-analysis int Debug level for the analysis. See --debug-level for accepted values. See also infer-analyze(1), infer-capture(1), infer-compile(1), - infer-diff(1), infer-events(1), infer-report(1), - infer-reportdiff(1), and infer-run(1). + infer-events(1), infer-report(1), infer-reportdiff(1), and + infer-run(1). --debug-level-capture int Debug level for the capture. See --debug-level for accepted values. See also infer-analyze(1), infer-capture(1), infer-compile(1), - infer-diff(1), infer-events(1), infer-report(1), - infer-reportdiff(1), and infer-run(1). + infer-events(1), infer-report(1), infer-reportdiff(1), and + infer-run(1). --debug-level-linters int Debug level for the linters. See --debug-level for accepted values. See also infer-analyze(1), infer-capture(1), infer-compile(1), - infer-diff(1), infer-events(1), infer-report(1), - infer-reportdiff(1), and infer-run(1). + infer-events(1), infer-report(1), infer-reportdiff(1), and + infer-run(1). --no-default-checkers Deactivates: Default checkers: --biabduction, @@ -541,8 +536,7 @@ OPTIONS --force-delete-results-dir Activates: Do not refuse to delete the results directory if it doesn't look like an infer results directory. (Conversely: - --no-force-delete-results-dir) See also infer-capture(1), infer-compile(1), infer-diff(1), and - infer-run(1). + --no-force-delete-results-dir) See also infer-capture(1), infer-compile(1), and infer-run(1). --force-integration command Proceed as if the first argument after -- was command. Possible @@ -570,11 +564,6 @@ OPTIONS for frontend tests (also sets --print-types) (Conversely: --no-frontend-tests) See also infer-capture(1). - --gen-previous-build-command-script shell - Specify a script that outputs the build command to capture in the - previous version of the project. The script should output the - command on stdout. For example "echo make". See also infer-diff(1). - --generated-classes path Specify where to load the generated class files See also infer-capture(1). @@ -584,20 +573,20 @@ OPTIONS --help Show this manual See also infer-analyze(1), infer-capture(1), infer-compile(1), - infer-diff(1), infer-events(1), infer-explore(1), infer-report(1), + infer-events(1), infer-explore(1), infer-report(1), infer-reportdiff(1), and infer-run(1). --help-format { auto | groff | pager | plain } Show this help in the specified format. auto sets the format to plain if the environment variable TERM is "dumb" or undefined, and to pager otherwise. See also infer-analyze(1), infer-capture(1), infer-compile(1), - infer-diff(1), infer-events(1), infer-explore(1), infer-report(1), + infer-events(1), infer-explore(1), infer-report(1), infer-reportdiff(1), and infer-run(1). --help-full Show this manual with all internal options in the INTERNAL OPTIONS section See also infer-analyze(1), infer-capture(1), infer-compile(1), - infer-diff(1), infer-events(1), infer-explore(1), infer-report(1), + infer-events(1), infer-explore(1), infer-report(1), infer-reportdiff(1), and infer-run(1). --no-hoisting-report-only-expensive @@ -790,13 +779,6 @@ OPTIONS Activates: Output issues in (PMD) XML format (Conversely: --no-pmd-xml) See also infer-run(1). - --previous-to-current-script shell - Specify a script to checkout the current version of the project. - The project is supposed to already be at that current version when - running infer diff; the script is used after having analyzed the - current and previous versions of the project, to restore the - project to the current version. See also infer-diff(1). - --print-active-checkers Activates: Print the active checkers before starting the analysis (Conversely: --no-print-active-checkers) See also infer-analyze(1). @@ -1149,9 +1131,8 @@ FILES SEE ALSO - infer-analyze(1), infer-capture(1), infer-compile(1), infer-diff(1), - infer-events(1), infer-explore(1), infer-report(1), - infer-reportdiff(1), infer-run(1) + infer-analyze(1), infer-capture(1), infer-compile(1), infer-events(1), + infer-explore(1), infer-report(1), infer-reportdiff(1), infer-run(1) diff --git a/infer/src/atd/InferCommand.ml b/infer/src/atd/InferCommand.ml index 241235976..1b951f696 100644 --- a/infer/src/atd/InferCommand.ml +++ b/infer/src/atd/InferCommand.ml @@ -7,7 +7,7 @@ open Core (* NOTE: All variants must be also added to `all_commands` below *) -type t = Analyze | Capture | Compile | Diff | Events | Explore | Report | ReportDiff | Run +type t = Analyze | Capture | Compile | Events | Explore | Report | ReportDiff | Run [@@deriving compare] let equal = [%compare.equal: t] @@ -16,7 +16,6 @@ let command_to_string = [ (Analyze, "analyze") ; (Capture, "capture") ; (Compile, "compile") - ; (Diff, "diff") ; (Events, "events") ; (Explore, "explore") ; (Report, "report") diff --git a/infer/src/atd/InferCommand.mli b/infer/src/atd/InferCommand.mli index ffd523098..b2f00224c 100644 --- a/infer/src/atd/InferCommand.mli +++ b/infer/src/atd/InferCommand.mli @@ -14,7 +14,6 @@ type t = | Compile (** set up the infer environment then run the compilation commands without capturing the source files *) - | Diff (** orchestrate a diff analysis *) | Events (** dump logged events into stdout *) | Explore (** explore infer reports *) | Report (** post-process infer results and reports *) diff --git a/infer/src/base/CommandDoc.ml b/infer/src/base/CommandDoc.ml index 0ff0f937a..2fcba4e54 100644 --- a/infer/src/base/CommandDoc.ml +++ b/infer/src/base/CommandDoc.ml @@ -113,14 +113,6 @@ let compile = ~see_also:InferCommand.[Capture] -let diff = - mk_command_doc ~title:"Infer Differential Analysis of a Project" - ~short_description:"Report the difference between two versions of a project" - ~synopsis:"$(b,infer) $(b,diff) $(i,[options])" - ~description:[`P "EXPERIMENTAL AND IN NO WAY READY TO USE"] - ~see_also:InferCommand.[ReportDiff; Run] - - let explore = mk_command_doc ~title:"Infer Explore" ~short_description:"explore the error traces in infer reports" @@ -318,7 +310,6 @@ let command_to_data = [ mk Analyze analyze ; mk Capture capture ; mk Compile compile - ; mk Diff diff ; mk Events events ; mk Explore explore ; mk Report report diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index 85adeaba8..2f127d936 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -563,7 +563,7 @@ let () = match cmd with | Report -> `Add - | Analyze | Capture | Compile | Diff | Events | Explore | ReportDiff | Run -> + | Analyze | Capture | Compile | Events | Explore | ReportDiff | Run -> `Reject in (* make sure we generate doc for all the commands we know about *) @@ -949,7 +949,7 @@ and censor_report = and changed_files_index = CLOpt.mk_path_opt ~long:"changed-files-index" - ~in_help:InferCommand.[(Analyze, manual_generic); (Diff, manual_generic)] + ~in_help:InferCommand.[(Analyze, manual_generic)] ~meta:"file" "Specify the file containing the list of source files from which reactive analysis should \ start. Source files should be specified relative to project root or be absolute" @@ -1072,14 +1072,6 @@ and costs_previous = "Costs report of the base revision to use for comparison" -and current_to_previous_script = - CLOpt.mk_string_opt ~long:"current-to-previous-script" - ~in_help:InferCommand.[(Diff, manual_generic)] - ~meta:"shell" - "Specify a script to checkout a previous version of the project to compare against, assuming \ - we are on the current version already." - - and siof_check_iostreams = CLOpt.mk_bool ~long:"siof-check-iostreams" ~in_help:InferCommand.[(Analyze, manual_siof)] @@ -1423,11 +1415,7 @@ and flavors = and force_delete_results_dir = CLOpt.mk_bool ~long:"force-delete-results-dir" ~default:false ~in_help: - InferCommand. - [ (Capture, manual_generic) - ; (Compile, manual_generic) - ; (Diff, manual_generic) - ; (Run, manual_generic) ] + InferCommand.[(Capture, manual_generic); (Compile, manual_generic); (Run, manual_generic)] "Do not refuse to delete the results directory if it doesn't look like an infer results \ directory." @@ -1460,14 +1448,6 @@ and function_pointer_specialization = "Do function pointer preprocessing (clang only)." -and gen_previous_build_command_script = - CLOpt.mk_string_opt ~long:"gen-previous-build-command-script" - ~in_help:InferCommand.[(Diff, manual_generic)] - ~meta:"shell" - "Specify a script that outputs the build command to capture in the previous version of the \ - project. The script should output the command on stdout. For example \"echo make\"." - - and generated_classes = CLOpt.mk_path_opt ~long:"generated-classes" ~in_help:InferCommand.[(Capture, manual_java)] @@ -1826,16 +1806,6 @@ and precondition_stats = "Print stats about preconditions to standard output" -and previous_to_current_script = - CLOpt.mk_string_opt ~long:"previous-to-current-script" - ~in_help:InferCommand.[(Diff, manual_generic)] - ~meta:"shell" - "Specify a script to checkout the current version of the project. The project is supposed to \ - already be at that current version when running $(b,infer diff); the script is used after \ - having analyzed the current and previous versions of the project, to restore the project to \ - the current version." - - and print_active_checkers = CLOpt.mk_bool ~long:"print-active-checkers" ~in_help:InferCommand.[(Analyze, manual_generic)] @@ -2802,8 +2772,6 @@ and costs_current = !costs_current and costs_previous = !costs_previous -and current_to_previous_script = !current_to_previous_script - and cxx = !cxx and cxx_scope_guards = !cxx_scope_guards @@ -2878,8 +2846,6 @@ and function_pointer_specialization = !function_pointer_specialization and frontend_tests = !frontend_tests -and gen_previous_build_command_script = !gen_previous_build_command_script - and generated_classes = !generated_classes and genrule_master_mode = !genrule_master_mode @@ -3015,8 +2981,6 @@ and pmd_xml = !pmd_xml and precondition_stats = !precondition_stats -and previous_to_current_script = !previous_to_current_script - and printf_args = !printf_args and print_active_checkers = !print_active_checkers @@ -3089,7 +3053,7 @@ and racerd = !racerd and racerd_guardedby = !racerd_guardedby -and reactive_mode = !reactive || InferCommand.(equal Diff) command +and reactive_mode = !reactive and reactive_capture = !reactive_capture diff --git a/infer/src/base/Config.mli b/infer/src/base/Config.mli index 2549496c7..ee805b2bf 100644 --- a/infer/src/base/Config.mli +++ b/infer/src/base/Config.mli @@ -306,8 +306,6 @@ val costs_current : string option val costs_previous : string option -val current_to_previous_script : string option - val cxx : bool val cxx_scope_guards : Yojson.Basic.t @@ -382,8 +380,6 @@ val frontend_tests : bool val function_pointer_specialization : bool -val gen_previous_build_command_script : string option - val generated_classes : string option val genrule_master_mode : bool @@ -522,8 +518,6 @@ val pmd_xml : bool val precondition_stats : bool -val previous_to_current_script : string option - val print_active_checkers : bool val print_builtins : bool diff --git a/infer/src/base/Memcached.ml b/infer/src/base/Memcached.ml index c85b9ea4b..9eb0cd003 100644 --- a/infer/src/base/Memcached.ml +++ b/infer/src/base/Memcached.ml @@ -74,8 +74,6 @@ let with_server ~f = f s -let flush_all () = with_server ~f:(fun s -> send_line s "flush_all") - let disconnect () = with_server ~f:(fun s -> server := None ; diff --git a/infer/src/base/Memcached.mli b/infer/src/base/Memcached.mli index a4eed1c72..544334513 100644 --- a/infer/src/base/Memcached.mli +++ b/infer/src/base/Memcached.mli @@ -17,9 +17,6 @@ val disconnect : unit -> unit val start : unit -> unit (** start a memcached daemon and set up an epilogue to kill it on exit -- only for top-level *) -val flush_all : unit -> unit -(** empty the cache *) - (** type to marshal, plus a unique label that will be colon-prepended to a key, roughly signifying a table *) module type Value = sig diff --git a/infer/src/base/ResultsDatabase.ml b/infer/src/base/ResultsDatabase.ml index c8b5afcd4..8682799e7 100644 --- a/infer/src/base/ResultsDatabase.ml +++ b/infer/src/base/ResultsDatabase.ml @@ -154,14 +154,6 @@ end include UnsafeDatabaseRef -let reset_capture_tables () = - let db = get_database () in - SqliteUtils.exec db ~log:"drop procedures table" ~stmt:"DROP TABLE procedures" ; - create_procedures_table db ; - SqliteUtils.exec db ~log:"drop source_files table" ~stmt:"DROP TABLE source_files" ; - create_source_files_table db - - let db_canonicalize () = let db = get_database () in SqliteUtils.exec db ~log:"running VACUUM" ~stmt:"VACUUM" diff --git a/infer/src/base/ResultsDatabase.mli b/infer/src/base/ResultsDatabase.mli index 96e56504f..f3accf4b1 100644 --- a/infer/src/base/ResultsDatabase.mli +++ b/infer/src/base/ResultsDatabase.mli @@ -19,9 +19,6 @@ val schema_hum : string val get_database : unit -> Sqlite3.db (** The results database. You should always use this function to access the database, as the connection to it may change during the execution (see [new_database_connection]). *) -val reset_capture_tables : unit -> unit -(** zero out the tables associated with capture data *) - val new_database_connection : unit -> unit (** Closes the previous connection to the database (if any), and opens a new one. Needed after calls to fork(2). *) diff --git a/infer/src/base/ResultsDir.ml b/infer/src/base/ResultsDir.ml index 2ba6c1a82..4393afa5e 100644 --- a/infer/src/base/ResultsDir.ml +++ b/infer/src/base/ResultsDir.ml @@ -81,13 +81,3 @@ let assert_results_dir advice = L.die UserError "%s@\nPlease remove '%s' and try again" error Config.results_dir ) ; prepare_logging_and_db () ; () - - -let delete_capture_and_analysis_data () = - ResultsDatabase.reset_capture_tables () ; - let dirs_to_delete = - List.map ~f:(Filename.concat Config.results_dir) Config.[captured_dir_name; specs_dir_name] - in - List.iter ~f:Utils.rmtree dirs_to_delete ; - List.iter ~f:Unix.mkdir_p dirs_to_delete ; - () diff --git a/infer/src/base/ResultsDir.mli b/infer/src/base/ResultsDir.mli index 8f63a35f9..9a5edfd57 100644 --- a/infer/src/base/ResultsDir.mli +++ b/infer/src/base/ResultsDir.mli @@ -15,6 +15,3 @@ val remove_results_dir : unit -> unit val create_results_dir : unit -> unit (** Create the results dir and sets up logging, the database, etc. *) - -val delete_capture_and_analysis_data : unit -> unit -(** delete all results from the capture and the analysis *) diff --git a/infer/src/infer.ml b/infer/src/infer.ml index 5a96bfee6..07a0c941a 100644 --- a/infer/src/infer.ml +++ b/infer/src/infer.ml @@ -30,8 +30,6 @@ let setup () = ResultsDir.assert_results_dir "have you run capture before?" | Report | ReportDiff -> ResultsDir.create_results_dir () - | Diff -> - ResultsDir.remove_results_dir () ; ResultsDir.create_results_dir () | Capture | Compile | Run -> let driver_mode = Lazy.force Driver.mode_from_command_line in if @@ -151,8 +149,6 @@ let () = ReportDiff.reportdiff ~current_report:Config.report_current ~previous_report:Config.report_previous ~current_costs:Config.costs_current ~previous_costs:Config.costs_previous - | Diff -> - Diff.diff (Lazy.force Driver.mode_from_command_line) | Explore -> ( match (Config.procedures, Config.source_files) with | true, false -> diff --git a/infer/src/integration/Diff.ml b/infer/src/integration/Diff.ml deleted file mode 100644 index 95175ac0a..000000000 --- a/infer/src/integration/Diff.ml +++ /dev/null @@ -1,93 +0,0 @@ -(* - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) -open! IStd -module F = Format -module L = Logging - -type revision = Current | Previous - -let string_of_revision = function Current -> "current" | Previous -> "previous" - -let pp_revision f r = F.pp_print_string f (string_of_revision r) - -let checkout revision = - let script_opt = - match revision with - | Current -> - Config.previous_to_current_script - | Previous -> - Config.current_to_previous_script - in - match script_opt with - | None -> - L.(die UserError) - "Please specify a script to checkout the %a revision of your project using --checkout-%a \ -