Skip to content

v0.19.0-beta.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@omnisharp-bot omnisharp-bot released this 07 Dec 21:42
· 699 commits to master since this release
12748c6

As part of this release we had 30 issues closed.

Breaking Changes

Serializer Changes

  • The LSP Serializer renamed to LSPSerializer
  • Added serialization rules for client
    • Ensure code actions are provided properly.
  • Updated serialization rules for server

Registration Changes

The 3.16 specification defines the SemanticLegend in such a way that the client produces a list of supported tokens and the server must return the tokens it supports and the index order it will use.

Today we get the registration options at registration of a handler, but this is typically before we have started communicating with the server.

This change adds a new interface IRegistrationOptions<TOptions, TCapability> and all interfaces have been updated to implement this interface if they have both a client capability and a server registration option.

Abstract Handlers Registration Options

The abstract base classes by the above change now have a new method that must be implemented.

protected internal abstract TRegistrationOptions CreateRegistrationOptions(TCapability capability);

The base handler then caches the resulting value so this method is only ever called once.

Existing implementations of GetRegistrationOptions can be replaced with CreateRegistrationOptions.

Abstract Handlers

All the abstract handler base classes have been renamed to have a Suffix of "Base" if there was not one there before.

The fix for this is simply to make sure the Base suffix has been applied.

Feature Specific Files

This is not a breaking change, the goal was to make sure that namespaces did not change, if there is a miss let me know.

Any classes related to the Request, Response, Capability and Registration Options have been moved into a XyzFeature.cs file. This will help reduce the number of overall files in the repo, as well as hopefully with discoverabiliy. More importantly this make it easier to create new features, as all the components for a given feature will be in the same file.

TextDocumentSyncRegistrationOptions Added

The IDidXyzTextDocument handlers have been updated to have specific named options, and a master options class TextDocumentSyncRegistrationOptions has been added. You provide the TextDocumentSyncRegistrationOptions and all the other named options can be implicitly created from it.

Source Generation

Source Generation has been refactored to be a little more flexible and better organized (it's not prefect but better).

Some documentation has been added to document the attributes and their usage. These should available to consumers to also use themselves, please let me know of any bugs you might encounter with them.

HandlerIdentity is now an interface named IHandlerIdentity

HandlerIdentity is not automatically implemented via source generators (you can implement it yourself if you want to)

This type is used to ensure proper routing of CodeAction, CodeLens and other requests. Changing it an interface was required to support classes and records at the same time.

Records

Most model classes have been moved to record classes and init only properties. This allows use of the with operator.

Records are supported in netstandard2.0 using a shim class very similar to null reference types.

Added two new library references

Microsoft.Extensions.Configuration.Binder and Microsoft.Extensions.Options.ConfigurationExtensions have been added to make integration between configuration and options a little easier.

CompletionItem TextEdit change

CompletionItem has been updated as the per the spec, to be a union of TextEdit and InsertRangeEdit.

Number types have changed

The spec added deeper definition for integer, unsigned integer and decimal

uinteger - Defines an unsigned integer number in the range of 0 to 2^31 - 1.
Due to this constraint it's easier for us to just keep using int instead of causing some headache by using uint.

long is now gone, replaced with int. Also a few places where precentage was allowed had been double but they have been changed to uint so they have been changed to int accordingly

Types with breaking changes:

  • FoldingRange
  • BooleanNumberString
  • IWorkDoneObserver
  • WorkDoneProgressBegin
  • WorkDoneProgressReport

Semantic Tokens Method

member has been renamed method as per the spec.

Auto-generated method perfixes have been updated

Request objects with the prefix "Set", "Attach", "Launch" or "Read" will no longer be prefixed with "Send" or "Request".

router.change affects the following:

  • Debug Adapter Protocol
    • SetVariableArguments - from router.SendSetVariable(...) to router.SetVariable()
    • AttachRequestArguments - from router.RequestAttach(...) to router.Attach()
    • LaunchRequestArguments - from router.RequestAttach(...) to router.Launch()
    • ReadMemoryArguments - from router.SendReadMemory(...) to router.ReadMemory()
    • SetBreakpointsArguments - from router.SendSetBreakpoints(...) to router.SetBreakpoints()
    • SetDataBreakpointsArguments - from router.SendSetDataBreakpoints(...) to router.SetDataBreakpoints()
    • SetExceptionBreakpointsArguments - from router.SendSetExceptionBreakpoints(...) to router.SetExceptionBreakpoints()
    • SetExpressionArguments - from router.SendSetExpression(...) to router.SetExpression()
    • SetFunctionBreakpointsArguments - from router.SendSetFunctionBreakpoints(...) to router.SetFunctionBreakpoints()
    • SetInstructionBreakpointsArguments - from router.SendSetInstructionBreakpoints(...) to router.SetInstructionBreakpoints()
  • Language Server Protocol
    • SetTraceParams - from router.SendSetTrace(...) to router.SetTrace()

DAP Updates

  • This updates to the latest DAP spec, added in a few enums and replaced strings that were used in a few locations.
  • Added InvalidatedEvent

TelemetryEvent Change

The property TelemetryEvent.Data has been renamed to ExtensionData and the type has been changed as well.

breaking changes

  • #464 Added AllowDerivedRequest support for lsp telemetry event
  • #448 Updated to latest DAP spec
  • #446 Feature/4 spec update
  • #442 Records and init only properties
  • #440 Breaking: Registration Options require Client Capability during creation
  • #432 Breaking: LSP ISerializer interface is now deprecated, and marked obsolete

feature

  • #458 Added ability to define the scheduler used for both input and output

enhancements

  • #461 Reduce use of Assembly.GetTypes() or ExportedTypes
  • #450 OnTypeRename -> LinkedEditingRange
  • #431 Added latest spec changes, showDocument and onTypeRename
  • #417 Added warning message when a message is dropped during initialization
  • #314 Move to use built in source generation

bugs

  • #459 Added fixes for document color provider, as well as related fixes for other resolve features.
  • #457 Updated client registration handler to behave more like the vscode
  • #447 Fixed case where if serialization fails the server will die silently.

chores

  • #465 Removed ConnectedCapability interface as it isn't needed any more
  • #460 make all integration tests retryable. nullability clean up

dependenciess

  • #462 Bump lint-staged from 10.5.2 to 10.5.3
  • #454 Bump Microsoft.CodeAnalysis.Analyzers from 3.3.1 to 3.3.2
  • #453 Bump DryIoc.Internal from 4.5.1 to 4.5.2
  • #452 Bump peaceiris/actions-label-commenter from v1.8.1 to v1.8.2
  • #451 Bump Microsoft.NET.Test.Sdk from 16.8.0 to 16.8.3
  • #445 Bump prettier from 2.2.0 to 2.2.1
  • #444 Bump peaceiris/actions-label-commenter from v1.8.0 to v1.8.1
  • #443 Bump Bogus from 31.0.3 to 32.0.1
  • #441 Bump peaceiris/actions-label-commenter from v1.6.1 to v1.8.0
  • #437 Bump lint-staged from 10.5.1 to 10.5.2
  • #435 Bump ReportGenerator from 4.8.0 to 4.8.1
  • #433 Bump prettier from 2.1.2 to 2.2.0
  • #428 Bump ReportGenerator from 4.7.1 to 4.8.0