From 10a0f19870ad42944fa9bc8365711f55efc035a0 Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Fri, 9 Nov 2018 00:46:39 -0500 Subject: [PATCH] Delay loading stubs until after first scan; --- src/Psalm/Checker/ProjectChecker.php | 2 -- src/Psalm/LanguageServer/LanguageServer.php | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Psalm/Checker/ProjectChecker.php b/src/Psalm/Checker/ProjectChecker.php index 3603968b4..0233dbc2a 100644 --- a/src/Psalm/Checker/ProjectChecker.php +++ b/src/Psalm/Checker/ProjectChecker.php @@ -247,8 +247,6 @@ class ProjectChecker $this->file_reference_provider->loadReferenceCache(); $this->codebase->enterServerMode(); - $this->config->visitStubFiles($this->codebase, $this->debug_output); - $cwd = getcwd(); if (!$cwd) { diff --git a/src/Psalm/LanguageServer/LanguageServer.php b/src/Psalm/LanguageServer/LanguageServer.php index 169d84207..2fc7bcb12 100644 --- a/src/Psalm/LanguageServer/LanguageServer.php +++ b/src/Psalm/LanguageServer/LanguageServer.php @@ -165,6 +165,8 @@ class LanguageServer extends AdvancedJsonRpc\Dispatcher $this->project_checker->codebase->scanFiles($this->project_checker->threads); + $this->project_checker->config->visitStubFiles($this->project_checker->codebase, false); + if ($this->textDocument === null) { $this->textDocument = new TextDocument( $this,