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.
This commit makes the language server work with Smithy projects in subdirectories of the folder (or folders, in the case of e.g. vscode workspace folders) open in the editor. I previously added support for multiple workspace folders (an LSP concept), but I assumed only one project (Smithy LS concept) per workspace folder. So this commit fixes that mixing, allowing many projects per workspace folder.
Now, the language server will search through subdirectories of all workspace folders (by default, one workspace folder is open in the client) to find projects. Changes to build files, i.e. smithy-build.json, .smithy-project.json, are now tracked at the workspace level, so you can add a new project to an existing workspace.
I also did some cleanup of the project/workspace synchronization code, and moved some things around. A note on some tests: I'm using a
Files.createTempDirectory
, and adding theTestWorkspace
as a subdir. In a follow-up commit, I will be changingTestWorkspace
to be something likeTestProject
, which is more accurate. I didn't include it here to avoid a bunch of noise.Also:
I fixed a bug in #160 that caused a deadlock.
Issue #, if available:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.