1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-19 16:38:51 +02:00

[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
This commit is contained in:
epriestley 2018-09-18 11:05:31 -07:00
parent 8e0e07664a
commit fe0c293895
2 changed files with 1 additions and 47 deletions

View file

@ -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).

View file

@ -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();