Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Http-parser: Make CaseInsensitiveMap be extension type. #1716

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lrhn
Copy link
Member

@lrhn lrhn commented Feb 12, 2025

Avoids extending a class unnecessarily, which may pave the way for package:collection making the class final.

(Nothing uses that CaseInsensitiveMap is a type at all, the constructors could all just be functions returning Map.)

Change is not breaking, the type is not publicly visible.

Avoids extending a class unnecessarily, which *may*
pave the way for `package:collection` making the class
final.
Copy link

Package publishing

Package Version Status Publish tag (post-merge)
package:cronet_http 1.3.3-wip WIP (no publish necessary)
package:cupertino_http 2.0.3-wip WIP (no publish necessary)
package:http 1.4.0-wip WIP (no publish necessary)
package:http2 2.3.2-wip WIP (no publish necessary)
package:http_multi_server 3.2.2 already published at pub.dev
package:http_parser 4.1.3 ready to publish http_parser-v4.1.3
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.

Copy link

github-actions bot commented Feb 12, 2025

PR Health

Changelog Entry ✔️
Package Changed Files

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

Coverage ✔️
File Coverage
pkgs/http_parser/lib/src/case_insensitive_map.dart 💚 100 %

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
pkgs/http_client_conformance_tests/example/client_test.dart
pkgs/http_client_conformance_tests/lib/src/dummy_isolate.dart
pkgs/http_parser/test/example_test.dart
pkgs/http_profile/lib/http_profile.dart
pkgs/web_socket/example/web_socket_example.dart
pkgs/web_socket/lib/testing.dart
pkgs/web_socket_conformance_tests/example/client_test.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.

That's neat! My first introduction to extension types.

@kevmoo
Copy link
Member

kevmoo commented Feb 13, 2025

Hold a sec. Strictly, this is breaking right? Folks might implement/extend this?

Maybe we say that's okay, but we should at least discuss.

@brianquinlan
Copy link
Collaborator

Hold a sec. Strictly, this is breaking right? Folks might implement/extend this?

Maybe we say that's okay, but we should at least discuss.

Good point!

@lrhn said that this type is not publicly visible but it seems to be

The only instances of extends CaseInsensitiveMap/implements CaseInsensitiveMap that I found on github are false positives.

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