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 142 commits into
base: master
Choose a base branch
from
Open

Language Server Rewrite #993

wants to merge 142 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
@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on 539656e. 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.5-lsp-refactor.20240806164122.tgz

@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on d763dbe. 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.5-lsp-refactor.20240821193439.tgz

@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on 373852d. 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.6-lsp-refactor.20240923145149.tgz

@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on 668032f. 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.7-lsp-refactor.20240927133020.tgz

@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on 8a20243. 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.7-lsp-refactor.20240927191732.tgz

@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on 9407565. 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.7-lsp-refactor.20241011170852.tgz

* Fix issues with the .gitignore loading for pathFilterer

* Apply suggestions from code review

---------

Co-authored-by: Christopher Dwyer-Perkins <[email protected]>
@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on 1519a87. 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.7-lsp-refactor.20241011202004.tgz

…1327)

* rebuildPathFilterer now retains project-specific patterns on rebuild

* Add test to verify removed project includeLists get unregistered
@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on e789422. 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.7-lsp-refactor.20241015135703.tgz

@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on 9ec6f72. 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.8-lsp-refactor.20241018203700.tgz

* rebuildPathFilterer now retains project-specific patterns on rebuild

* Add test to verify removed project includeLists get unregistered

* Include more information in the busy tracker

* Fix lint issues
@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on 2aeae9b. 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.8-lsp-refactor.20241028194456.tgz

* Fix infinite loop issue with standalone projects

* Fix failing tests

* Tweaks
@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on 30be955. 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.8-lsp-refactor.20241101175856.tgz

* Cancel requests to disposed projects

* Fix broken package-lock
@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on 99d1548. 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.8-lsp-refactor.20241104144219.tgz

@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on c5674f5. 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.8-lsp-refactor.20241119205608.tgz

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant