Commit Graph

389 Commits

Author SHA1 Message Date
Jenn Magder
c4975d9be0
Increase app minimum supported macOS version from 10.11 to 10.13 (#107689) 2022-07-15 11:12:43 -07:00
Callum Moffat
902b0124a6
Add UIApplicationSupportsIndirectInputEvents migration (#106889) 2022-07-14 21:00:06 +00:00
Jonah Williams
db829c1e20
[flutter_tools] migrate more unit tests to null safety (#106153) 2022-06-17 21:34:27 -07:00
Jesús S Guerrero
32b22b85de
parse build version on xcodeproj (#105908) 2022-06-16 22:26:06 +00:00
Jenn Magder
003f2b69d2
Pass run and drive --trace-systrace for iOS (#105321) 2022-06-03 16:48:11 -07:00
Jenn Magder
a56c5e51ae
Migrate some test files to null safety (#104469) 2022-05-24 16:53:08 -07:00
Chris Bracken
928bb1229b
[tool] Consistent FakeProcessManager.run/runSync (#103947)
`FakeProcessManager` is a test-oriented implementation of `ProcessManager`
that simulates launching processes and returning `ProcessResult` objects
whose `exitCode`, `stdout`, `stderr` can be used to write platform-portable,
hermetic tests that don't rely on actually launching processes from
executables on disk. Its `run` and `runSync` methods provide asynchronous and
synchronous variants of this functionality.

Previously, the behaviour of `run` and `runSync` were inconsistent with
regards to the treatment of the `stdoutEncoding` (similarly,
`stderrEncoding`) parameters:

`run`:
* if the encoding was null, `ProcessResult.stdout` was returned as a
  String in UTF-8 encoding. This was incorrect. The behaviour as
  specified in `ProcessResult.stdout` is that in this case, a raw
  `List<int>` should be returned.
* If the encoding was unspecified, `ProcessResult.stdout` was returned as
  a `String` in the `io.systemEncoding` encoding. This was correct.
* If the encoding was non-null, `ProcessResult.stdout` was returned as a
  `String` in the specified encoding. This was correct.

`runSync`:
* if the encoding was null, `ProcessResult.stdout` was returned as a
  `List<int>` in UTF-8 encoding. This was incorrect. The behaviour as
  specified in `ProcessResult.stdout` is that in this case, a raw
  `List<int>` should be returned.
* If the encoding was unspecified, `ProcessResult.stdout` was returned as
  `List<int>` in UTF-8 encoding. This was incorrect. The behaviour as
  specified in `ProcessResult.stdout` is that in this case, a String a
  `String` in the `io.systemEncoding` encoding should be returned.
* if the encoding was non-null, `ProcessResult.stdout` was returned as a
  `String` in unknown (but probably UTF-8) encoding. This was incorrect.
  The behaviour as specified in `ProcessResult.stdout` is that in this
  case, a `String` in the specified encoding should be returned.

`_FakeProcess`, from which we obtain the fake stdout and stderr values now
holds these fields as raw `List<int>` of bytes rather than as `String`s. It
is up to the user to supply values that can be decoded with the encoding
passed to `run`/`runAsync`.

`run` and `runAsync` have been updated to set stdout (likewise, stderr) as
specified in the `ProcessResult` documentation.

This is pre-factoring for #102451, in which the tool throws an exception
when processing the JSON output from stdout of the `vswhere.exe` tool,
whose output was found to include the `U+FFFD` Unicode replacement
character during UTF-8 decoding, which triggers a `toolExit` exception
when decoded using our [Utf8Decoder][decoder] configured with `reportErrors` =
true. Because `FakeProcessManager.runAsync` did not previously invoke
`utf8.decode` on its output (behaviour which differs from the non-fake
implementation), it was impossible to write tests to verify the fix.

Ref: https://api.flutter.dev/flutter/dart-io/ProcessResult/stdout.html

Issue: https://github.com/flutter/flutter/issues/102451

[decoder]: fd312f1ccf/packages/flutter_tools/lib/src/convert.dart (L51-L60)
2022-05-17 11:15:54 -07:00
Christopher Fujino
09686a04c9
[flutter_tools] add --uninstall-first flag and pipe it through to ios-deploy (#102948) 2022-05-07 11:49:07 -07:00
Jenn Magder
c6ced845e3
Remove custom unawaited, prefer dart:async version (#103212) 2022-05-07 08:49:04 -07:00
Phil Quitslund
b5e7fb076c
[flutter_tools] rename local functions with _s (#102688) 2022-04-27 16:19:07 -07:00
Alexandre Ardhuin
07f1c20474
add missing trailing commas in list/set/map literals (#102585) 2022-04-27 09:15:35 +02:00
Jenn Magder
1756ccc541
Set template and migrate apps to iOS 11 minimum (#101963) 2022-04-15 11:34:08 -07:00
Jenn Magder
d4bfb01336
Do not build for iOS armv7 (#97341) 2022-04-12 14:44:09 -07:00
Jenn Magder
888208c1f4
Disallow flutter run-ing on 32-bit development devices (#97339) 2022-04-12 14:39:07 -07:00
Christopher Fujino
d07ce92b15
[flutter_tools] Re-land Dump backtrace on ios app startup timeout (#101763) 2022-04-12 13:24:04 -07:00
Christopher Fujino
2a6582997d
Revert "[flutter_tools] Dump backtrace on ios app startup timeout (#101610)" (#101761)
This reverts commit 2978b59be7.
2022-04-12 09:09:32 -07:00
Christopher Fujino
2978b59be7
[flutter_tools] Dump backtrace on ios app startup timeout (#101610) 2022-04-12 08:49:08 -07:00
Yang Chao
343713727a
Enable track widget creation when generating Generated.xcconfig (#101123) 2022-04-11 14:29:11 -07:00
Chris Yang
1755819cb1
Log XCResult before other build issues (#100787) 2022-04-08 16:27:08 -07:00
Jenn Magder
a452c92d5d
Set ARCHS to single-arch for local engine macOS builds (#100917) 2022-03-28 18:45:06 -07:00
Zachary Anderson
47f08a3fd6
[flutter_tool] Adds --enable-impeller flag to the run command (#100835) 2022-03-26 20:07:24 -07:00
Chris Yang
c01cbd23cc
Add CADisableMinimumFrameDurationOnPhone migration (#100647) 2022-03-25 17:50:09 -07:00
Christopher Fujino
e99a66a47e
[flutter_tools] check if stream is open before sending message in ios device (#99947) 2022-03-17 15:55:24 -07:00
Jesús S Guerrero
fbbf3ec471
Support route on ios (#99078) 2022-03-07 11:31:21 -08:00
Jenn Magder
9369bd3222
Wait for ios-deploy stdout before closing logLine stream (#99041) 2022-02-24 19:21:23 -08:00
Jenn Magder
cef6823637
Dump backtrace when cannot attach to observatory (#98550) 2022-02-16 14:10:18 -08:00
Ben Konyi
2a2f973120
Update flutter_tools to look for new VM service message (#97683)
* Update flutter_tools to look for new VM service message

The Dart SDK will soon move away from the current Observatory message:

"Observatory listening on ..."

To a new message that no longer references Observatory:

"Dart VM Service listening on ..."

This change updates all tests with mocks to check for the new message
and also adds support for the new message in ProtocolDiscovery.

See https://github.com/dart-lang/sdk/issues/46756

* Fix some parsing locations

* Fix analysis failures

* Update message

* Remove extra comment

* Update message

* Add globals prefix
2022-02-15 07:33:57 -08:00
Michael Goderbauer
5684b9f69e
Enable no_leading_underscores_for_local_identifiers (#96422) 2022-01-21 14:43:59 -08:00
Spt
7de1e225de
fix rsync output utf8decode bug (#95881) 2022-01-13 10:20:20 -08:00
Lau Ching Jun
7f0050f5b3
Add a new PrebuiltFlutterApplicationPackage interface. (#95290)
* Add a new PrebuiltFlutterApplicationPackage interface.

* Review feedback

* Rename bundleDir to uncompressedBundle
2022-01-05 07:54:57 -08:00
Jenn Magder
5432688561
Migrate install command to null safety (#95433) 2021-12-22 14:54:10 -08:00
Chris Yang
1c4128c703
Xcode error message (#94747) 2021-12-21 08:39:18 -08:00
Chris Yang
e4dadf788b
[tool] xcresult issue discarder (#95273) 2021-12-14 13:29:13 -08:00
Chris Yang
70fea6d250
[tool] XCResult also parses "url" in xcresult bundle (#95054) 2021-12-13 16:04:04 -08:00
Mouad Debbar
30b6b9e7f0
Revert "Update Xcode toolsVersion encoded in generated Main.storyboard (#94084)" (#94164)
This reverts commit 6a3ea7eb83.
2021-11-24 10:12:53 -05:00
Jenn Magder
6a3ea7eb83
Update Xcode toolsVersion encoded in generated Main.storyboard (#94084) 2021-11-23 17:38:02 -08:00
Jenn Magder
9e88fe328e
Remove globals_null_migrated.dart, move into globals.dart (#92861) 2021-11-01 17:18:03 -07:00
Chris Yang
04156b6636
[flutter_tools] xcresult parser. (#92604) 2021-10-29 18:29:31 -07:00
Jenn Magder
53e04de681
Migrate mdns_discovery and ios simulator to null safety (#92124) 2021-10-29 17:18:03 -07:00
Jenn Magder
8474f41e90
Migrate xcdevice and ios devices to null safety (#92056) 2021-10-19 12:23:03 -07:00
Jenn Magder
a82c50f1f6
Revert "Migrate xcdevice and ios devices to null safety (#91704)" (#91912)
This reverts commit 0065873670.
2021-10-15 09:48:08 -07:00
Jenn Magder
0065873670
Migrate xcdevice and ios devices to null safety (#91704) 2021-10-14 22:28:02 -07:00
Ian Hickson
61a0add286
Enable avoid_redundant_argument_values lint (#91409) (#91462) 2021-10-08 09:25:14 -07:00
Zachary Anderson
b9d2177da0
Revert "Enable avoid_redundant_argument_values lint (#91409)" (#91461)
This reverts commit 5fd259be24.
2021-10-07 21:11:07 -07:00
Ian Hickson
5fd259be24
Enable avoid_redundant_argument_values lint (#91409) 2021-10-07 20:13:02 -07:00
Jenn Magder
91d1e3ed8b
Default new project to the ios-signing-cert development team (#90021) 2021-10-07 10:23:02 -07:00
Jenn Magder
61e2e86611
Add iOS build -destination flag (#90915) 2021-10-04 10:18:03 -07:00
Jenn Magder
faaca13f22
Catch FormatException from bad simulator log output (#90966) 2021-09-30 09:33:04 -07:00
Jenn Magder
1b53f7beba
Migrate iOS project to Xcode 13 compatibility (#90304) 2021-09-22 13:23:05 -07:00
Jenn Magder
ab6f2fc8ce
Set BUILD_DIR when determining if plugins support arm64 simulators (#90088) 2021-09-15 18:37:04 -07:00