Skip to content

(Test cross-imports) The cross imports checker does not verify cross imports in flutter/xyz directories #185464

Description

@navaronbracke

Steps to reproduce

  1. Open Remove unnecessary Material imports from non-Material tests in flutter package #185271
  2. Notice that the contributor found violations in flutter/test/gestures or flutter/test/painting
  3. The cross imports checker did not flag this, since it only checks widgets / material / cupertino

Expected results

The cross imports checker should flag any violations of the flutter/material and flutter/cupertino imports, including in supporting framework code, such as flutter/gestures or flutter/animation

See #177415

Actual results

The cross imports checker did not flag this.

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[!] Flutter (Channel [user-branch], 3.44.0-1.0.pre-210, on macOS 26.3.1 25D771280a darwin-arm64, locale en-US) [2.0s]
    ! Flutter version 3.44.0-1.0.pre-210 on channel [user-branch] at /Users/navaronbracke/Documents/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
    ! Unknown upstream repository.
      Reinstall Flutter by following instructions at https://flutter.dev/setup.
    • FLUTTER_GIT_URL = git@github.com:navaronbracke/flutter.git
    • Framework revision 36e08d0607 (5 hours ago), 2026-04-23 00:11:27 -0400
    • Engine revision 36e08d0607
    • Dart version 3.13.0 (build 3.13.0-53.0.dev)
    • DevTools version 2.57.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, enable-swift-package-manager,
      omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration, enable-riscv64
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [1,452ms]
    • Android SDK at /Users/navaronbracke/Library/Android/sdk
    • Emulator version 36.4.9.0 (build_id 14788078) (CL:N/A)
    • Platform android-36.1, build-tools 36.1.0
    • ANDROID_HOME = /Users/navaronbracke/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.9+-14787801-b1163.94)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 26.4.1) [971ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 17E202
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [6ms]
    • CHROME_EXECUTABLE = /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Connected device (2 available) [6.8s]
    • macOS (desktop) • macos  • darwin-arm64   • macOS 26.3.1 25D771280a darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 147.0.7727.103
    ! Error: Browsing on the local area network for RudyB. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources [487ms]
    • All expected network resources are available.

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: tests"flutter test", flutter_test, or one of our testsframeworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

Type

No type
No fields configured for issues without a type.

Projects

Status
Done
Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions