flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
165.16k stars 27.24k forks source link

Update python3 references to vpython3 #108474

Open a-wallen opened 2 years ago

a-wallen commented 2 years ago

TL;DR

Update python3 references with vpython3 for consistent, reproducible builds.

Root cause

Instructions for setting up the Engine development environment guide users to install both Chromium's depot_tools and Python.

  • Chromium's depot_tools (make sure it's in your path). We use the gclient tool from depot_tools. Make sure to install gclient by running ./gclient in the command line.
  • Python (used by many of our tools, including gclient).

Hence, developers correctly assume that they may rely on python3 when developing scripts, but a user installed python3 can lead to unexpected behavior as seen in flutter/flutter#108122 and confusion.

The history shows that we intended to use vpython3 for consistent, reproducible builds, but due the following upstream issue, flutter/flutter#88719, those references were reverted back to python3.

WIP Todo List:

  1. Update python3 references to vpython3
  2. Update Setting up the Engine development environment
a-wallen commented 2 years ago

https://github.com/flutter/buildroot/blob/master/.gn resolved by flutter/buildroot#590

loic-sharma commented 2 years ago

To catch unexpected uses of python3, consider putting a python3 script at the front of your path that fails loudly. You'll want to make sure the dev workflow still works as expected, including build, git push (for git hooks), etc...

flutter-triage-bot[bot] commented 1 year ago

Issue is assigned to multiple teams (infra, engine). Please ensure the issue has only one team-* label at a time. Use fyi-* labels to have another team look at the issue without reassigning it. The triaged-engine label is irrelevant if there is no team-engine label or fyi-engine label.