From 6ab174f0c324f179193689af64b285e751656169 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Mon, 4 Sep 2017 06:52:28 -0700 Subject: [PATCH] [build] do not install javalib with `opam pin` Summary: Installing with `opam pin` risks upgrading a lot of package in the current switch, which is very slow. It's also wasted work since we'll install back their older versions afterwards with `opam lock`. Moreover, that second step can now fail if javalib needs to be recompiled (which it seems it does), because we delete the javalib sources after having pinned them. Solution: 1. do not install javalib at `opam pin` time, and 2. do not remove its source tree after pinning. Reviewed By: martinoluca Differential Revision: D5764153 fbshipit-source-id: 9c9b1c7 --- .gitignore | 1 + build-infer.sh | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index dd604e85a..40b64c4cb 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ /_build_logs /infer/tests/codetoanalyze/java/*/codetoanalyze /dependencies/infer-deps-* +/dependencies/javalib/javalib-2.3.3/ _build_infer *.exp.test* *.test.dot diff --git a/build-infer.sh b/build-infer.sh index 96a4818e3..948beda66 100755 --- a/build-infer.sh +++ b/build-infer.sh @@ -176,9 +176,7 @@ install_patched_javalib() { tar xvf "$javalib_dir"/javalib-2.3.3.tar.bz2 -C "$javalib_dir" # apply the patch patch -d "$unzipped_javalib_dir"/src < "$javalib_dir"/allow_empty_method.patch - opam pin add javalib "$unzipped_javalib_dir" - # clean up unzipped source - rm -rf "$unzipped_javalib_dir" + opam pin add --no-action javalib "$unzipped_javalib_dir" } install_locked_deps() {