1. 25 Oct, 2023 1 commit
  2. 24 Oct, 2023 2 commits
    • Chris Bracken's avatar
      [macOS] Refactor macOS build/codesize analysis (#137164) · c15ff682
      Chris Bracken authored
      Extracts out _shouldWriteCodeSizeAnalysis and _writeCodeSizeAnalysis from the main buildMacOS function.
      
      No tets changes sine this is a simple restructuring for readability and does not change any tool logic.
      c15ff682
    • auto-submit[bot]'s avatar
      Reverts "Use `coverage.collect`'s `coverableLineCache` param to speed up coverage" (#137121) · 8df62188
      auto-submit[bot] authored
      Reverts flutter/flutter#136851
      Initiated by: CaseyHillers
      This change reverts the following previous change:
      Original Description:
      One of the reasons gathering coverage information is expensive is that we have to force compile every function in the libraries we're interested in. Without this, functions that haven't been invoked (so haven't been compiled) won't have any line number information, so the coverage tool doesn't know which lines to add to the list of misses. In flutter's case, the test infra spawns many VMs, and each of these needs to recompile all those libraries.
      
      To fix this, we need a way of skipping force compilation for libraries we've already seen in previous tests, without losing the information about which lines in each library are coverable. So I [added](https://github.com/dart-lang/coverage/pull/466) the `coverableLineCache` to `coverage.collect` in package:coverage v1.7.0. This cache starts out empty, but fills up with lists of all the lines that are coverable for every library as coverage is gathered. package:coverage can then tell the VM not to force compile any libraries in this cache (using `getSourceReport`'s `librariesAlreadyCompiled` param). So the first test suite will still have to compile everything, but subsequent test suites will be much faster.
      
      This speeds up coverage collection significantly, for large test suites:
      
      | Running flutter/packages/flutter tests... | Time | Overhead |
      | --- | --- | --- |
      | without coverage | 8:53 | - |
      | with coverage | 20:25 | 130% |
      | with `coverableLineCache` | 12:21 | 40% |
      
      Bug: https://github.com/flutter/flutter/issues/100751
      8df62188
  3. 23 Oct, 2023 1 commit
    • Liam Appelbe's avatar
      Use `coverage.collect`'s `coverableLineCache` param to speed up coverage (#136851) · fb297e1d
      Liam Appelbe authored
      One of the reasons gathering coverage information is expensive is that we have to force compile every function in the libraries we're interested in. Without this, functions that haven't been invoked (so haven't been compiled) won't have any line number information, so the coverage tool doesn't know which lines to add to the list of misses. In flutter's case, the test infra spawns many VMs, and each of these needs to recompile all those libraries.
      
      To fix this, we need a way of skipping force compilation for libraries we've already seen in previous tests, without losing the information about which lines in each library are coverable. So I [added](https://github.com/dart-lang/coverage/pull/466) the `coverableLineCache` to `coverage.collect` in package:coverage v1.7.0. This cache starts out empty, but fills up with lists of all the lines that are coverable for every library as coverage is gathered. package:coverage can then tell the VM not to force compile any libraries in this cache (using `getSourceReport`'s `librariesAlreadyCompiled` param). So the first test suite will still have to compile everything, but subsequent test suites will be much faster.
      
      This speeds up coverage collection significantly, for large test suites:
      
      | Running flutter/packages/flutter tests... | Time | Overhead |
      | --- | --- | --- |
      | without coverage | 8:53 | - |
      | with coverage | 20:25 | 130% |
      | with `coverableLineCache` | 12:21 | 40% |
      
      Bug: https://github.com/flutter/flutter/issues/100751
      fb297e1d
  4. 20 Oct, 2023 4 commits
  5. 19 Oct, 2023 5 commits
  6. 18 Oct, 2023 8 commits
  7. 17 Oct, 2023 4 commits
    • Andrew Kolos's avatar
      clean up `--dart-define-from-file` option tests (#135980) · cdc40b52
      Andrew Kolos authored
      Fixes https://github.com/flutter/flutter/issues/134279.
      
      Changes:
      * Moves all tests of `--dart-define-from-file` behavior from `build_bundle_test.dart` and `assemble_test.dart` to `flutter_command_test.dart`.
      * Deletes a duplicate test of malformed JSON detection behavior.
      * Renames the `useDartDefineFromFileOption` method of `FlutterCommand` to `_usesDartDefineFromFileOption`. This 1) makes the name more consistent with the other `uses*Option` methods and 2) hides the method since it is not used outside of the file.
      * Renames several tests to better articulate what is under test and what the expected result is.
      * Adds a test for the case where a `.env` file with a malformed line is provided to `--dart-define-from-file`.
      cdc40b52
    • Aran Donohue's avatar
      Support --web-header option for flutter run (#136297) · 48eee14f
      Aran Donohue authored
      Adds support for a new --web-header option to flutter run.
      
      Creates a workaround for https://github.com/flutter/flutter/issues/127902
      
      This PR allows adding additional headers for the flutter run web server. This is useful to add headers like Cross-Origin-Embedder-Policy and Cross-Origin-Opener-Policy without the use of a proxy server. These headers are required enable advanced web features. This approach provides flexibility to the developer to make use of the feature as they see fit and is backward-compatible. One tradeoff is that it increases the surface area to support for future changes to the flutter web server.
      
      https://github.com/flutter/flutter/issues/127902 is not fully addressed by this change. The solution for that task will be more opinionated. This PR creates a general-purpose workaround for anyone who needs a solution sooner while the bigger solution is developed.
      48eee14f
    • auto-submit[bot]'s avatar
      Reverts "Skip injecting Bonjour settings when port publication is disabled" (#136750) · 54c0a350
      auto-submit[bot] authored
      Reverts flutter/flutter#136562
      Initiated by: vashworth
      This change reverts the following previous change:
      Original Description:
      Some of our tests in CI are triggering the `NSLocalNetworkUsageDescription` dialog when they're not supposed to (https://github.com/flutter/flutter/issues/129836) since it's disabled via flags (`--no-publish-port` for flutter/flutter and `--disable-vm-service-publication` for flutter/engine).
      
      Normally, we inject `NSLocalNetworkUsageDescription` (and other bonjour settings) to the Info.plist during the project build for debug and profile mode since by default they will publish the VM Service port over mDNS.
      
      To help diagnose the issue, though, this PR changes it so that we don't inject `NSLocalNetworkUsageDescription` (and other bonjour settings) when port publication is disabled since it shouldn't be needed. Hopefully, this will give us better error messages or cause the app to crash and end the test early (rather than timeout after 30 minutes).
      54c0a350
    • Victoria Ashworth's avatar
      Skip injecting Bonjour settings when port publication is disabled (#136562) · 0383d8ba
      Victoria Ashworth authored
      Some of our tests in CI are triggering the `NSLocalNetworkUsageDescription` dialog when they're not supposed to (https://github.com/flutter/flutter/issues/129836) since it's disabled via flags (`--no-publish-port` for flutter/flutter and `--disable-vm-service-publication` for flutter/engine).
      
      Normally, we inject `NSLocalNetworkUsageDescription` (and other bonjour settings) to the Info.plist during the project build for debug and profile mode since by default they will publish the VM Service port over mDNS.
      
      To help diagnose the issue, though, this PR changes it so that we don't inject `NSLocalNetworkUsageDescription` (and other bonjour settings) when port publication is disabled since it shouldn't be needed. Hopefully, this will give us better error messages or cause the app to crash and end the test early (rather than timeout after 30 minutes).
      0383d8ba
  8. 16 Oct, 2023 1 commit
  9. 12 Oct, 2023 4 commits
  10. 11 Oct, 2023 4 commits
  11. 10 Oct, 2023 3 commits
  12. 04 Oct, 2023 1 commit
  13. 29 Sep, 2023 2 commits