Skip to content

Do not pull packages from pub during Engine repo setup or build. #82134

@zanderso

Description

@zanderso

All of the Dart package dependencies that the Engine needs to build are already coming in through the DEPS file, so the additional packages pulled from pub during the Engine's gclient sync are not needed. In particular, the step here:

https://github.com/flutter/engine/blob/1825befbc72d2f369b6ec8def7fd5362cfd10f0e/DEPS#L605

Invokes the Dart program here through pub global activate:

https://github.com/flutter/engine/tree/1825befbc72d2f369b6ec8def7fd5362cfd10f0e/tools/generate_package_config

However, this program exists only to generate .dart_tool/package_config.json files for the Dart programs built during the Engine build. Instead, these files could be generated by a pub get --offline so long as all of the dependencies listed in the pubspec.yaml files have "path" dependency overrides pointing at the package locations in the Engine checkout.

This will go in a few steps:

  1. Remove the dependency of flutter_frontend_server on package:test and package:mockito (to simplify further steps).
  2. Rewrite the pubspec.yaml files for const_finder and flutter_frontend_server to use path dependency overrides.
  3. Rewrite run_third_party_dart.py to use pub get --offline.
  4. Delete dead code (generate_package_config and the python script that calls it).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: contributor-productivityTeam-specific productivity, code health, technical debt.engineflutter/engine related. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions