zulip / zulip-flutter

Upcoming Zulip mobile apps for Android and iOS, using Flutter
Apache License 2.0
197 stars 192 forks source link

Build broken by Color.toARGB32 method #1052

Closed gnprice closed 2 weeks ago

gnprice commented 2 weeks ago

Our CI started failing today because of a change in Flutter upstream. Chat thread: https://chat.zulip.org/#narrow/channel/243-mobile-team/topic/tools.2Fcheck.20CI.20failure.20on.20main/near/1976890

The error looks like:

../../../.pub-cache/git/color_models-27298bc2cbfc9f1da08503be68da472076bcb61c/flutter_color_models/lib/src/models/cmyk_color.dart:10:7: Error: The non-abstract class 'CmykColor' is missing implementations for these members:
 - Color.toARGB32
Try to either
 - provide an implementation,
 - inherit an implementation from a superclass or mixin,
 - mark the class as abstract, or
 - provide a 'noSuchMethod' implementation.

class CmykColor extends cm.CmykColor
      ^^^^^^^^^
org-dartlang-sdk:///flutter/lib/ui/painting.dart:219:7: Context: 'Color.toARGB32' is defined here.
  int toARGB32() {
      ^^^^^^^^
[….more errors like this…]

It looks like the underlying change was:

The reason that made it into Flutter main, even though it broke our build, was that the Zulip suite in flutter/tests got disabled in order to land it:

From a conversation in Discord, it looks like the idea was that the breakage would be fixed by a change in the flutter_color_models package. And indeed that fix was merged into that package within a few minutes of the flutter/tests change:

But in itself that didn't fix our build, because although our pubspec.yaml specifies that package by Git branch, the behavior of pubspec.lock is that (befitting its job as a lockfile) it pins the specific Git commit. So the fix only takes effect when we update that pin, e.g. with flutter pub upgrade.

1051 does that update and so fixes this issue.

There was a bit of a breakdown here in the protocol for Flutter's "customer tests" and breaking change process, in that nobody contacted us about the breakage or about disabling our suite. After the Discord conversation I'm hopeful it'll be better next time.