Skip to content

Conversation

@Javier-Novales
Copy link
Contributor

Add support for providing a custom message when terminating a connection

This allows for clients to get customized messages when connections are terminated early.

@Javier-Novales Javier-Novales marked this pull request as ready for review March 6, 2025 20:08
@brianquinlan brianquinlan requested a review from mosuem March 26, 2025 18:27
@github-actions
Copy link

github-actions bot commented Mar 26, 2025

PR Health

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
http2 Non-Breaking 2.3.1 3.0.0 2.4.0 ✔️
Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

Coverage ✔️
File Coverage
pkgs/http2/lib/src/connection.dart 💚 83 %
pkgs/http2/lib/transport.dart 💚 82 %

This check for test coverage is informational (issues shown here will not fail the PR).

API leaks ✔️

The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.

Package Leaked API symbols
License Headers ✔️
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
no missing headers

All source files should start with a license header.

Unrelated files missing license headers
Files
pkgs/http/example/main.dart

Copy link
Collaborator

@brianquinlan brianquinlan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to write tests for this?


/// Terminates this connection forcefully.
Future terminate([int? errorCode]);
Future terminate([int? errorCode, String? message]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this class is not final, changing the signature of this method is probably breaking. I don't know how important that is.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed bmw-tech/dart_apitool#207 - I do believe this is a breaking change, so this requires a version rev to 3.0.0. We should use that opportunity to do some changes like revving the minimum SDK version.

@mosuem
Copy link
Member

mosuem commented Apr 2, 2025

As this is a breaking change, we have to update the major version number according to https://semver.org/spec/v2.0.0-rc.1.html. If we do that, we might do some other major version changes to go with it.

So I filed #1745 which will upgrade the used version of the Dart SDK and set the new version to 3.0.0-wip. Once that is landed, you should git rebase master your PR and replace 3.0.0-wip with 3.0.0 both in the pubspec.yaml and the CHANGELOG.md. This will enable us to publish the new version.

@Javier-Novales Javier-Novales force-pushed the connection_terminate_message branch from 1f334ce to 836ee7c Compare April 3, 2025 00:36
@github-actions
Copy link

github-actions bot commented Apr 4, 2025

Package publishing

Package Version Status Publish tag (post-merge)
package:cronet_http 1.3.3 already published at pub.dev
package:cupertino_http 2.1.0 already published at pub.dev
package:http 1.4.0-wip WIP (no publish necessary)
package:http2 3.0.0 ready to publish http2-v3.0.0
package:http_multi_server 3.2.2 already published at pub.dev
package:http_parser 4.1.2 already published at pub.dev
package:http_profile 0.1.1-wip WIP (no publish necessary)
package:ok_http 0.1.1-wip WIP (no publish necessary)
package:web_socket 0.1.6 already published at pub.dev
package:web_socket_channel 3.0.2 already published at pub.dev

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

@mosuem mosuem merged commit 6fabf06 into dart-lang:master Apr 4, 2025
36 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.

3 participants