diff --git a/src/moduleutils/PhutilLibraryMapBuilder.php b/src/moduleutils/PhutilLibraryMapBuilder.php --- a/src/moduleutils/PhutilLibraryMapBuilder.php +++ b/src/moduleutils/PhutilLibraryMapBuilder.php @@ -12,7 +12,6 @@ final class PhutilLibraryMapBuilder extends Phobject { private $root; - private $quiet = true; private $subprocessLimit = 8; private $fileSymbolMap; @@ -38,19 +37,6 @@ $this->root = $root; } - /** - * Control status output. Use `--quiet` to set this. - * - * @param bool If true, don't show status output. - * @return this - * - * @task map - */ - public function setQuiet($quiet) { - $this->quiet = $quiet; - return $this; - } - /** * Control subprocess parallelism limit. Use `--limit` to set this. * @@ -108,25 +94,9 @@ public function buildAndWriteMap() { $library_map = $this->buildMap(); - $this->log(pht('Writing map...')); $this->writeLibraryMap($library_map); } - /** - * Write a status message to the user, if not running in quiet mode. - * - * @param string Message to write. - * @return this - * - * @task map - */ - private function log($message) { - if (!$this->quiet) { - @fwrite(STDERR, "%s\n", $message); - } - return $this; - } - /* -( Path Management )---------------------------------------------------- */ @@ -236,11 +206,7 @@ } $json = json_encode($cache); - try { - Filesystem::writeFile($cache_file, $json); - } catch (FilesystemException $ex) { - $this->log(pht('Unable to save the cache!')); - } + Filesystem::writeFile($cache_file, $json); } /** @@ -251,7 +217,6 @@ * @task symbol */ public function dropSymbolCache() { - $this->log(pht('Dropping symbol cache...')); Filesystem::remove($this->getPathForSymbolCache()); } @@ -451,14 +416,10 @@ */ private function analyzeLibrary() { // Identify all the ".php" source files in the library. - $this->log(pht('Finding source files...')); $source_map = $this->loadSourceFileMap(); - $this->log( - pht('Found %s files.', new PhutilNumber(count($source_map)))); // Load the symbol cache with existing parsed symbols. This allows us // to remap libraries quickly by analyzing only changed files. - $this->log(pht('Loading symbol cache...')); $symbol_cache = $this->loadSymbolCache(); // If the XHPAST binary is not up-to-date, build it now. Otherwise, @@ -481,23 +442,12 @@ } $futures[$file] = $this->buildSymbolAnalysisFuture($file); } - $this->log( - pht('Found %s files in cache.', new PhutilNumber(count($symbol_map)))); // Run the analyzer on any files which need analysis. if ($futures) { $limit = $this->subprocessLimit; - $this->log( - pht( - 'Analyzing %s file(s) with %s subprocess(es)...', - phutil_count($futures), - new PhutilNumber($limit))); - $progress = new PhutilConsoleProgressBar(); - if ($this->quiet) { - $progress->setQuiet(true); - } $progress->setTotal(count($futures)); $futures = id(new FutureIterator($futures)) @@ -525,8 +475,6 @@ $this->writeSymbolCache($symbol_map, $source_map); // Our map is up to date, so either show it on stdout or write it to disk. - $this->log(pht('Building library map...')); - $this->librarySymbolMap = $this->buildLibraryMap($symbol_map); } diff --git a/support/lib/rebuild-map.php b/support/lib/rebuild-map.php --- a/support/lib/rebuild-map.php +++ b/support/lib/rebuild-map.php @@ -16,10 +16,6 @@ $args->parseStandardArguments(); $args->parse( array( - array( - 'name' => 'quiet', - 'help' => pht('Do not write status messages to stderr.'), - ), array( 'name' => 'drop-cache', 'help' => pht( @@ -56,7 +52,6 @@ $root = Filesystem::resolvePath(head($root)); $builder = new PhutilLibraryMapBuilder($root); -$builder->setQuiet($args->getArg('quiet')); $builder->setSubprocessLimit($args->getArg('limit')); if ($args->getArg('drop-cache')) {