Skip to content

Add protobuf 6.x compatibility #955

@xander1421

Description

@xander1421

Problem

The current protobuf version constraint (^4.2.0) prevents using livekit_client with protobuf 6.x. This blocks projects that depend on other packages requiring protobuf 6.x.

Breaking changes in protobuf 6.x

  1. PbList constructor is now private - createRepeated() methods in generated code use $pb.PbList<T>() which no longer works
  2. toProto3Json/fromProto3Json removed from BuilderInfo - These parameters in BuilderInfo constructors were removed

Suggested fix

  1. Update pubspec.yaml protobuf constraint to >=4.2.0 <7.0.0
  2. Regenerate proto files with a protobuf 6.x-compatible protoc-gen-dart
    • Replace $pb.PbList<T>() with $core.List<T> in createRepeated() methods
    • Remove toProto3Json/fromProto3Json parameters from BuilderInfo constructors

Environment

  • Flutter 3.x
  • protobuf 6.0.0
  • Dart 3.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions