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

Language Server Rewrite #993

Open
wants to merge 118 commits into
base: master
Choose a base branch
from
Open

Language Server Rewrite #993

wants to merge 118 commits into from

Conversation

TwitchBronBron
Copy link
Member

@TwitchBronBron TwitchBronBron commented Dec 21, 2023

There are some significant performance issues in the language server, focused around when files are opened/edited/closed from the editor. To mitigate this, we need to refactor the language server so that it's better about throttling/debouncing ALL the relevant files instead of just one at a time.

This is a fairly significant refactor of the language server code, and breaks it down into more manageable classes.

Task list

  • Port All the LSP functions to use the manager
  • Handle when watched files change (files not in a tab that were changed like git checkout or ropm install).
  • Handle when directories get added or deleted
  • Reload single project when bsconfig.json changes
  • Prevent revalidation when file is opened but contents haven't changed
  • Handle standalone files (files opened in a tab not included in a project)
  • Fix bugs with diagnostics being out of sync
  • Fix all the LanguageServer tests
  • Add new tests for ProjectManager and other new logic
  • Verify/manage when to pause or cancel validations
  • Clean up all unused functions in LanguageServer.ts
  • ignore changes from .roku-deploy-staging, .git, and other ignored folders
  • figure out why completions sometimes show global values instead of accurate results
  • handle logLevel across bsconfig.json files
  • handle quirks around semantic tokens (open file, find and replace all, see they didn't change)
  • fix the @trace() annotation so it doesn't log entire file contents.

Process for excluding files:

Build a global list of filters, based on:
- globs from files.exclude
- globs from .gitignore (maybe using this?)
- all files in ".git", and every workspaceFolder.outDir.
Also produce a per-project list of file globs based on the project's bsconfig (or default)

In the lsp, in onWatchedFilesChanged, filter out any files that match zero of the patterns from above (handling negated .gitignore results and files.exclude).

@TwitchBronBron TwitchBronBron changed the title Create ProjectManager Language Server Rewrite Jan 2, 2024
@TwitchBronBron TwitchBronBron added the create-package create a temporary npm package on every commit label May 29, 2024
@rokucommunity-bot
Copy link

Hey there! I just built a new version of the vscode extension based on 10b5ff5. You can download the .vsix here and then follow these installation instructions.

@rokucommunity-bot
Copy link

Hey there! I just built a new version of the vscode extension based on 1084057. You can download the .vsix here and then follow these installation instructions.

@rokucommunity-bot
Copy link

Hey there! I just built a new version of the vscode extension based on 77b78cc. You can download the .vsix here and then follow these installation instructions.

@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on 2bb939f. You can download it here or install it by running the following command:

npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-0.67.2-local-lsp-refactor.20240604173036.tgz

@rokucommunity-bot
Copy link

Hey there! I just built a new version of the vscode extension based on 2bb939f. You can download the .vsix here and then follow these installation instructions.

@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on e1d3075. You can download it here or install it by running the following command:

npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-0.67.2-local-lsp-refactor.20240606195041.tgz

@rokucommunity-bot
Copy link

Hey there! I just built a new version of the vscode extension based on e1d3075. You can download the .vsix here and then follow these installation instructions.

@rokucommunity-bot
Copy link

Hey there! I just built a new version of the vscode extension based on d75bac1. You can download the .vsix here and then follow these installation instructions.

@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on 963bcf0. You can download it here or install it by running the following command:

npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-0.67.2-local-lsp-refactor.20240613025452.tgz

@rokucommunity-bot
Copy link

Hey there! I just built a new version of the vscode extension based on 963bcf0. You can download the .vsix here and then follow these installation instructions.

@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on 0774d28. You can download it here or install it by running the following command:

npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-0.67.3-lsp-refactor.20240709205621.tgz

@rokucommunity-bot
Copy link

Hey there! I just built a new version of the vscode extension based on 0774d28. You can download the .vsix here and then follow these installation instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-package create a temporary npm package on every commit create-vsix PRs with this tag will trigger a vsix build on vscode-brightscript-language for every push
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant