)]}'
{
  "commit": "9e02a338cc45479458baff5009cdbac27c0eea11",
  "tree": "70249594eb71ef08c844177fe4add8a432fc575d",
  "parents": [
    "d8dd11d9c21feda189bdabf90cf9f98d5d511d50"
  ],
  "author": {
    "name": "Ben Konyi",
    "email": "bkonyi@google.com",
    "time": "Tue Aug 18 20:58:14 2026 +0000"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Aug 18 20:58:14 2026 +0000"
  },
  "message": "[flutter_tools] Validate driver test imports before execution (#191216)\n\n## Description\n`flutter_driver` tests run on the host VM and cannot import libraries\nthat depend on `dart:ui` (like `package:flutter` or\n`package:flutter_test`). When a user accidentally imports these packages\nin a driver test script, the driver fails with confusing runtime crashes\nor compile errors.\n\nThis PR adds `DriverTestImportValidator` to inspect driver test files\nand their transitive project-local imports (files residing within the\nproject root) before execution. External package dependencies outside\nthe project root are intentionally skipped to ensure rapid validation (\u003c\n10 ms). If invalid imports are detected during `flutter drive` command\nvalidation, it exits early with a clear, actionable error message.\n\n## Related Issues\nFixes https://github.com/flutter/flutter/issues/172734\n\n## Tests\n- Added unit tests in\n`packages/flutter_tools/test/general.shard/drive/import_validator_test.dart`.\n- Added command integration test in\n`packages/flutter_tools/test/commands.shard/hermetic/drive_test.dart`.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "87f47ba68c367ef5eb4d73a92f50e6341d501f8d",
      "old_mode": 33188,
      "old_path": "packages/flutter_tools/lib/src/commands/drive.dart",
      "new_id": "9f2fb41e2b78a5e3214a11d81b91656a706d64f8",
      "new_mode": 33188,
      "new_path": "packages/flutter_tools/lib/src/commands/drive.dart"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3f34df65e7c412d0b9c9f5e1e7671baa32f6045a",
      "new_mode": 33188,
      "new_path": "packages/flutter_tools/lib/src/drive/import_validator.dart"
    },
    {
      "type": "modify",
      "old_id": "2e7284516b6d41b0742ec99f8f057bc10b16320b",
      "old_mode": 33188,
      "old_path": "packages/flutter_tools/test/commands.shard/hermetic/drive_test.dart",
      "new_id": "f965eeed5945e172bf45ed0481c782e0069a6fff",
      "new_mode": 33188,
      "new_path": "packages/flutter_tools/test/commands.shard/hermetic/drive_test.dart"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "95ff1403c34461a0d0c330e690d8917113cf2126",
      "new_mode": 33188,
      "new_path": "packages/flutter_tools/test/general.shard/drive/import_validator_test.dart"
    }
  ]
}
