-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normalize paths in the project loader
Fixes an issue where the server can't find project files when smithy-build.json has unnormalized paths.
- Loading branch information
1 parent
6fce052
commit 53c688e
Showing
17 changed files
with
152 additions
and
14 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
5 changes: 5 additions & 0 deletions
5
src/test/resources/software/amazon/smithy/lsp/project/subdirs/model2/subdir2/sub2.smithy
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$version: "2.0" | ||
|
||
namespace com.foo | ||
|
||
string Baz |
5 changes: 5 additions & 0 deletions
5
...sources/software/amazon/smithy/lsp/project/subdirs/model2/subdir2/subsubdir/subsub.smithy
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$version: "2.0" | ||
|
||
namespace com.foo | ||
|
||
string Boz |
2 changes: 1 addition & 1 deletion
2
src/test/resources/software/amazon/smithy/lsp/project/subdirs/smithy-build.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"version": "1", | ||
"sources": ["model/"] | ||
"sources": ["model", "model2"] | ||
} |
8 changes: 8 additions & 0 deletions
8
src/test/resources/software/amazon/smithy/lsp/project/unnormalized-dirs/.smithy-project.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"dependencies": [ | ||
{ | ||
"name": "smithy-test-traits", | ||
"path": "./././/smithy-test-traits.jar" | ||
} | ||
] | ||
} |
5 changes: 5 additions & 0 deletions
5
src/test/resources/software/amazon/smithy/lsp/project/unnormalized-dirs/model/one.smithy
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$version: "2.0" | ||
|
||
namespace com.foo | ||
|
||
string One |
26 changes: 26 additions & 0 deletions
26
...t/resources/software/amazon/smithy/lsp/project/unnormalized-dirs/model/test-traits.smithy
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
$version: "1.0" | ||
|
||
namespace ns.test | ||
|
||
use smithy.test#test | ||
|
||
@test() | ||
service Weather { | ||
version: "2022-05-24", | ||
operations: [GetCurrentTime] | ||
} | ||
|
||
@readonly | ||
operation GetCurrentTime { | ||
input: GetCurrentTimeInput, | ||
output: GetCurrentTimeOutput | ||
} | ||
|
||
@input | ||
structure GetCurrentTimeInput {} | ||
|
||
@output | ||
structure GetCurrentTimeOutput { | ||
@required | ||
time: Timestamp, | ||
} |
5 changes: 5 additions & 0 deletions
5
src/test/resources/software/amazon/smithy/lsp/project/unnormalized-dirs/model2/two.smithy
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$version: "2.0" | ||
|
||
namespace com.foo | ||
|
||
string Two |
5 changes: 5 additions & 0 deletions
5
src/test/resources/software/amazon/smithy/lsp/project/unnormalized-dirs/model3/three.smithy
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$version: "2.0" | ||
|
||
namespace com.foo | ||
|
||
string Three |
5 changes: 5 additions & 0 deletions
5
src/test/resources/software/amazon/smithy/lsp/project/unnormalized-dirs/smithy-build.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"version": "1", | ||
"sources": ["./model/", "model2////"], | ||
"imports": ["././././model3//"] | ||
} |
Binary file added
BIN
+8.75 KB
...est/resources/software/amazon/smithy/lsp/project/unnormalized-dirs/smithy-test-traits.jar
Binary file not shown.