Skip to content

Semantic versioning of interface #32

Open
@renefloor

Description

@renefloor

This is not an issue about a specific feature, but about the versioning policy of the webrtc-interface.

The interface package has many breaking changes that are published as minor or patch versions.
Some examples of breaking changes:

Changing method interface
Adding new getters
Renaming methods

If you publish a new version of the interface with a minor change it should work on existing implementations without updating them. If they don't, it should be publish as new major version. Updating with a major version is not ideal, but also not a bad thing. The interface is hardly ever used directly, so if you are already on version 10 that's not a big issue.

The Flutter team has a pretty strict policy to prevent breaking changes in the interface as much as possible, which is a good thing in general.
1 way to do this is to always add a default implementation with an UnimplementedError if you add something to the interface. When other devs extend the interface (instead of implement) the existing package will work fine with the new version of the interface and the new method will probably never be called so the error will also not show. You can learn more about this in their guidelines: Breaking changes to plugin platform interfaces and Changing platform interface method parameters

Even when you just have a regular dev depending on flutter_webrtc they might bump into the issue you are creating.
For example, you change the interface like you did before, without a new major version. You update flutter_webrtc, but for example with a new major version of path_provider. If the dev would add flutter_webrtc to an app that uses the old path_provider it will take the latest version of the interface with a less old version of flutter_webrtc. Following semantic versioning they are compatible, but in reality it won't compile.

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