Skip to content

Commit b91f027

Browse files
authored
Merge pull request #415 from pappleby/ls-compile-include-shadowlines
Bugfix: Language Server Compile command should include strings and metadata for shadow lines
2 parents 2fa2452 + db3f545 commit b91f027

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1414
- Fixed an issue that would cause testplans with syntax errors to incorrectly pass.
1515
- Fixed an issue where using `visited()` or `visited_count()` would not correctly track visiting node groups.
1616
- Language Server: NodeInfo objects now indicate whether a node contains any jumps to nodes in a different file.
17+
- Language Server: Fixed an issue where the Compile workspace command output was missing shadow lines
1718
- Language Server: `Microsoft.CodeAnalysis.CSharp` package updated to v4.14.0, fixing command detection in C# files using recent syntax added to C# (eg. `Required Members` from C# 11)
1819

1920
### Removed

YarnSpinner.LanguageServer.Tests/ReferenceTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public async Task Workspace_FindsReferencesToNodes()
4848
{
4949

5050
node1.References.Should().HaveCount(2);
51-
node1.Jumps.Should().HaveCount(1);
51+
node1.Jumps.Should().HaveCount(2);
5252
node1.Jumps.Should().Contain(j => j.DestinationTitle == "Node2" && j.Type == NodeJump.JumpType.Jump);
5353

5454
node2.References.Should().HaveCount(3);

YarnSpinner.LanguageServer/src/Server/YarnLanguageServer.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -608,12 +608,7 @@ private static Task<CompilerOutput> CompileCurrentProjectAsync(Workspace workspa
608608

609609
foreach (var line in result.StringTable ?? Enumerable.Empty<KeyValuePair<string, Yarn.Compiler.StringInfo>>())
610610
{
611-
if (line.Value.text == null)
612-
{
613-
continue;
614-
}
615-
616-
strings[line.Key] = line.Value.text;
611+
strings[line.Key] = line.Value.text ?? string.Empty;
617612

618613
var metadataEntry = new MetadataOutput
619614
{

0 commit comments

Comments
 (0)