Skip to content

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.

@brianquinlan
Copy link
Collaborator

@lrhn Do you want to land this?

@lrhn
Copy link
Member Author

lrhn commented Sep 30, 2025

It's safer not to land.

The type is exported by lib/http_parser.dart, so I was wrong that it's not public.

It probably shouldn't be exported — its interface is the same as Map, so it's not needed as a type, and it doesn't appear as a type in any other public API.
Nobody should ever want to extend it, but until we decide to remove that export that, this would be breaking.

I'll close, and see if I can remember to reopen if things have changed.

@lrhn lrhn closed this Sep 30, 2025
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