-
Notifications
You must be signed in to change notification settings - Fork 32
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
fall back to chokidar file watcher if the lsp client doesn't support capabilities.workspace.didChangeWatchedFiles.dynamicRegistration
#1011
Open
DetachHead
wants to merge
2
commits into
main
Choose a base branch
from
fallback-filewatcher
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+62
−13
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…'t support `capabilities.workspace.didChangeWatchedFiles.dynamicRegistration`
DetachHead
force-pushed
the
fallback-filewatcher
branch
from
January 23, 2025 14:57
d08a3cd
to
d6d9ad1
Compare
…se language server class which is used by browser-basedpyright and can't import node fs modules
DetachHead
changed the title
attempt to fall back to chokidar file watcher if the lsp client doesn't support
fall back to chokidar file watcher if the lsp client doesn't support Jan 23, 2025
capabilities.workspace.didChangeWatchedFiles.dynamicRegistration
capabilities.workspace.didChangeWatchedFiles.dynamicRegistration
Diff from mypy_primer, showing the effect of this PR on open source code: sympy (https://github.com/sympy/sympy)
- Type of "sol1" is "Equality | Unknown" (reportUnknownVariableType)
+ Type of "sol1" is "Equality | Unknown | Relational | Unequality | Integer" (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_subscheck.py:37:34 - error: Cannot access attribute "lhs" for class "Integer"
+ Attribute "lhs" is unknown (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_subscheck.py:38:34 - error: Cannot access attribute "lhs" for class "Integer"
+ Attribute "lhs" is unknown (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_subscheck.py:39:34 - error: Cannot access attribute "lhs" for class "Integer"
+ Attribute "lhs" is unknown (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_subscheck.py:40:34 - error: Cannot access attribute "lhs" for class "Integer"
+ Attribute "lhs" is unknown (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_subscheck.py:41:34 - error: Cannot access attribute "lhs" for class "Integer"
+ Attribute "lhs" is unknown (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_subscheck.py:42:34 - error: Cannot access attribute "lhs" for class "Integer"
+ Attribute "lhs" is unknown (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_subscheck.py:43:34 - error: Cannot access attribute "lhs" for class "Integer"
+ Attribute "lhs" is unknown (reportAttributeAccessIssue)
- Type of "sol3" is "Equality | Unknown" (reportUnknownVariableType)
+ Type of "sol3" is "Equality | Unknown | Relational | Unequality | Integer" (reportUnknownVariableType)
- Type of "eqn" is "Equality | Unknown" (reportUnknownVariableType)
+ Type of "eqn" is "Equality | Unknown | Relational | Unequality | Integer" (reportUnknownVariableType)
- Type of "sol" is "Equality | Unknown" (reportUnknownVariableType)
+ Type of "sol" is "Equality | Unknown | Relational | Unequality | Integer" (reportUnknownVariableType)
- Type of "sol" is "Equality | Unknown" (reportUnknownVariableType)
+ Type of "sol" is "Equality | Unknown | Relational | Unequality | Integer" (reportUnknownVariableType)
- Type of "eqs" is "list[Equality | Unknown]" (reportUnknownVariableType)
+ Type of "eqs" is "list[Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "sol" is "list[Equality | Unknown]" (reportUnknownVariableType)
+ Type of "sol" is "list[Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "eq" is "tuple[Equality | Unknown, Equality | Unknown]" (reportUnknownVariableType)
+ Type of "eq" is "tuple[Equality | Unknown | Relational | Unequality | Integer, Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "sol" is "list[Equality | Unknown]" (reportUnknownVariableType)
+ Type of "sol" is "list[Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "eq" is "tuple[Equality | Unknown, Equality | Unknown]" (reportUnknownVariableType)
+ Type of "eq" is "tuple[Equality | Unknown | Relational | Unequality | Integer, Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "sol" is "list[Equality | Unknown]" (reportUnknownVariableType)
+ Type of "sol" is "list[Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "eq" is "tuple[Equality | Unknown, Equality | Unknown]" (reportUnknownVariableType)
+ Type of "eq" is "tuple[Equality | Unknown | Relational | Unequality | Integer, Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "sol" is "list[Equality | Unknown]" (reportUnknownVariableType)
+ Type of "sol" is "list[Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "eq" is "tuple[Equality | Unknown, Equality | Unknown]" (reportUnknownVariableType)
+ Type of "eq" is "tuple[Equality | Unknown | Relational | Unequality | Integer, Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "sol" is "list[Equality | Unknown]" (reportUnknownVariableType)
+ Type of "sol" is "list[Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "eq" is "tuple[Equality | Unknown, Equality | Unknown]" (reportUnknownVariableType)
+ Type of "eq" is "tuple[Equality | Unknown | Relational | Unequality | Integer, Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "sol" is "list[Equality | Unknown]" (reportUnknownVariableType)
+ Type of "sol" is "list[Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "eq" is "tuple[Equality | Unknown, Equality | Unknown]" (reportUnknownVariableType)
+ Type of "eq" is "tuple[Equality | Unknown | Relational | Unequality | Integer, Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "sol" is "list[Equality | Unknown]" (reportUnknownVariableType)
+ Type of "sol" is "list[Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "eq" is "tuple[Equality | Unknown, Equality | Unknown]" (reportUnknownVariableType)
+ Type of "eq" is "tuple[Equality | Unknown | Relational | Unequality | Integer, Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "sol" is "list[Equality | Unknown]" (reportUnknownVariableType)
+ Type of "sol" is "list[Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "eq" is "tuple[Equality | Unknown, Equality | Unknown]" (reportUnknownVariableType)
+ Type of "eq" is "tuple[Equality | Unknown | Relational | Unequality | Integer, Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "sol" is "list[Equality | Unknown]" (reportUnknownVariableType)
+ Type of "sol" is "list[Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "eq" is "tuple[Equality | Unknown, Equality | Unknown]" (reportUnknownVariableType)
+ Type of "eq" is "tuple[Equality | Unknown | Relational | Unequality | Integer, Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "sol" is "list[Equality | Unknown]" (reportUnknownVariableType)
+ Type of "sol" is "list[Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "eq" is "tuple[Equality | Unknown, Equality | Unknown]" (reportUnknownVariableType)
+ Type of "eq" is "tuple[Equality | Unknown | Relational | Unequality | Integer, Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "sol" is "list[Equality | Unknown]" (reportUnknownVariableType)
+ Type of "sol" is "list[Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "eq" is "tuple[Equality | Unknown, Equality | Unknown]" (reportUnknownVariableType)
+ Type of "eq" is "tuple[Equality | Unknown | Relational | Unequality | Integer, Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "sol" is "list[Equality | Unknown]" (reportUnknownVariableType)
+ Type of "sol" is "list[Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "eq" is "tuple[Equality | Unknown, Equality | Unknown]" (reportUnknownVariableType)
+ Type of "eq" is "tuple[Equality | Unknown | Relational | Unequality | Integer, Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "sol" is "list[Equality | Unknown]" (reportUnknownVariableType)
+ Type of "sol" is "list[Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "eq" is "tuple[Equality | Unknown, Equality | Unknown, Equality | Unknown]" (reportUnknownVariableType)
+ Type of "eq" is "tuple[Equality | Unknown | Relational | Unequality | Integer, Equality | Unknown | Relational | Unequality | Integer, Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "sol" is "list[Equality | Unknown]" (reportUnknownVariableType)
+ Type of "sol" is "list[Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "eq" is "tuple[Equality | Unknown, Equality | Unknown, Equality | Unknown]" (reportUnknownVariableType)
+ Type of "eq" is "tuple[Equality | Unknown | Relational | Unequality | Integer, Equality | Unknown | Relational | Unequality | Integer, Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "sol" is "list[Equality | Unknown]" (reportUnknownVariableType)
+ Type of "sol" is "list[Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "eq" is "tuple[Equality | Unknown, Equality | Unknown, Equality | Unknown]" (reportUnknownVariableType)
+ Type of "eq" is "tuple[Equality | Unknown | Relational | Unequality | Integer, Equality | Unknown | Relational | Unequality | Integer, Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
- Type of "sol" is "list[Equality | Unknown]" (reportUnknownVariableType)
+ Type of "sol" is "list[Equality | Unknown | Relational | Unequality | Integer]" (reportUnknownVariableType)
... (truncated 4027 lines) ...
spack (https://github.com/spack/spack)
- /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/cumulative-vrange-middle/package.py:18:5 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+ /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/cumulative-vrange-middle/package.py:18:5 - warning: Result of call expression is of type "((pkg: type[PackageBase]) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
- /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/cumulative-vrange-root/package.py:18:5 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+ /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/cumulative-vrange-root/package.py:18:5 - warning: Result of call expression is of type "((pkg: type[PackageBase]) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
- /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/cumulative-vrange-root/package.py:19:5 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+ /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/cumulative-vrange-root/package.py:19:5 - warning: Result of call expression is of type "((pkg: type[PackageBase]) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
- /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dep-diamond-patch-mid1/package.py:26:5 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+ /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dep-diamond-patch-mid1/package.py:26:5 - warning: Result of call expression is of type "((pkg: type[PackageBase]) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
- /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dep-diamond-patch-mid2/package.py:26:5 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+ /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dep-diamond-patch-mid2/package.py:26:5 - warning: Result of call expression is of type "((pkg: type[PackageBase]) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
- /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dep-diamond-patch-top/package.py:26:5 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+ /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dep-diamond-patch-top/package.py:26:5 - warning: Result of call expression is of type "((pkg: type[PackageBase]) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
- /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dep-diamond-patch-top/package.py:27:5 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+ /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dep-diamond-patch-top/package.py:27:5 - warning: Result of call expression is of type "((pkg: type[PackageBase]) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
- /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dep-diamond-patch-top/package.py:28:5 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+ /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dep-diamond-patch-top/package.py:28:5 - warning: Result of call expression is of type "((pkg: type[PackageBase]) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
- /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dep-with-variants-if-develop/package.py:15:5 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+ /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dep-with-variants-if-develop/package.py:15:5 - warning: Result of call expression is of type "((pkg: type[PackageBase]) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
- /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dep-with-variants-if-develop-root/package.py:14:5 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+ /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dep-with-variants-if-develop-root/package.py:14:5 - warning: Result of call expression is of type "((pkg: type[PackageBase]) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
- /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/depb/package.py:16:5 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+ /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/depb/package.py:16:5 - warning: Result of call expression is of type "((pkg: type[PackageBase]) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
- /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dependency-foo-bar/package.py:21:5 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+ /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dependency-foo-bar/package.py:21:5 - warning: Result of call expression is of type "((pkg: type[PackageBase]) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
- /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dependent-install/package.py:17:5 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+ /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dependent-install/package.py:17:5 - warning: Result of call expression is of type "((pkg: type[PackageBase]) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
- /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dependent-install/package.py:18:5 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+ /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dependent-install/package.py:18:5 - warning: Result of call expression is of type "((pkg: type[PackageBase]) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
- /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dependent-of-dev-build/package.py:15:5 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+ /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/dependent-of-dev-build/package.py:15:5 - warning: Result of call expression is of type "((pkg: type[PackageBase]) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
- /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/depends-on-define-cmake-prefix-paths/package.py:16:5 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+ /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/depends-on-define-cmake-prefix-paths/package.py:16:5 - warning: Result of call expression is of type "((pkg: type[PackageBase]) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
- /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/depends-on-develop/package.py:16:5 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+ /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/depends-on-develop/package.py:16:5 - warning: Result of call expression is of type "((pkg: type[PackageBase]) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
... (truncated 474 lines) ...
AutoSplit (https://github.com/Toufool/AutoSplit): 310.63x slower (0.1s -> 18.4s in a single noisy sample)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #1010