Skip to content

Instantly share code, notes, and snippets.

@Piinks
Last active August 12, 2026 16:59
Show Gist options
  • Select an option

  • Save Piinks/cd1f02160ed674b7a7708b18836e2fd4 to your computer and use it in GitHub Desktop.

Select an option

Save Piinks/cd1f02160ed674b7a7708b18836e2fd4 to your computer and use it in GitHub Desktop.
Debugging release

Why PR 12445 (cupertino_ui 1.0.0) cannot get green CI as written today:

  1. Every published version of material_ui on pub.dev today (0.0.2 through 0.0.3+1) has cupertino_ui: ^0.0.2 (forbidding cupertino_ui >= 0.0.3) in its pubspec.yaml.
  2. As long as PR 12445 (cupertino_ui 1.0.0) lists material_ui: ^0.0.2 in dev_dependencies, CI runs flutter pub downgrade, which downloads published material_ui 0.0.2. Pub reads material_ui's requirement (cupertino_ui <0.0.3), sees local cupertino_ui is 1.0.0, and fails.
  3. If you change PR 12445 to material_ui: ^1.0.0 right now so it won't pick 0.0.2, CI fails because material_ui 1.0.0 does not exist on pub.dev yet.

Because of this circular lock between published history on pub.dev and local presubmit pub downgrade checks, it is mathematically impossible for PR 12445 to get green CI today while material_ui is in dev_dependencies before material_ui 1.0.0 is published.

How to get both PRs through to merge & publish today:

Phase 1: Land & Publish PR 12444 (material_ui 1.0.0) First

Because PR 12445’s CI fails when trying to validate against published material_ui 0.0.x, material_ui 1.0.0 must be published to pub.dev first, with a forward-compatible constraint that accepts cupertino_ui 1.0.0.

1. Update files in PR 12444

packages/material_ui/pubspec.yaml

 dependencies:
   collection: ^1.19.1
-  cupertino_ui: ^0.0.2
+  cupertino_ui: ">=0.0.2 <2.0.0"
   flutter:
     sdk: flutter

packages/material_ui/example/pubspec.yaml

 dependencies:
   material_ui:
     path: ..
-  cupertino_ui: ^0.0.2
+  cupertino_ui: ">=0.0.2 <2.0.0"

2. Verify & Release Phase 1

  1. Push these edits to PR 12444.
  2. Verify CI: Presubmit checks (flutter pub downgrade & dart analyze) will turn GREEN because 0.0.2 satisfies >=0.0.2 <2.0.0.
  3. Merge PR 12444 and publish material_ui 1.0.0 to pub.dev.
  4. Wait ~2–5 minutes for material_ui 1.0.0 to become indexable on pub.dev.

Phase 2: Update, Verify, & Publish PR 12445 (cupertino_ui 1.0.0) Second

1. Update files in PR 12445

Once material_ui 1.0.0 is published to pub.dev:

packages/cupertino_ui/pubspec.yaml

 dev_dependencies:
   clock: ^1.1.2
   flutter_goldens:
     path: ../../script/flutter_goldens
   flutter_test:
     sdk: flutter
   # To track memory leaks.
   leak_tracker_flutter_testing: ^3.0.10
-  material_ui: ^0.0.2
+  material_ui: ^1.0.0
   path: ^1.9.1

packages/cupertino_ui/example/pubspec.yaml

  • No changes needed. (Uses cupertino_ui: { path: .. } and has no dependency on material_ui).

2. Verify & Release Phase 2

  1. Push this edit to PR 12445.
  2. Verify CI: flutter pub downgrade will now resolve published material_ui 1.0.0. Pub checks material_ui 1.0.0's dependency (cupertino_ui: >=0.0.2 <2.0.0), which local cupertino_ui 1.0.0 satisfies.
  3. Presubmit CI on PR 12445 turns GREEN!
  4. Merge PR 12445 and publish cupertino_ui 1.0.0 to pub.dev.

Phase 3: Post-Release Cleanup (Optional)

Once both packages are live on pub.dev at version 1.0.0, you can submit a minor cleanup PR for material_ui to tighten the version range:

packages/material_ui/pubspec.yaml & packages/material_ui/example/pubspec.yaml

-  cupertino_ui: ">=0.0.2 <2.0.0"
+  cupertino_ui: ^1.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment