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

Update dss with upstream aws main branch changes #56

Merged
merged 3 commits into from
Oct 18, 2024

Conversation

lewisjkl
Copy link

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

* Add support for multiple workspaces

Previously, the language server only knew about a single workspace root,
so if your editor was using [WorkspaceFolders](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_workspaceFolders)
the server would just pick the first one, and not load any others. This
commit allows the server to load multiple workspaces. The primary
challenge was handling state changes to individual workspaces
independently. We use client-side file watchers and the
`didChangeWatchedFiles` notification to make sure projects are up to
date with new and deleted Smithy files, and any changes to build files
(i.e. smithy-build.json). `didChangeWatchedFiles` sends a flat list of
file events - not partitioned by workspace - so we have to figure out
which projects each change applies to. This is done by creating a
`PathMatcher` for each project's smithy files and build files, then
matching on each file event. This way, we can apply changes to each
individual project, rather than reloading everything. Selectors were
also updated to select from all available projects.

* Fix file patterns for windows

The file patterns we were using for telling the client which files to
watch, and to match file events in `didChangeWatchedFiles` to projects,
were not working properly on windows because they didn't use the correct
file separator.
Refactors various things to make use of newer java features, including
record classes, text blocks, and new APIs.
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@lewisjkl lewisjkl merged commit a6fde63 into disneystreaming:dss Oct 18, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants