Changeset View
Changeset View
Standalone View
Standalone View
src/runtime/ArcanistRuntime.php
Show First 20 Lines • Show All 264 Lines • ▼ Show 20 Lines | foreach ($need_functions as $fname => $resolution) { | ||||
list($what, $which) = $resolution; | list($what, $which) = $resolution; | ||||
if ($what == 'flag' && strpos($config, $which) !== false) { | if ($what == 'flag' && strpos($config, $which) !== false) { | ||||
$show_config = true; | $show_config = true; | ||||
$problems[] = sprintf( | $problems[] = sprintf( | ||||
'The build of PHP you are running was compiled with the configure '. | 'The build of PHP you are running was compiled with the configure '. | ||||
'flag "%s", which means it does not support the function "%s()". '. | 'flag "%s", which means it does not support the function "%s()". '. | ||||
'This function is required for Arcanist to run. Install a standard '. | 'This function is required for this software to run. Install a '. | ||||
'build of PHP or rebuild it without this flag. You may also be '. | 'standard build of PHP or rebuild it without this flag. You may '. | ||||
'able to build or install the relevant extension separately.', | 'also be able to build or install the relevant extension separately.', | ||||
$which, | $which, | ||||
$fname); | $fname); | ||||
continue; | continue; | ||||
} | } | ||||
if ($what == 'builtin-dll') { | if ($what == 'builtin-dll') { | ||||
$problems[] = sprintf( | $problems[] = sprintf( | ||||
'The build of PHP you are running does not have the "%s" extension '. | 'The build of PHP you are running does not have the "%s" extension '. | ||||
▲ Show 20 Lines • Show All 188 Lines • ▼ Show 20 Lines | try { | ||||
// especially bizarre, but it allows `arc` to be used in automation | // especially bizarre, but it allows `arc` to be used in automation | ||||
// workflows more easily. For some context, see PHI13. | // workflows more easily. For some context, see PHI13. | ||||
$executing_directory = dirname(dirname(__FILE__)); | $executing_directory = dirname(dirname(__FILE__)); | ||||
$log->writeWarn( | $log->writeWarn( | ||||
pht('VERY META'), | pht('VERY META'), | ||||
pht( | pht( | ||||
'You are running one copy of Arcanist (at path "%s") against '. | 'You are running one copy of this software (at path "%s") against '. | ||||
'another copy of Arcanist (at path "%s"). Code in the current '. | 'another copy of this software (at path "%s"). Code in the current '. | ||||
'working directory will not be loaded or executed.', | 'working directory will not be loaded or executed.', | ||||
$executing_directory, | $executing_directory, | ||||
$working_directory)); | $working_directory)); | ||||
} catch (PhutilBootloaderException $ex) { | } catch (PhutilBootloaderException $ex) { | ||||
$log->writeError( | $log->writeError( | ||||
pht('LIBRARY ERROR'), | pht('LIBRARY ERROR'), | ||||
pht( | pht( | ||||
'Failed to load library at location "%s". This library '. | 'Failed to load library at location "%s". This library '. | ||||
Show All 24 Lines | final class ArcanistRuntime { | ||||
private function newToolset(array $argv) { | private function newToolset(array $argv) { | ||||
$binary = basename($argv[0]); | $binary = basename($argv[0]); | ||||
$toolsets = ArcanistToolset::newToolsetMap(); | $toolsets = ArcanistToolset::newToolsetMap(); | ||||
if (!isset($toolsets[$binary])) { | if (!isset($toolsets[$binary])) { | ||||
throw new PhutilArgumentUsageException( | throw new PhutilArgumentUsageException( | ||||
pht( | pht( | ||||
'Arcanist toolset "%s" is unknown. The Arcanist binary should '. | 'Toolset "%s" is unknown. The binary should be executed so that '. | ||||
'be executed so that "argv[0]" identifies a supported toolset. '. | '"argv[0]" identifies a supported toolset. Rename the binary or '. | ||||
'Rename the binary or install the library that provides the '. | 'install the library that provides the desired toolset. Current '. | ||||
'desired toolset. Current available toolsets: %s.', | 'available toolsets: %s.', | ||||
$binary, | $binary, | ||||
implode(', ', array_keys($toolsets)))); | implode(', ', array_keys($toolsets)))); | ||||
} | } | ||||
return $toolsets[$binary]; | return $toolsets[$binary]; | ||||
} | } | ||||
private function newWorkflows(ArcanistToolset $toolset) { | private function newWorkflows(ArcanistToolset $toolset) { | ||||
▲ Show 20 Lines • Show All 381 Lines • Show Last 20 Lines |