- 18 May, 2022 2 commits
-
-
Jonah Williams authored
-
Jenn Magder authored
-
- 17 May, 2022 7 commits
-
-
Chris Bracken authored
Because this class has some subtle behaviour with regards to control of exit timing and when and how it streams data to stderr and stdout, it's worth adding unit tests for this class directly, as well as (in a followup patch) for FakeProcessManager. This is additional testing relating to refactoring landed in: https://github.com/flutter/flutter/pull/103947 Issue: https://github.com/flutter/flutter/issues/102451
-
Christopher Fujino authored
-
Jonah Williams authored
-
Aman Verma authored
-
Lau Ching Jun authored
-
Chris Bracken authored
`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]: https://github.com/flutter/flutter/blob/fd312f1ccff909fde28d2247a489bf210bbc6c48/packages/flutter_tools/lib/src/convert.dart#L51-L60
-
Jenn Magder authored
-
- 15 May, 2022 1 commit
-
-
Chris Bracken authored
Updates the AppIcon assets in the macOS app template to meet Apple's icon guidelines as of macOS Big Sur. Assets were moved to the [flutter_template_images][1] package, which includes them as of version 4.1.0. Ref: https://developer.apple.com/design/human-interface-guidelines/macos/icons-and-images/app-icon/ Issue: https://github.com/flutter/flutter/issues/103371 [1]: https://github.com/flutter/packages/tree/main/packages/flutter_template_images
-
- 14 May, 2022 6 commits
-
-
Chris Bracken authored
Roll dependendencies This rolls depdendencies to latest using flutter update-packages --force-upgrade This change includes three code changes: * Removes charcode from the dependencies allowlist since it no longer appears in the transitive closure of dependencies of the flutter, flutter_test, flutter_driver, flutter_localizations, and integration_test packages. * Uses Resolver.create instead of the deprecated Resolver constructor. The default Resolver constructor has been deprecated in favour of the static Resolver.create() factory function, which unfortunately happens to be async. Propagated the async-ness up the chain. This change was partially reverted and the deprecation ignored in this patch until package:coverage can be rolled internally at Google. * Eliminates the use of the deprecated packagesPath parameter to HitMap.parseJson. This parameter was deprecated and replaced with packagePath in https://github.com/dart-lang/coverage/pull/370 which was part of the overall deprecation of the .packages file in Dart itself https://github.com/dart-lang/sdk/issues/48272. The overall goal being that end-user code shouldn't need to know about implementation details such as whether dependency information is stored in a .packages file or a package_info.json file, but rather use the package_config package to obtain the package metadata and perform other functions such as resolving its dependencies to filesystem paths. packagesPath was replaced by packagePath, which takes the path to the package directory itself. Internally, package:coverage then uses package_config to do the rest of the package/script URI resolution to filesystem paths. This change was partially reverted and the deprecation ignored in this patch until package:coverage can be rolled internally at Google. This is a pre-update prior to updating flutter_template_images in https://github.com/flutter/flutter/pull/103739 Issue: https://github.com/flutter/flutter/issues/103371 Issue: https://github.com/flutter/flutter/issues/103775 Issue: https://github.com/flutter/flutter/issues/103830 When re-applying the partially-reverted changes to code coverage, we'll need to patch host_entrypoint.dart internally to await the Future that we'll be returning rather than a non-async value.
-
Christopher Fujino authored
-
Jonah Williams authored
-
Chris Bracken authored
Until recently, BuildInfo.packagesPath defaulted to `.packages` however, the .packages file has been deprecated [1] and is being removed. In https://github.com/flutter/flutter/pull/99677 the default was changed to `.dart_tool/package_config.json` but the doc comment was accidentally updated to `.dart_tool/packages`. This corrects it to the true default value. 1: https://github.com/dart-lang/sdk/issues/48272 Spotted in the midst of some related cleanup relating to https://github.com/flutter/flutter/issues/103775
-
Chris Bracken authored
Point users of boolArgDeprecated to boolArg rather than to boolArgDeprecated in order to avoid losing users to infinite loops or stack overflows depending on their implementation.
-
Christopher Fujino authored
-
- 13 May, 2022 5 commits
-
-
engine-flutter-autoroll authored
* c4b899f63 Roll dart sdk to 7b24ff4d92e2d2136020fc5bedadfe7025861510 (flutter/engine#33309) * 7956603cc [web] Migrate Flutter Web DOM usage to JS static interop - 12. (flutter/engine#33241) * 1d0c2ae6f Roll Skia from 1e43dce386c9 to f6e31bf1dcfb (6 revisions) (flutter/engine#33320) * ed5a2fef0 Roll Skia from f6e31bf1dcfb to 69fecd6c2d85 (1 revision) (flutter/engine#33322) * 10e0e1534 Revert "[web] Migrate Flutter Web DOM usage to JS static interop - 12. (#33241)" (flutter/engine#33321) * fix local tests Co-authored-by: Jonah Williams <jonahwilliams@google.com>
-
Jonah Williams authored
-
-
Jenn Magder authored
-
Jonah Williams authored
-
- 12 May, 2022 2 commits
-
-
Alex Li authored
-
David Iglesias authored
-
- 11 May, 2022 3 commits
-
-
Gary Qian authored
-
Anna Gringauze authored
* Provide flutter sdk kernel files to dwds launcher instead of dart ones * Update log test to report all warnings * Update licences for new files * Addressed CR comments * Addressed CR comments
-
Jonah Williams authored
-
- 10 May, 2022 2 commits
-
-
Christopher Fujino authored
Co-authored-by: Michael Goderbauer <goderbauer@google.com>
-
Aman Verma authored
-
- 09 May, 2022 2 commits
-
-
Gary Qian authored
-
Jesús S Guerrero authored
-
- 08 May, 2022 1 commit
-
-
Danny Tuppeny authored
-
- 07 May, 2022 2 commits
-
-
Christopher Fujino authored
-
Jenn Magder authored
-
- 06 May, 2022 2 commits
-
-
Alexandre Ardhuin authored
-
Gary Qian authored
-
- 04 May, 2022 3 commits
-
-
Jenn Magder authored
-
Jenn Magder authored
-
Zachary Anderson authored
-
- 02 May, 2022 2 commits
-
-
Christopher Fujino authored
-
Jenn Magder authored
-