mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01: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:
parent
8e0e07664a
commit
fe0c293895
2 changed files with 1 additions and 47 deletions
3
externals/includes/README
vendored
3
externals/includes/README
vendored
|
@ -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).
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue