Skip to content

[material_ui and cupertino_ui] Remove workspaces and fix CI - #12351

Merged
auto-submit[bot] merged 11 commits into
flutter:mainfrom
justinmc:no-workspaces
Aug 4, 2026
Merged

[material_ui and cupertino_ui] Remove workspaces and fix CI#12351
auto-submit[bot] merged 11 commits into
flutter:mainfrom
justinmc:no-workspaces

Conversation

@justinmc

@justinmcjustinmc commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

It was discovered in the latest cupertino_ui batch release that CI is not set up to handle workspaces yet, causing CI failures. This PR attempts to solve the problem by:

  • Removing workspaces from material_ui_examples and cupertino_ui_examples.
  • Making cupertino_ui depend on material_ui via Pub instead of path.
  • Refactoring away all cross imports in cupertino_ui_examples and removing material_ui as its dependency.

See also flutter/flutter#190453
flutter/flutter#190305

This was breaking CI as it's not yet supported by the dependency
pathification script.
@flutter-dashboardflutter-dashboardBot added the CICD Run CI/CD label Aug 3, 2026
@github-actionsgithub-actionsBot added triage-framework Should be looked at in framework triage p: cupertino_ui p: material_ui labels Aug 3, 2026

@gemini-code-assistgemini-code-assistBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the workspace configurations and resolution settings from the pubspec.yaml files of both the cupertino_ui and material_ui packages and their respective examples. No review comments were provided, and there is no additional feedback.

@PiinksPiinks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Piinks

Copy link
Copy Markdown
Contributor

Does this need pending changelogs?

@stuartmorgan-gstuartmorgan-g added override: no versioning needed Override the check requiring version bumps for most changes override: no changelog needed Override the check requiring CHANGELOG updates for most changes labels Aug 3, 2026
@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

No, this doesn't affect clients so doesn't need a changelog entry.

@justinmc

Copy link
Copy Markdown
ContributorAuthor

Moving this to a draft as I rethink the dependencies. I'm going to try to remove cross imports from cupertino_ui_examples.

@justinmc
justinmc marked this pull request as draft August 3, 2026 18:12
@justinmc
justinmc requested a review from PiinksAugust 3, 2026 18:46
@justinmc
justinmc marked this pull request as ready for review August 3, 2026 18:46

@gemini-code-assistgemini-code-assistBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes workspace configurations and replaces Material UI dependencies, imports, widgets, icons, and colors with Cupertino equivalents across the cupertino_ui example and test files. The feedback identifies unused imports of package:cupertino_ui/cupertino_ui.dart in two context menu test files.

// found in the LICENSE file.

import 'package:material_ui/material_ui.dart';
import 'package:cupertino_ui/cupertino_ui.dart';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The import of package:cupertino_ui/cupertino_ui.dart is unused in this test file and can be safely removed to avoid linter warnings/errors.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used to import FlutterLogo. I've changed it to import widgets instead.

// found in the LICENSE file.

import 'package:material_ui/material_ui.dart';
import 'package:cupertino_ui/cupertino_ui.dart';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The import of package:cupertino_ui/cupertino_ui.dart is unused in this test file and can be safely removed to avoid linter warnings/errors.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

flutter_lints: ^6.0.0

flutter:
uses-material-design: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@PiinksPiinks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the updated cupertino samples, does the API documentation surrounding each sample need to be updated? For example, the list tile one looks fine:

/// {@example /example/lib/list_tile/cupertino_list_tile.0.dart#body}

@Piinks

Copy link
Copy Markdown
Contributor

Since the cupertino samples changes are user facing, cupertino_ui will need a pending changelog file for this PR now.
Also, CI is a bit sad. :(

@justinmcjustinmc changed the title Remove workspaces from material_ui and cupertino_ui examples.[material_ui and cupertino_ui] Remove workspaces and fix CIAug 3, 2026
@justinmc

Copy link
Copy Markdown
ContributorAuthor

A test started failing after removing material_ui, I'm looking into it.

Comment on lines -78 to +77
final Offset handlePos = endpoints.last.point + const Offset(10.0, 10.0);

final Offset handlePos = endpoints.last.point;

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what was causing the test to fail when I switched to CupertinoTextField. This gesture was missing the handle and unfocusing the field altogether. Unfortunately finding the handle widget location didn't seem to work. This seems to be the typical way we find the handle in other tests.

@PiinksPiinks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@justinmcjustinmc added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 4, 2026
@auto-submit
auto-submitBot merged commit 8dfde8f into flutter:mainAug 4, 2026
13 checks passed
@justinmc
justinmc deleted the no-workspaces branch August 4, 2026 19:50
@justinmc

Copy link
Copy Markdown
ContributorAuthor

Now that this is merged I'll try triggering the cupertino_ui batch release process again.

pullBot pushed a commit to AbhiShake1/flutter that referenced this pull request Aug 5, 2026
…r#190622)
flutter/packages@3498b9d...b1424e2
2026-08-05 saurabhmirajkar000@gmail.com [go_router] Document regex
constraints for path parameters (flutter/packages#12281)
2026-08-04 fluttergithubbot@gmail.com Sync release-cupertino_ui-0.0.3 to
main (flutter/packages#12367)
2026-08-04 43054281+camsim99@users.noreply.github.com
[camera_android_camerax] Fix video recording after backgrounding app
(flutter/packages#12145)
2026-08-04 jmccandless@google.com [material_ui and cupertino_ui] Remove
workspaces and fix CI (flutter/packages#12351)
2026-08-04 fluttergithubbot@gmail.com Sync release-material_ui-0.0.3 to
main (flutter/packages#12352)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.
To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@PiinksPiinks mentioned this pull request Aug 10, 2026
11 tasks
auto-submitBot pushed a commit that referenced this pull request Aug 11, 2026
- Unblocks #12423
Fixes a Pub version solver failure during release PR testing (`make-deps-path-based`) for co-dependent packages (specifically `material_ui` and `cupertino_ui`).
When creating a release PR for `material_ui` (e.g., `release-material_ui-0.0.3+1`), the `make-deps-path-based` CI step failed during `flutter test` on `packages/cupertino_ui` with the following Pub version solver error:
```
Resolving dependencies in `./example`...
Because every version of material_ui from path depends on cupertino_ui from hosted and cupertino_ui_examples depends on cupertino_ui from path, material_ui from path is forbidden.
So, because cupertino_ui_examples depends on material_ui from path, version solving failed.
Failed to update packages.
```
`material_ui` and `cupertino_ui` share an asymmetric co-dependency in the repository:
- **`material_ui`** has a **direct dependency** on `cupertino_ui` (`dependencies: cupertino_ui: ^0.0.3`).
- **`cupertino_ui`** has a **dev dependency** on `material_ui` (`dev_dependencies: material_ui: ^0.0.2`).
When `make-deps-path-based --target-dependencies=material_ui` runs:
1. `make-deps-path-based` adds `dependency_overrides: material_ui: {path: ../material_ui}` to `cupertino_ui/pubspec.yaml` and `cupertino_ui/example/pubspec.yaml`.
2. `cupertino_ui/example` depends directly on `cupertino_ui` (`path: ..`).
3. `material_ui` (from `path`) depends on `cupertino_ui: ^0.0.3` (from hosted `pub.dev`).
4. Without `cupertino_ui` in `cupertino_ui/example`'s `dependency_overrides`, Pub detects `cupertino_ui` sourced from **`path`** (in `cupertino_ui_examples`) and **`hosted`** (in `material_ui`), causing Pub's version solver to reject the resolution graph.
Updated `make-deps-path-based` (`script/tool/lib/src/make_deps_path_based_command.dart`):
When `_addDependencyOverridesIfNecessary` recursively updates example apps of a package (`for (final RepositoryPackage example in package.getExamples())`), it now explicitly includes the parent `package` itself in the local package mapping and `additionalPackagesToOverride`.
This ensures `cupertino_ui/example/pubspec.yaml` receives a path override for its parent package (`dependency_overrides: cupertino_ui: {path: ...}`) alongside the target package override (`material_ui: {path: ...}`). Consequently, Pub solver resolves both local path dependencies cleanly without requiring recursive dependency expansion (thereby preserving the safety net of `--target-dependencies`).
---
#### Why `cupertino_ui` Has a `dev_dependency` on `material_ui`
`cupertino_ui` declares `material_ui` in its `dev_dependencies` because multiple files across `cupertino_ui/lib/src/` (e.g., `text_field.dart`, `dialog.dart`, `scrollbar.dart`, `theme.dart`) use Dart `@docImport` directives referencing Material design widgets in public API documentation:
```dart
/// @DocImport 'package:material_ui/material_ui.dart';
```
Per Dart doc guidelines, packages referenced in `@docImport` must be declared in `dev_dependencies` so static analysis and `dartdoc` can resolve the cross-referenced symbols.
---
#### Didn't we fix this last week?
- **Aug 4, 09:06 AM (`material_ui 0.0.3` release #12352)**: Both packages still used Dart Workspaces (`resolution: workspace`). Under Dart Workspaces, Pub dependency resolution was handled at the top-level workspace root, hiding the Pub solver conflict.
- **Aug 4, 12:44 PM (PR #12351)**: PR #12351 landed to unblock `cupertino_ui 0.0.3` by removing Dart workspaces from `cupertino_ui` and `material_ui`.
- When releasing **`cupertino_ui`** (`targetDependencies=cupertino_ui`), `material_ui` got path overrides for `cupertino_ui`. Since `cupertino_ui` didn't depend on a third package pulling hosted `cupertino_ui`, `cupertino_ui`'s release succeeded.
- However, when releasing **`material_ui`** (`targetDependencies=material_ui`), `material_ui`'s direct dependency on `cupertino_ui` caused `cupertino_ui/example` to fail.
- **Aug 10 (`material_ui 0.0.3+1` release #12423)**: This was the first release attempt of `material_ui` since Dart workspaces were removed, exposing the non-workspace Pub solver requirement.
## Pre-Review Checklist
**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.
[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmitMerge PR when tree becomes green via auto submit AppCICDRun CI/CDoverride: no changelog neededOverride the check requiring CHANGELOG updates for most changesoverride: no versioning neededOverride the check requiring version bumps for most changesp: cupertino_uip: material_uitriage-frameworkShould be looked at in framework triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@justinmc@Piinks@stuartmorgan-g