Commit Graph

417 Commits

Author SHA1 Message Date
Ben Konyi
ecd7518df5
Reland "Remove references to Observatory (#118577)" (#121606)
This reverts commit 275ab9c69b.
2023-02-28 11:57:04 -05:00
Michael Goderbauer
275ab9c69b
Revert "Reland "Remove references to Observatory (#118577)" (#121215)" (#121555)
Revert "Reland "Remove references to Observatory (#118577)""
2023-02-27 23:46:53 +00:00
Ben Konyi
fbae472fc3
Reland "Remove references to Observatory (#118577)" (#121215)
This reverts commit 298d8c76ba.
2023-02-27 09:26:43 -05:00
Casey Hillers
298d8c76ba
Revert "Remove references to Observatory (#118577)" (#120929)
This reverts commit 2df140f40d.
2023-02-16 21:28:30 -08:00
Ben Konyi
2df140f40d
Remove references to Observatory (#118577)
Observatory is being deprecated for Dart 3.0 so it should no longer be
referenced in tooling messaging / flags.

See https://github.com/dart-lang/sdk/issues/50233
2023-02-13 14:29:30 -05:00
林洵锋
ec524ed068
Fix flutter_tools stuck when using custom LLDB prompt (#119443)
* Fix flutter_tools stuck when using custom LLDB prompt

* Remove trailing space character

* Fix local variable name

* Add comment

* Remove trailing space character

* Update packages/flutter_tools/lib/src/ios/ios_deploy.dart

Co-authored-by: Jenn Magder <magder@google.com>

* Update packages/flutter_tools/lib/src/ios/ios_deploy.dart

Co-authored-by: Jenn Magder <magder@google.com>

* Remove trailing space character

---------

Co-authored-by: Jenn Magder <magder@google.com>
2023-02-06 22:50:07 +00:00
Victoria Ashworth
a07e8a6ac4
[reland] Support wireless debugging (#118895)
* Reland "Support iOS wireless debugging (#118104)"

This reverts commit cbf2e16892.

* Remove device loading status
2023-01-20 19:02:37 +00:00
Jenn Magder
cbf2e16892
Revert "Support iOS wireless debugging (#118104)" (#118826)
This reverts commit 5cd2d4c61e.
2023-01-19 12:31:53 -08:00
Victoria Ashworth
5cd2d4c61e
Support iOS wireless debugging (#118104)
* setup wireless debugging to use device IP

* fix tests

* fix unused var and missing annotation

* remove unneeded try catch

* remove commented out line, change null to package id

* better way to get package id

* update mDNS lookup to continously check for server, add messaging if takes too long to find observatory url, update flutter drive to enable publish-port if using network device

* Refactor mDNS Discovery to poll for observatories and better handle multiple instances of the same app. Update drive command to make publish-port more stable. Update attach for iOS to only use Protocol Discovery if applicable, run mDNS and Protocol Discovery simultaneously, handle --debug-port/--debug-url/--device-vmservice-port, continously poll for obseravtories with mDNS, include port in error message when mutliple available

* add and update comments, use logger spinner intead of timer in flutter attach, other small improvements

* add newline to message so next log won't be on same line

* fix install/waiting for permission status progress so it doens't double print the time it took.

* only print backtrace if observatory times out on a physical usb connected device

* fix test

* Update related references from Observatory to Dart VM Service

* fix test
2023-01-19 20:00:21 +00:00
Victoria Ashworth
b4d72752bd
Add Info.plist from build directory as input path to Thin Binary build phase (#118209)
* Add Info.plist from build directory as input path to Thin Binary build phase

* fix directive ordering

* migrate benchmark, integration, and example tests
2023-01-13 13:41:08 -06:00
Victoria Ashworth
3a656b16cb
Add more supported simulator debugging options and improve tests (#114628)
* add debugging options to simulator, test more debugging flags, add tests for other launch arguements

* refactor iOS launch arguments to use one function for both simulator and physical devices

* treat dart flags differently between physical and simulator

* Simplify some flags between devices.

Change --disable-service-auth-codes to not always be included for physical devices, only if disableServiceAuthCodes is true.
Change --disable-observatory-publication to be used for simulator devices too.
Change --enable-checked-mode & --verify-entry-points to be used if debuggingEnabled is true regardless of device type.
Chnage --trace-startup to be used for simulator devices too.

* fix ios release mode with buildable app startApp test

* determine observatory-port from deviceVmServicePort and hostVmServicePort

* add comments and remove hasObservatoryPort
2022-11-09 18:17:09 +00:00
Victoria Ashworth
378387b139
when getting xcworkspace, exclude hidden files (#114099)
* exclude xcworkspace that begins with a period

* fix if spacing, add comment

* add unit test for when no xcworkspace found

* update to use xcodeWorkspace, make it nullable and refactor

* check if hostAppRoot exists before trying to get xcworkspace

* use local variables to take advantage of type promotion

* only check if not null, don't need to check if exists

* readd exist check for migrate

* readd missing line at end of file
2022-11-07 18:48:52 +00:00
Jenn Magder
c1d2b854ef
Change some required nullable parameters in tool to non-null (#114115) 2022-11-04 17:36:01 +00:00
Jenn Magder
15e694414c
Terminate simulator app on "q" (#114114) 2022-10-27 22:06:35 +00:00
Victoria Ashworth
8aad1190b7
Check for watch companion in build settings (#114078) 2022-10-27 22:05:05 +00:00
Jenn Magder
609b8f3219
Revert part of "Terminate simulator app on "q" (#113581)" (#114083) 2022-10-26 10:26:14 -07:00
Jenn Magder
9f5c6553bc
Revert "Check for watch companion in build settings (#113956)" (#114035)
This reverts commit e13372188f.
2022-10-25 13:33:35 -07:00
Victoria Ashworth
e13372188f
Check for watch companion in build settings (#113956) 2022-10-25 20:08:19 +00:00
Jenn Magder
4d28e6d064
Terminate simulator app on "q" (#113581) 2022-10-18 22:26:16 +00:00
Jenn Magder
f059dd40ea
Show Xcode compilation errors at end of build, suppress stdout and stderr from Xcode (#113302) 2022-10-17 17:47:25 +00:00
Jenn Magder
61ac000d65
Enable impeller flags for iOS simulator (#113350) 2022-10-12 20:37:06 +00:00
Jenn Magder
b82cf76ff6
Return void from project migrate() (#112897) 2022-10-05 20:22:56 +00:00
Jenn Magder
8c0aa6c66c
Turn off bitcode in existing iOS Xcode projects (#112828) 2022-10-04 01:15:24 +00:00
Liam Appelbe
ec75399beb
Null safety migration of packages/flutter_tools/test/general.shard, part 1/2 (#110711)
* Migrate packages/flutter_tools/test/general.shard, part 1/2

* Fix most of the tests

* Fix analysis

* Fix analysis

* Fix test

* Fix analysis

* Fix analysis

* Fix nit
2022-09-08 15:25:27 -07:00
Jenn Magder
7c7ae991e5
Use hasNoRemainingExpectations matcher for fake process manager in tool tests (#108649) 2022-07-30 02:02:05 +00:00
Jenn Magder
4dc1bd40d4
Handle updated error message when iOS device is locked (#108057) 2022-07-26 22:33:07 +00:00
Jenn Magder
70aaff1217
Set Xcode build script phases to always run (#108331) 2022-07-26 19:20:07 +00:00
Jenn Magder
167655e8a7
Only show iOS simulators, reduce output spew in verbose (#108345) 2022-07-26 19:08:06 +00:00
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