Summary:
We currently raise a very confusing error when we hit this case:
Exception: The phutil library '' has not been loaded!
Because of the trickiness of init-order stuff, it's difficult to detect this more explicitly earlier -- instead, just raise a more descriptive error.
Test Plan: Ran "arc unit" in a copy of libphutil other than the one arc loads.
Reviewers: btrahan, jungejason
Reviewed By: btrahan
CC: aran, epriestley
Maniphest Tasks: T580
Differential Revision: https://secure.phabricator.com/D1760
}
$library_name = phutil_get_library_name_for_root($library_root);
+ if (!$library_name) {
+ throw new Exception(
+ "Attempting to run unit tests on a libphutil library which has not ".
+ "been loaded, at:\n\n".
+ " {$library_root}\n\n".
+ "This probably means one of two things:\n\n".
+ " - You may need to add this library to .arcconfig.\n".
+ " - You may be running tests on a copy of libphutil or arcanist\n".
+ " using a different copy of libphutil or arcanist. This\n".
+ " operation is not supported.");
+ }
+
$path = Filesystem::resolvePath($path);
if (!is_dir($path)) {