dart-lang / http_parser

A platform-independent Dart package for parsing and serializing HTTP formats.
https://pub.dev/packages/http_parser
BSD 3-Clause "New" or "Revised" License
38 stars 28 forks source link

Error in http_parser with dart 3.4 #92

Open dannnnthemannnn opened 3 months ago

dannnnthemannnn commented 3 months ago

Running flutter pub run build_runner build --output=build

yields

[WARNING] ../../../../.pub-cache/hosted/pub.dev/http_parser-4.0.2/lib/src/case_insensitive_map.dart:10:37: Error: The class 'CanonicalizedMap' can't be extended outside of its library because it's a final class.
class CaseInsensitiveMap<V> extends CanonicalizedMap<String, String, V> {
navaronbracke commented 1 month ago

Does this reproduce with http_parser 4.1.0 ?

Neither CanonicalizedMap https://github.com/dart-lang/collection/blob/0c1f829c29da1d63488be774f430b2035a565d6f/lib/src/canonicalized_map.dart#L13

nor CaseInsensitiveMap https://github.com/dart-lang/http_parser/blob/master/lib/src/case_insensitive_map.dart are marked with final it seems?

NicolaVerbeeck commented 1 month ago

You need to upgrade to latest version of collection (which flutter does not 'like', so you can use overrides to accomplish this)