1. 29 Feb, 2024 2 commits
  2. 28 Feb, 2024 2 commits
  3. 27 Feb, 2024 5 commits
  4. 26 Feb, 2024 2 commits
  5. 24 Feb, 2024 1 commit
    • MarkZ's avatar
      Adding support for DDC modules when running Flutter Web in debug mode (#141423) · ee94fe26
      MarkZ authored
      ### Context:
      
      DDC modules are abstractions over how libraries are loaded/updated. The entirety of google3 uses the DDC/legacy module system due to its flexibility extensibility over the other two (ES6 and AMD/RequireJS). Unifying DDC's module system saves us from duplicating work and will allow us to have finer grained control over how JS modules are loaded. This is a a prerequisite to features such as hot reload.
      
      ### Overview:
      
      This change plumbs a boolean flag through flutter_tools that switches between DDC (new) and AMD (current) modules. This mode is automatically applied when `--extra-front-end-options=--dartdevc-module-format=ddc` is specified alongside `flutter run`. Other important additions include:
      * Splitting Flutter artifacts between DDC and AMD modules
      * Adding unit tests for the DDC module system
      * Additional bootstrapper logic for the DDC module system
      
      We don't expect to see any user-visible behavior or performance differences.
      
      This is dependent on [incoming module system support in DWDS](https://github.com/dart-lang/webdev/pull/2295) and [additional artifacts in the engine](https://github.com/flutter/engine/pull/47783).
      
      This is part of a greater effort to deprecate the AMD module system: https://github.com/dart-lang/sdk/issues/52361
      ee94fe26
  6. 23 Feb, 2024 3 commits
  7. 22 Feb, 2024 2 commits
    • Tirth's avatar
      Fixed Small Typo in Emulators Test Name (#143578) · 3053b6ce
      Tirth authored
      Fixed Small Typo in Emulators Test Name. I filed #140656 and it was fixed in #142853. I noticed this one there and decided to send a fix.
      3053b6ce
    • Derek Xu's avatar
      Support using lightweight Flutter Engines to run tests (#141726) · dfb5888e
      Derek Xu authored
      This PR implements the functionality described above and hides it behind
      the `--experimental-faster-testing` flag of `flutter test`.
      
      ### The following are some performance measurements from test runs
      conducted on GitHub Actions
      
      run 1 logs:
      https://github.com/derekxu16/flutter_test_ci/actions/runs/8008029772/attempts/1
      run 2 logs:
      https://github.com/derekxu16/flutter_test_ci/actions/runs/8008029772/attempts/2
      run 3 logs:
      https://github.com/derekxu16/flutter_test_ci/actions/runs/8008029772/attempts/3
      
      **length of `flutter test --reporter=expanded test/animation
      test/foundation` step**
      
      run 1: 54s
      run 2: 52s
      run 3: 56s
      
      average: 54s
      
      **length of `flutter test --experimental-faster-testing
      --reporter=expanded test/animation test/foundation` step**
      
      run 1: 27s
      run 2: 27s
      run 3: 29s
      
      average: 27.67s (~48.77% shorter than 54s)
      
      **length of `flutter test --reporter=expanded test/animation
      test/foundation test/gestures test/painting test/physics test/rendering
      test/scheduler test/semantics test/services` step**
      
      run 1: 260s
      run 2: 270s
      run 3: 305s
      
      average: 278.33s
      
      
      **length of `flutter test --experimental-faster-testing
      --reporter=expanded test/animation test/foundation test/gestures
      test/painting test/physics test/rendering test/scheduler test/semantics
      test/services` step**
      
      from a clean build (right after deleting the build folder):
      
      run 1: 215s
      run 2: 227s
      run 3: 245s
      
      average: 229s (~17.72% shorter than 278.33s)
      
      Note that in reality, `test/material` was not passed to `flutter test`
      in the trials below. All of the test files under `test/material` except
      for `test/material/icons_test.dart` were listed out individually
      
      **length of `flutter test --reporter=expanded test/material` step**
      
      run 1: 408s
      run 2: 421s
      run 3: 451s
      
      average: 426.67s
      
      **length of `flutter test --experimental-faster-testing
      --reporter=expanded test/material` step**
      
      run 1: 382s
      run 2: 373s
      run 3: 400s
      
      average: 385s (~9.77% shorter than 426.67s)
      
      ---------
      Co-authored-by: 's avatarDan Field <dnfield@google.com>
      dfb5888e
  8. 21 Feb, 2024 2 commits
  9. 20 Feb, 2024 1 commit
  10. 19 Feb, 2024 1 commit
  11. 17 Feb, 2024 1 commit
  12. 16 Feb, 2024 5 commits
  13. 15 Feb, 2024 4 commits
  14. 14 Feb, 2024 4 commits
    • Michael Goderbauer's avatar
    • Anas's avatar
      [tools] Add column header for emulators information (#142853) · ca03beda
      Anas authored
      Add column information as table header for `flutter emulators` command.
      
      **Before:**
      
      ```
      2 available emulators:
      
      Pixel_3_API_30   • Pixel 3 API 30   • Google • android
      Resizable_API_33 • Resizable API 33 • Google • android
      
      To run an emulator, run 'flutter emulators --launch <emulator id>'.
      To create a new emulator, run 'flutter emulators --create [--name xyz]'.
      
      You can find more information on managing emulators at the links below:
        https://developer.android.com/studio/run/managing-avds
        https://developer.android.com/studio/command-line/avdmanager
      ```
      
      **After:**
      
      ```
      2 available emulators:
      
      Id               • Name             • Manufacturer • Platform
      
      Pixel_3_API_30   • Pixel 3 API 30   • Google       • android
      Resizable_API_33 • Resizable API 33 • Google       • android
      
      To run an emulator, run 'flutter emulators --launch <emulator id>'.
      To create a new emulator, run 'flutter emulators --create [--name xyz]'.
      
      You can find more information on managing emulators at the links below:
        https://developer.android.com/studio/run/managing-avds
        https://developer.android.com/studio/command-line/avdmanager
      ```
      
      fixes #140656
      ca03beda
    • Martin Kustermann's avatar
      Use `dart compile wasm` for wasm compilations (#143298) · abadf9ff
      Martin Kustermann authored
      * Flags to `dart compile wasm`
      
      Some options are not relevant to a standalone user of `dart compile
      wasm` (e.g. specyfing dart-sdk, platform file etc). => Those aren't
      offered by the `dart compile wasm` tool directly. => We use the
      `--extra-compiler-option=` instead which passes through arbitrary
      options to the dart2wasm compiler. => We don't maintain compatibility of
      those options, if we update them we'll ensure to also update flutter
      tools
      
      * Binaryen optimization passes
      
      This change will mean we use the binaryen flags from Dart SDK which are
      slightly different from the ones in flutter.
      
      * Optimization configuration
      
      This change will also start using the more standardized `-O` flag for
      determining optimization levels. The meaning of those flags have been
      mostly aligned with dart2js (with some differences remaining).
      
      * Minimization
      
      Using the new optimization flags, namely `-O4` for `--wasm-opt=full`,
      will automatically enable the new `--minify` support. Minification is
      Dart semantics preserving but changes the `<obj>.runtimeType.toString()`
      to use minified names (just as in dart2js).
      
      * Code size changes
      
        Overall this change will reduce wonderous code size by around 10%.
      
      Issue https://github.com/dart-lang/sdk/issues/54675
      abadf9ff
    • Andrew Kolos's avatar
      Fix `AssetsEntry::equals` (#143355) · 14bcc694
      Andrew Kolos authored
      In service of https://github.com/flutter/flutter/issues/143348.
      
      **Issue.** The `equals` implementation of `AssetsEntry` is incorrect. It compares `flavors` lists using reference equality. This PR addresses this.
      
      This also adds a test to make sure valid asset `flavors` declarations are parsed correctly.
      
      While we are here, this PR also includes a couple of refactorings:
        * `flutter_manifest_test.dart` is a bit large. To better match our style guide, I've factored out some related tests into their own file.
        *  A couple of changes to the `_validateListType` function in `flutter_manifest.dart`:
            * The function now returns a list of errors instead of accepting a list to append onto. This is more readable and also allows callers to know which errors were found by the call.
            * The function is renamed to `_validateList` and now accepts an `Object?` instead of an `YamlList`. If the argument is null, an appropriate error message is contained in the output. This saves callers that are only interested in validation from having to write their own null-check, which they all did before.
            * Some error strings were tweaked for increased readability and/or grammatical correctness.
      14bcc694
  15. 13 Feb, 2024 4 commits
  16. 12 Feb, 2024 1 commit