flutter/packages/flutter_tools/test
Victoria Ashworth fe1c9d61a7
Validate build configuration during Xcode build phase (#169395)
You can run iOS/macOS Flutter apps through either the Flutter CLI or
Xcode. However, it's often required to first run the Flutter CLI to
generate required files and settings. Some of these settings/files (like
dev dependencies) are specific to the build mode. However, you can
change the build mode through Xcode too. When you change the build mode
through Xcode, the Flutter-generated files and setting may not be
correct.

This PR checks if the current build mode matches the one last used by
the Flutter CLI. If it doesn't, it'll print a warning like this:

![Screenshot 2025-05-23 at 5 14
58 PM](https://github.com/user-attachments/assets/47d15cc4-f05d-4034-8be6-67f37828aa61)

If the build action is `install`, which indicates the app is being built
for distribution, this will print as an error and fail the build:

![Screenshot 2025-05-23 at 5 16
12 PM](https://github.com/user-attachments/assets/339b65bd-6425-4595-b26b-a60c722bbcf9)


## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-05-29 19:00:56 +00:00
..
android_java11_integration.shard Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_preview_integration.shard More FlutterPlugin static method conversion (#165506) 2025-03-22 01:34:05 +00:00
commands.shard Fix minify logic (#169607) 2025-05-28 23:52:39 +00:00
data [flutter_tools] Fix VS Code package.json path on macOS with case-sensitive file system (#163409) 2025-03-28 16:35:15 +00:00
general.shard Validate build configuration during Xcode build phase (#169395) 2025-05-29 19:00:56 +00:00
host_cross_arch.shard Disable the ability to opt-out of explicit-package-dependencies. (#169283) 2025-05-22 21:42:50 +00:00
integration.shard Validate build configuration during Xcode build phase (#169395) 2025-05-29 19:00:56 +00:00
src Make test output with encoded dart-defines=... human readable. (#169353) 2025-05-26 16:53:09 +00:00
web.shard Skip {PLAT}_web_tools_test#expression_evaluation_*_test.dart, turning tree 🔴 (#169305) 2025-05-22 20:08:01 +00:00
widget_preview_scaffold.shard Manually update vector_math package (#169476) 2025-05-28 15:55:01 +00:00