From fe0c2938951821bf5c5d578839206bbb3fd36b72 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 18 Sep 2018 11:05:31 -0700 Subject: [PATCH] [Wilds] Remove include_path mangling and drop support for "externals/includes" Summary: Ref T13098. This logic comes from D3243 and was theoretically used to let you install `libphutil` with Homebrew. Since libphutil no longer exists and the other use cases I can come up with are questionable/obsolete, remove it. (As we move into T5055, I expect to provide better tools for bundling/managing external dependencies.) Test Plan: Ran `arc`, same as the old `arc`. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13098 Differential Revision: https://secure.phabricator.com/D19692 --- externals/includes/README | 3 --- support/ArcanistRuntime.php | 45 +------------------------------------ 2 files changed, 1 insertion(+), 47 deletions(-) delete mode 100644 externals/includes/README diff --git a/externals/includes/README b/externals/includes/README deleted file mode 100644 index a7f141c2..00000000 --- a/externals/includes/README +++ /dev/null @@ -1,3 +0,0 @@ -This directory is added to the PHP include path. You can symlink things here -if you have control over directory setup but not over PHP configuration (for -instance, in Homebrew). diff --git a/support/ArcanistRuntime.php b/support/ArcanistRuntime.php index f14a1514..ad9d7912 100644 --- a/support/ArcanistRuntime.php +++ b/support/ArcanistRuntime.php @@ -8,11 +8,6 @@ final class ArcanistRuntime { return $err; } - $err = $this->includeCoreLibraries(); - if ($err) { - return $err; - } - PhutilTranslator::getInstance() ->setLocale(PhutilLocale::loadLocale('en_US')) ->setTranslations(PhutilTranslation::getTranslationMapForLocale('en_US')); @@ -26,6 +21,7 @@ final class ArcanistRuntime { "**%s:** %s\n", pht('Usage Exception'), $ex->getMessage())); + return 77; } } @@ -207,45 +203,6 @@ final class ArcanistRuntime { return 1; } - private function includeCoreLibraries() { - // Adjust 'include_path' to add locations where we'll search for libphutil. - // We look in these places: - // - // - Next to 'arcanist/'. - // - Anywhere in the normal PHP 'include_path'. - // - Inside 'arcanist/externals/includes/'. - // - // When looking in these places, we expect to find a 'libphutil/' directory. - - // The 'arcanist/' directory. - $arcanist_dir = dirname(dirname(__FILE__)); - - // The parent directory of 'arcanist/'. - $parent_dir = dirname($arcanist_dir); - - // The 'arcanist/externals/includes/' directory. - $include_dir = implode( - DIRECTORY_SEPARATOR, - array( - $arcanist_dir, - 'externals', - 'includes', - )); - - $php_include_path = ini_get('include_path'); - $php_include_path = implode( - PATH_SEPARATOR, - array( - $parent_dir, - $php_include_path, - $include_dir, - )); - - ini_set('include_path', $php_include_path); - - return 0; - } - private function loadConfiguration(PhutilArgumentParser $args) { $configuration_manager = new ArcanistConfigurationManager();