-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix matching inline inputs/outputs with operations (#111)
Issue #, if available: #110 Description of changes: This fixes #110 (an IIOBE) by preventing the underlying issue: the FileCachingCollector mixing up operations with the same name in different namespaces. Unfortunately, the test that reproduced the issue is flaky, as it would only fail about half the time before the fix was added - I think there's some non-deterministic behavior in some part of the collector that affects the order of things being collected, and sometimes prevents exhibiting the incorrect behavior. I've confirmed that it reliably passes now after the fix was applied.
- Loading branch information
Showing
4 changed files
with
51 additions
and
1 deletion.
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
14 changes: 14 additions & 0 deletions
14
src/test/resources/software/amazon/smithy/lsp/ext/models/operation-name-conflict/a.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,14 @@ | ||
$version: "2" | ||
|
||
namespace a | ||
|
||
operation HelloWorld { | ||
input := { | ||
@required | ||
name: String | ||
} | ||
output := { | ||
@required | ||
name: String | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/test/resources/software/amazon/smithy/lsp/ext/models/operation-name-conflict/b.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,16 @@ | ||
$version: "2" | ||
|
||
namespace b | ||
|
||
string Ignored | ||
|
||
operation HelloWorld { | ||
input := { | ||
@required | ||
name: String | ||
} | ||
output := { | ||
@required | ||
name: String | ||
} | ||
} |