Repository navigation
Commit e48d837
committed
[flutter_tools] Lazily construct CrashReportSender in SwiftPM migration
Replace `CrashReportSender? crashReportSender` in `SwiftPackageManagerIntegrationMigration` with an optional `CrashReportSender Function()? crashReportSenderFactory` so `CrashReportSender` and its underlying `http.Client` are only instantiated if `getInfo` throws an exception on non-bot builds. Update the `validate project settings` tests in `swift_package_manager_integration_migration_test.dart` to pass the factory and verify it is not invoked when project settings compile.
Previous output:
```
00:32 +3002 ~2 -1: test/general.shard/migrations/swift_package_manager_integration_migration_test.dart: Flutter Package Migration validate project settings throw if settings fail to compile [E]
TimeoutException after 0:00:02.000000: Test timed out after 2 seconds.
dart:isolate _RawReceivePort._handleMessage
```
Current output:
```
+157: All tests passed!
```
Fixes flutter#1963071 parent 3f921a4 commit e48d837
4 files changed
Lines changed: 75 additions & 24 deletions
File tree
- packages/flutter_tools
- lib/src
- ios
- macos
- migrations
- test/general.shard/migrations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
243 | | - | |
| 243 | + | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4584 | 4584 | | |
4585 | 4585 | | |
4586 | 4586 | | |
4587 | | - | |
| 4587 | + | |
4588 | 4588 | | |
4589 | 4589 | | |
4590 | 4590 | | |
| |||
4654 | 4654 | | |
4655 | 4655 | | |
4656 | 4656 | | |
4657 | | - | |
| 4657 | + | |
4658 | 4658 | | |
4659 | 4659 | | |
4660 | 4660 | | |
| |||
4697 | 4697 | | |
4698 | 4698 | | |
4699 | 4699 | | |
4700 | | - | |
| 4700 | + | |
| 4701 | + | |
| 4702 | + | |
| 4703 | + | |
| 4704 | + | |
| 4705 | + | |
| 4706 | + | |
| 4707 | + | |
| 4708 | + | |
| 4709 | + | |
| 4710 | + | |
| 4711 | + | |
| 4712 | + | |
| 4713 | + | |
| 4714 | + | |
| 4715 | + | |
| 4716 | + | |
| 4717 | + | |
| 4718 | + | |
| 4719 | + | |
| 4720 | + | |
| 4721 | + | |
| 4722 | + | |
| 4723 | + | |
| 4724 | + | |
| 4725 | + | |
| 4726 | + | |
| 4727 | + | |
| 4728 | + | |
| 4729 | + | |
| 4730 | + | |
| 4731 | + | |
| 4732 | + | |
| 4733 | + | |
| 4734 | + | |
| 4735 | + | |
| 4736 | + | |
| 4737 | + | |
| 4738 | + | |
| 4739 | + | |
| 4740 | + | |
| 4741 | + | |
| 4742 | + | |
| 4743 | + | |
| 4744 | + | |
| 4745 | + | |
| 4746 | + | |
| 4747 | + | |
| 4748 | + | |
| 4749 | + | |
| 4750 | + | |
| 4751 | + | |
| 4752 | + | |
| 4753 | + | |
| 4754 | + | |
| 4755 | + | |
| 4756 | + | |
| 4757 | + | |
| 4758 | + | |
| 4759 | + | |
4701 | 4760 | | |
4702 | 4761 | | |
4703 | 4762 | | |
| |||
4725 | 4784 | | |
4726 | 4785 | | |
4727 | 4786 | | |
| 4787 | + | |
| 4788 | + | |
4728 | 4789 | | |
4729 | 4790 | | |
4730 | 4791 | | |
| |||
4734 | 4795 | | |
4735 | 4796 | | |
4736 | 4797 | | |
4737 | | - | |
4738 | | - | |
4739 | | - | |
4740 | | - | |
4741 | | - | |
| 4798 | + | |
4742 | 4799 | | |
| 4800 | + | |
4743 | 4801 | | |
4744 | 4802 | | |
4745 | | - | |
4746 | | - | |
4747 | | - | |
4748 | | - | |
4749 | | - | |
4750 | | - | |
4751 | | - | |
| 4803 | + | |
4752 | 4804 | | |
4753 | | - | |
4754 | 4805 | | |
4755 | 4806 | | |
4756 | 4807 | | |
| |||
0 commit comments