Skip to content

Conversation

@jyameo
Copy link
Contributor

@jyameo jyameo commented Jan 2, 2026

ServiceExtensionRequest:

This PR removes the package:built_value dependency from ServiceExtensionRequest and replaces it with standard Dart JSON serialization.

Changes

  • Rewrote ServiceExtensionRequest as a simple Dart class with manual JSON serialization
  • Removed ServiceExtensionRequest from the @SerializersFor annotation in serializers.dart
  • Updated dev_handler.dart to serialize ServiceExtensionRequest using the wire format ['ServiceExtensionRequest', request.toJson()] in _serializeMessage()
  • Added ServiceExtensionRequest case to _deserializeEvent() helper in client.dart to deserialize from wire format
  • Changed constructor to use named parameters with a convenience fromArgs() factory method

Testing

  • Existing tests for service extension functionality continue to pass with the updated implementation
  • The change follows the same pattern used for HotReloadRequest, HotReloadResponse, HotRestartRequest, and HotRestartResponse

Fixes dart-lang/sdk#62302


ServiceExtensionResponse:

This PR removes the package:built_value dependency from ServiceExtensionResponse and replaces it with standard Dart JSON serialization.

Changes

  • Rewrote ServiceExtensionResponse as a simple Dart class with manual JSON serialization
  • Removed ServiceExtensionResponse from the @SerializersFor annotation in serializers.dart
  • Updated client.dart to serialize ServiceExtensionResponse using the wire format ['ServiceExtensionResponse', response.toJson()] in _sendServiceExtensionResponse()
  • Added ServiceExtensionResponse case to _deserializeMessage() helper in dev_handler.dart to deserialize from wire format
  • Kept the fromResult() factory method for convenience and simplified the result field to be Map<String, dynamic>? instead of encoded JSON string

Testing

  • Existing tests for service extension functionality continue to pass with the updated implementation
  • The change follows the same pattern used for HotReloadRequest, HotReloadResponse, HotRestartRequest, and HotRestartResponse

Fixes dart-lang/sdk#62303

@jyameo jyameo merged commit f47763a into dart-lang:main Jan 2, 2026
43 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove built_value dependency from ServiceExtensionResponse Remove built_value dependency from ServiceExtensionRequest

2 participants