1. 16 Jun, 2022 2 commits
  2. 15 Jun, 2022 1 commit
  3. 09 Jun, 2022 1 commit
  4. 25 May, 2022 2 commits
  5. 24 May, 2022 3 commits
  6. 17 May, 2022 2 commits
    • Chris Bracken's avatar
      [tool] Add tests for FakeProcess (#104013) · 9d9e272e
      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
      9d9e272e
    • Chris Bracken's avatar
      [tool] Consistent FakeProcessManager.run/runSync (#103947) · 928bb122
      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
      928bb122
  7. 07 May, 2022 1 commit
  8. 27 Apr, 2022 1 commit
  9. 26 Apr, 2022 1 commit
  10. 08 Apr, 2022 1 commit
  11. 31 Mar, 2022 1 commit
  12. 17 Mar, 2022 1 commit
  13. 09 Mar, 2022 1 commit
  14. 02 Mar, 2022 1 commit
  15. 25 Feb, 2022 1 commit
  16. 11 Feb, 2022 1 commit
  17. 02 Feb, 2022 2 commits
  18. 26 Jan, 2022 2 commits
  19. 04 Jan, 2022 2 commits
    • Zachary Anderson's avatar
      Revert "FFI plugins (#94101)" (#96122) · 65c6e882
      Zachary Anderson authored
      This reverts commit 5257f029.
      65c6e882
    • Daco Harkes's avatar
      FFI plugins (#94101) · 5257f029
      Daco Harkes authored
      * Building shared C source code as part of the native build for platforms Android, iOS, Linux desktop, MacOS desktop, and Windows desktop.
      * Sample code doing a synchronous FFI call.
      * Sample code doing a long running synchronous FFI call on a helper isolate.
      * Use of `package:ffigen` to generate the bindings.
      5257f029
  20. 15 Dec, 2021 1 commit
  21. 14 Dec, 2021 1 commit
  22. 01 Dec, 2021 1 commit
  23. 12 Nov, 2021 1 commit
  24. 11 Nov, 2021 1 commit
  25. 05 Nov, 2021 2 commits
  26. 02 Nov, 2021 1 commit
  27. 21 Oct, 2021 1 commit
  28. 12 Oct, 2021 1 commit
  29. 08 Oct, 2021 3 commits