Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Performance/Feature Improvements to the Language Server #8960

Merged
merged 92 commits into from Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
427ff3a
Upgrade LSP to support additional features
tm1000 Jan 31, 2022
cfdf5c4
additional debugging
tm1000 Jan 31, 2022
de9d626
Merge branch '4.x' into feature/upgrade-lsp
tm1000 Feb 1, 2022
55c6557
add command to fix all and analyize single file
tm1000 Feb 1, 2022
870e1ba
additional work to caching engine
tm1000 Feb 1, 2022
1b98fe5
analyze files even outside of the scope because this is how IDEs work
tm1000 Feb 2, 2022
727a09d
Merge branch '4.x' into feature/upgrade-lsp
tm1000 Feb 2, 2022
81418e2
improve file caching logic with versions and refreshes
tm1000 Feb 2, 2022
2093a28
log an error outside of requests
tm1000 Feb 2, 2022
de6d714
after bubble up we now need to not yield nulls
tm1000 Feb 2, 2022
f4e8e1f
check nulls quicker
tm1000 Feb 2, 2022
9957f67
fix didClose
tm1000 Feb 2, 2022
9f6843b
add psalm and phpcs checking and cleanup errors from that
tm1000 Feb 2, 2022
d8394cb
add class reference
tm1000 Feb 3, 2022
c8f50b9
move starting of server into server itself
tm1000 Feb 3, 2022
cfc5a3a
more fixes
tm1000 Feb 3, 2022
20e7316
remove need for defining lsp elsewhere
tm1000 Feb 3, 2022
a7146b4
bump
tm1000 Feb 3, 2022
e259d56
bump again
tm1000 Feb 3, 2022
81d3731
Merge branch '4.x' into feature/upgrade-lsp
tm1000 Feb 4, 2022
a697c79
pass progress higher up
tm1000 Feb 4, 2022
19a3f4d
catch TypeParseTreeException
tm1000 Feb 4, 2022
8855bed
bump
tm1000 Feb 7, 2022
867a486
bump
tm1000 Feb 7, 2022
1376bd8
extend codebase and put all LSP in the extended, cleanup hover outputs
tm1000 Feb 14, 2022
c679692
Merge branch '4.x' into feature/upgrade-lsp
tm1000 Feb 14, 2022
e130677
add ability to hide warnings
tm1000 Feb 14, 2022
f8fd0fe
fix hover
tm1000 Feb 14, 2022
6394e2d
fix new lines in funcs with no params
tm1000 Feb 14, 2022
29f0159
fix spacing
tm1000 Feb 14, 2022
cc8c775
fix linting
tm1000 Feb 15, 2022
045bbe2
basic testing, disable log filtering
tm1000 Feb 18, 2022
ceb7b95
bump
tm1000 Feb 18, 2022
e509aad
ability to debounce onchange events for large projects
tm1000 Mar 4, 2022
e18f9cc
Merge branch '4.x' of https://github.com/vimeo/psalm into feature/upg…
tm1000 Mar 4, 2022
26434c5
Merge branch '4.x' of https://github.com/vimeo/psalm into feature/upg…
tm1000 Mar 25, 2022
0944ca5
use latest language server
tm1000 Mar 31, 2022
979ae34
Merge branch '4.x' of https://github.com/vimeo/psalm into feature/upg…
tm1000 Mar 31, 2022
2c1100d
Merge branch '4.x' into feature/upgrade-lsp
tm1000 Apr 26, 2022
8740c17
make sure publishDiagnostics returns an array not an object
tm1000 Apr 27, 2022
4191a9d
fix log levels
tm1000 Apr 27, 2022
b3cc5c7
fix logic
tm1000 Apr 27, 2022
6855c23
dont allow clients to destroy our local configurations
tm1000 Apr 27, 2022
27b9522
expose additional types
tm1000 Apr 28, 2022
e5c9952
cleanups
tm1000 Apr 28, 2022
2d8cc8d
fixes from shepard
tm1000 Apr 28, 2022
b0bd2e0
more fixes
tm1000 Apr 28, 2022
7819821
fix tests
tm1000 Apr 28, 2022
2264fd5
more cleanup
tm1000 Apr 28, 2022
5d1cd7c
fix non 8.1 syntax
tm1000 Apr 28, 2022
7910daa
remove failing trailing commas
tm1000 Apr 28, 2022
96e7b42
another comma!
tm1000 Apr 28, 2022
e5c5b4a
these commas man!
tm1000 Apr 28, 2022
ed46c77
commas
tm1000 Apr 28, 2022
14309f0
more commas
tm1000 Apr 28, 2022
e10ad2b
more
tm1000 Apr 28, 2022
30c885e
commas
tm1000 Apr 28, 2022
8613ebb
so close!
tm1000 Apr 28, 2022
599ba0e
bump
tm1000 Apr 28, 2022
4109e4b
Merge branch '4.x' of https://github.com/vimeo/psalm into feature/upg…
tm1000 Jul 21, 2022
5f50a9e
fix invalid variable
tm1000 Jul 21, 2022
87184d7
fixes for CI
tm1000 Jul 21, 2022
20d7a95
remove amphp/phpunit-util on test run in ci
tm1000 Jul 21, 2022
da66665
Merge branch '4.x' into feature/upgrade-lsp
tm1000 Nov 30, 2022
b0705b4
fix tests
tm1000 Nov 30, 2022
e16a4f3
more testing fixes
tm1000 Nov 30, 2022
82d8974
merge to v5
tm1000 Dec 20, 2022
a13ad3c
phpcs
tm1000 Dec 20, 2022
b9791d2
fix some tests
tm1000 Dec 20, 2022
f1b0c4f
additional fixes
tm1000 Dec 20, 2022
30f8331
additional fixes
tm1000 Dec 20, 2022
5f9487e
async test case fixes
tm1000 Dec 20, 2022
2401705
fix phpcs issues
tm1000 Dec 20, 2022
142c9da
wrap comment
tm1000 Dec 20, 2022
eab70e1
allow array-to-xml 3
tm1000 Dec 26, 2022
b14ed73
Merge tag '5.6.0' into feature/upgrade-lsp-v5
tm1000 Jan 25, 2023
27c0caf
Fixes #9180 allow baseline file
tm1000 Jan 25, 2023
468e7e7
add cli command to turn off xdebug turnoff functionality, fix bug wit…
tm1000 Jan 26, 2023
3c38e02
allow dynamically changing configuration without restarting
tm1000 Jan 26, 2023
6e109aa
Merge tag '5.7.7' of https://github.com/vimeo/psalm into feature/upgr…
tm1000 Mar 2, 2023
2efd9c8
bump to 5.7.7
tm1000 Mar 2, 2023
5eed370
fix outstanding CI issues
tm1000 Mar 2, 2023
3467816
fix
tm1000 Mar 2, 2023
7e9638b
Merge branch 'master' of https://github.com/vimeo/psalm into feature/…
tm1000 Mar 2, 2023
0e4b878
fix outstanding issues
tm1000 Mar 2, 2023
24b6a97
use in-memory cache thanks @ging-dev, remove pnctl fork
tm1000 Mar 2, 2023
221eecf
remove options to clear and boot cache
tm1000 Mar 2, 2023
fc4c980
cleanup
tm1000 Mar 2, 2023
7760c39
syntax
tm1000 Mar 2, 2023
97eae62
fixes
tm1000 Mar 2, 2023
f908b9a
fix failing test
tm1000 Mar 3, 2023
3271b1b
add experimental in memory option
tm1000 Mar 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -10,7 +10,7 @@
/vendor-bin/*/composer.lock
/vendor-bin/*/vendor/
/tests/fixtures/symlinktest/*

.vscode
.idea/
.vscode/
.php-version
1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -44,6 +44,7 @@
},
"require-dev": {
"ext-curl": "*",
"amphp/phpunit-util": "^2.0",
"bamarni/composer-bin-plugin": "^1.4",
"brianium/paratest": "^6.9",
"mockery/mockery": "^1.5",
Expand Down
36 changes: 0 additions & 36 deletions psalm-baseline.xml
Expand Up @@ -16,8 +16,6 @@
<PossiblyUndefinedIntArrayOffset>
<code>$const_name</code>
<code>$const_name</code>
<code>$matches[0]</code>
<code>$property_name</code>
<code>$symbol_name</code>
<code>$symbol_parts[1]</code>
</PossiblyUndefinedIntArrayOffset>
Expand Down Expand Up @@ -227,11 +225,6 @@
<code><![CDATA[$stmt->expr->getArgs()[0]]]></code>
</PossiblyUndefinedArrayOffset>
</file>
<file src="src/Psalm/Internal/Cli/LanguageServer.php">
<PossiblyInvalidArgument>
<code><![CDATA[$options['tcp'] ?? null]]></code>
</PossiblyInvalidArgument>
</file>
<file src="src/Psalm/Internal/Cli/Refactor.php">
<PossiblyUndefinedIntArrayOffset>
<code>$identifier_name</code>
Expand Down Expand Up @@ -292,35 +285,6 @@
<code><![CDATA[$stmt->props[0]]]></code>
</PossiblyUndefinedIntArrayOffset>
</file>
<file src="src/Psalm/Internal/LanguageServer/LanguageClient.php">
<DocblockTypeContradiction>
<code><![CDATA[$type < 1]]></code>
<code><![CDATA[$type < 1 || $type > 4]]></code>
<code><![CDATA[$type > 4]]></code>
</DocblockTypeContradiction>
</file>
<file src="src/Psalm/Internal/LanguageServer/LanguageServer.php">
<PossiblyUnusedParam>
<code>$capabilities</code>
<code>$processId</code>
<code>$rootPath</code>
</PossiblyUnusedParam>
</file>
<file src="src/Psalm/Internal/LanguageServer/Message.php">
<PossiblyUndefinedIntArrayOffset>
<code>$pair[1]</code>
</PossiblyUndefinedIntArrayOffset>
</file>
<file src="src/Psalm/Internal/LanguageServer/ProtocolStreamReader.php">
<PossiblyUndefinedIntArrayOffset>
<code>$parts[1]</code>
</PossiblyUndefinedIntArrayOffset>
</file>
<file src="src/Psalm/Internal/LanguageServer/Server/TextDocument.php">
<PossiblyUndefinedIntArrayOffset>
<code>$contentChanges[0]</code>
</PossiblyUndefinedIntArrayOffset>
</file>
<file src="src/Psalm/Internal/MethodIdentifier.php">
<PossiblyUndefinedIntArrayOffset>
<code>$method_id_parts[1]</code>
Expand Down
1 change: 1 addition & 0 deletions src/Psalm/CodeLocation.php
Expand Up @@ -169,6 +169,7 @@ private function calculateRealLocation(): void

$codebase = $project_analyzer->getCodebase();

/** @psalm-suppress ImpureMethodCall */
$file_contents = $codebase->getFileContents($this->file_path);

$file_length = strlen($file_contents);
Expand Down