Skip to content

Commit

Permalink
bump: packages
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewmd5 committed Oct 19, 2024
1 parent 3449e8a commit 59e5dee
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 14 deletions.
6 changes: 3 additions & 3 deletions Compiler/Compiler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="8.0.0" />
<PackageReference Include="OmniSharp.Extensions.LanguageServer" Version="0.19.5" />
<PackageReference Include="Spectre.Console" Version="0.48.0" />
<PackageReference Include="Spectre.Console.Json" Version="0.48.0" />
<PackageReference Include="OmniSharp.Extensions.LanguageServer" Version="0.19.9" />
<PackageReference Include="Spectre.Console" Version="0.49.1" />
<PackageReference Include="Spectre.Console.Json" Version="0.49.1" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.23407.1" />
</ItemGroup>

Expand Down
6 changes: 3 additions & 3 deletions Compiler/LangServer/Handlers/CompletionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ namespace Compiler.LangServer
public sealed class CompletionHandler : ICompletionHandler
{
private readonly BufferManager _bufferManager;
private readonly DocumentSelector _documentSelector;
private readonly TextDocumentSelector _documentSelector;
private readonly HashSet<string> _keywords;
private readonly HashSet<string> _decorators;
private readonly HashSet<string> _constants;

public CompletionHandler(BufferManager bufferManager, CompilerHost compilerHost)
{
_bufferManager = bufferManager;
_documentSelector = new DocumentSelector(
new DocumentFilter()
_documentSelector = new TextDocumentSelector(
new TextDocumentFilter()
{
Pattern = "**/*.bop"
}
Expand Down
2 changes: 1 addition & 1 deletion Compiler/LangServer/Handlers/HoverHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public HoverHandler(BufferManager bufferManager,

public HoverRegistrationOptions GetRegistrationOptions(HoverCapability capability, ClientCapabilities clientCapabilities)
{
return new HoverRegistrationOptions() { DocumentSelector = DocumentSelector.ForLanguage("bebop") };
return new HoverRegistrationOptions() { DocumentSelector = TextDocumentSelector.ForLanguage("bebop") };
}

public Task<Hover?> Handle(HoverParams request, CancellationToken cancellationToken)
Expand Down
2 changes: 1 addition & 1 deletion Compiler/LangServer/Handlers/SemanticTokenHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protected override SemanticTokensRegistrationOptions CreateRegistrationOptions(S
{
return new SemanticTokensRegistrationOptions
{
DocumentSelector = DocumentSelector.ForLanguage("bebop"),
DocumentSelector = TextDocumentSelector.ForLanguage("bebop"),
Legend = _legend,
Full = new SemanticTokensCapabilityRequestFull
{
Expand Down
6 changes: 3 additions & 3 deletions Compiler/LangServer/Handlers/TextDocumentSyncHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public sealed class TextDocumentSyncHandler : TextDocumentSyncHandlerBase
private readonly BufferManager _bufferManager;
private readonly BebopDiagnosticPublisher _publisher;
private readonly BebopLangServerLogger _logger;
private readonly DocumentSelector _documentSelector;
private readonly TextDocumentSelector _documentSelector;

public TextDocumentSyncKind Change { get; } = TextDocumentSyncKind.Full;

Expand All @@ -41,7 +41,7 @@ public TextDocumentSyncHandler(
_bufferManager = bufferManager ?? throw new ArgumentNullException(nameof(bufferManager));
_publisher = publisher ?? throw new ArgumentNullException(nameof(publisher));
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
_documentSelector = new DocumentSelector(new DocumentFilter()
_documentSelector = new TextDocumentSelector(new TextDocumentFilter()
{
Pattern = "**/*.bop",
});
Expand All @@ -52,7 +52,7 @@ public override TextDocumentAttributes GetTextDocumentAttributes(DocumentUri uri
return new TextDocumentAttributes(uri, "bop");
}

protected override TextDocumentSyncRegistrationOptions CreateRegistrationOptions(SynchronizationCapability capability, ClientCapabilities clientCapabilities)
protected override TextDocumentSyncRegistrationOptions CreateRegistrationOptions(TextSynchronizationCapability capability, ClientCapabilities clientCapabilities)
{
return new TextDocumentSyncRegistrationOptions()
{
Expand Down
2 changes: 1 addition & 1 deletion Core/Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Errata" Version="0.11.0" />
<PackageReference Include="Errata" Version="0.13.0" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="8.0.0" />
</ItemGroup>

Expand Down
11 changes: 9 additions & 2 deletions Core/Meta/JsonContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ namespace Core.Meta;
[JsonSerializable(typeof(CompilerOutput))]
[JsonSerializable(typeof(GeneratedFile))]
[JsonSerializable(typeof(AuxiliaryFile))]
[JsonSerializable(typeof(SpanException))]
[JsonSerializable(typeof(Exception))]
[JsonSerializable(typeof(SpanException))]
[JsonSerializable(typeof(DiagnosticLogger.Diagnostic))]
[JsonSerializable(typeof(Span))]
[JsonSerializable(typeof(GeneratorContext))]
Expand Down Expand Up @@ -80,7 +80,14 @@ public override void Write(Utf8JsonWriter writer, Exception value, JsonSerialize
if (value.InnerException is not null)
{
writer.WritePropertyName("innerException");
JsonSerializer.Serialize(writer, value.InnerException, options);
if (value.InnerException is SpanException spanException)
{
JsonSerializer.Serialize(writer, spanException, JsonContext.Default.SpanException);
}
else
{
JsonSerializer.Serialize(writer, value.InnerException, JsonContext.Default.Exception);
}
}
writer.WriteEndObject();
}
Expand Down

0 comments on commit 59e5dee

Please sign in to comment.