Why PR 12445 (cupertino_ui 1.0.0) cannot get green CI as written today:
- 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.
- 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.
- 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.
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.
dependencies:
collection: ^1.19.1
- cupertino_ui: ^0.0.2
+ cupertino_ui: ">=0.0.2 <2.0.0"
flutter:
sdk: flutter dependencies:
material_ui:
path: ..
- cupertino_ui: ^0.0.2
+ cupertino_ui: ">=0.0.2 <2.0.0"- Push these edits to PR 12444.
- Verify CI: Presubmit checks (
flutter pub downgrade&dart analyze) will turn GREEN because0.0.2satisfies>=0.0.2 <2.0.0. - Merge PR 12444 and publish
material_ui 1.0.0to pub.dev. - Wait ~2–5 minutes for
material_ui 1.0.0to become indexable on pub.dev.
Once material_ui 1.0.0 is published to pub.dev:
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- No changes needed. (Uses
cupertino_ui: { path: .. }and has no dependency onmaterial_ui).
- Push this edit to PR 12445.
- Verify CI:
flutter pub downgradewill now resolve publishedmaterial_ui 1.0.0. Pub checksmaterial_ui 1.0.0's dependency (cupertino_ui: >=0.0.2 <2.0.0), which localcupertino_ui 1.0.0satisfies. - Presubmit CI on PR 12445 turns GREEN!
- Merge PR 12445 and publish
cupertino_ui 1.0.0to pub.dev.
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:
- cupertino_ui: ">=0.0.2 <2.0.0"
+ cupertino_ui: ^1.0.0