Skip to content
Permalink
Browse files

Add extra debugging

  • Loading branch information...
muglug committed May 7, 2019
1 parent 4f8d6a5 commit 44f0c64877f029747be4f6b4d8c5e2a0fc5e15ed
Showing with 16 additions and 1 deletion.
  1. +16 −1 src/Psalm/Internal/Codebase/Scanner.php
@@ -386,12 +386,19 @@ function ($_, $file_path) use ($filetype_scanners, $files_to_deep_scan) {
++$i;
}
if ($this->debug_output) {
echo 'Forking process for scanning' . PHP_EOL;
}
// Run scanning one file at a time, splitting the set of
// files up among a given number of child processes.
$pool = new \Psalm\Internal\Fork\Pool(
$process_file_paths,
/** @return void */
function () {
if ($this->debug_output) {
echo 'Initialising forked process for scanning' . PHP_EOL;
}
$project_analyzer = \Psalm\Internal\Analyzer\ProjectAnalyzer::getInstance();
$codebase = $project_analyzer->getCodebase();
$statements_provider = $codebase->statements_provider;
@@ -401,12 +408,20 @@ function () {
$codebase->classlike_storage_provider->deleteAll();
$statements_provider->resetDiffs();
if ($this->debug_output) {
echo 'Have initialised forked process for scanning' . PHP_EOL;
}
},
$scanner_worker,
/**
* @return PoolData
*/
function () {
if ($this->debug_output) {
echo 'Collecting data from forked scanner process' . PHP_EOL;
}
$project_analyzer = \Psalm\Internal\Analyzer\ProjectAnalyzer::getInstance();
$codebase = $project_analyzer->getCodebase();
$statements_provider = $codebase->statements_provider;

0 comments on commit 44f0c64

Please sign in to comment.
You can’t perform that action at this time.