Skip to content

Commit

Permalink
Merge branch 'master' into 2.40.3
Browse files Browse the repository at this point in the history
  • Loading branch information
elliette authored Jan 29, 2025
2 parents 4a1934f + 80bbb54 commit 3d253c8
Show file tree
Hide file tree
Showing 1,496 changed files with 74,516 additions and 77,529 deletions.
28 changes: 23 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
wget -qO- https://dcm.dev/pgp-key.public | sudo gpg --dearmor -o /usr/share/keyrings/dcm.gpg
echo 'deb [signed-by=/usr/share/keyrings/dcm.gpg arch=amd64] https://dcm.dev/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list
sudo apt-get update
sudo apt-get install dcm=1.22.0-1 # To avoid errors add `-1` (build number) to the version
sudo apt-get install dcm=1.24.2-1 # To avoid errors add `-1` (build number) to the version
sudo chmod +x /usr/bin/dcm
echo "$(dcm --version)"
- name: Setup Dart SDK
Expand Down Expand Up @@ -99,6 +99,24 @@ jobs:
PACKAGE: ${{ matrix.package }}
run: ./tool/ci/package_tests.sh

test-tool:
name: Tool test
needs: flutter-prep
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: git clone
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- name: Load Cached Flutter SDK
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: |
./tool/flutter-sdk
key: flutter-sdk-${{ runner.os }}-${{ needs.flutter-prep.outputs.latest_flutter_candidate }}
- name: tool/ci/tool_tests.sh
run: ./tool/ci/tool_tests.sh

test:
name: ${{ matrix.bot }}
needs: flutter-prep
Expand Down Expand Up @@ -155,7 +173,7 @@ jobs:
run: ./tool/ci/bots.sh

- name: Upload Golden Failure Artifacts
uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029
uses: actions/upload-artifact@v4
if: failure()
with:
name: golden_image_failures.${{ matrix.bot }}
Expand All @@ -165,7 +183,7 @@ jobs:
env:
WORKFLOW_ID: ${{ github.run_id }}
run: |
echo "::notice title=To Quickly Fix Goldens:: Run \`devtools_tool fix-goldens --run-id=$WORKFLOW_ID\` on your local branch."
echo "::notice title=To Quickly Fix Goldens:: Run \`dt fix-goldens --run-id=$WORKFLOW_ID\` on your local branch."
devtools-app-integration-test:
name: devtools_app integration-test ${{ matrix.bot }} - ${{ matrix.device }} - shard ${{ matrix.shard }}
Expand Down Expand Up @@ -226,7 +244,7 @@ jobs:
run: ./tool/ci/bots.sh

- name: Upload Golden Failure Artifacts
uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029
uses: actions/upload-artifact@v4
if: failure()
with:
name: golden_image_failures.${{ matrix.bot }}
Expand Down Expand Up @@ -259,7 +277,7 @@ jobs:
benchmark-performance:
name: benchmark-performance
needs: flutter-prep
runs-on: ubuntu-latest
runs-on: macos-latest
strategy:
fail-fast: false
steps:
Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/daily-dev-bump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
with:
ref: master

- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
- name: Load Cached Flutter SDK
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
Expand All @@ -59,14 +58,18 @@ jobs:
id: version-bump
run: |
set -ex
# Ensure we are using the Dart executable from the Flutter SDK
export PATH=`pwd`/tool/flutter-sdk/bin/cache/dart-sdk/bin:`pwd`/tool/flutter-sdk/bin:`pwd`/bin:$PATH
pushd tool/
dart pub get
popd
# Ensure the devtools_tool command is available
# Ensure the dt command is available
export PATH="$PATH":`pwd`/tool/bin
ORIGINAL_VERSION=$(devtools_tool update-version current-version | tail -1)
ORIGINAL_VERSION=$(dt update-version current-version | tail -1)
if [ -z "$UPDATE_TYPE" ]; then
# If $UPDATE_TYPE is not set, then assume it is dev
Expand All @@ -76,14 +79,14 @@ jobs:
# If there is a major, minor, or patch bump, do it.
if [ "$UPDATE_TYPE" == "patch+dev" ]; then
devtools_tool update-version auto --type patch
devtools_tool update-version auto --type dev
dt update-version auto --type patch
dt update-version auto --type dev
elif [ "$UPDATE_TYPE" == "minor+dev" ]; then
devtools_tool update-version auto --type minor
devtools_tool update-version auto --type dev
dt update-version auto --type minor
dt update-version auto --type dev
elif [ "$UPDATE_TYPE" == "major+dev" ]; then
devtools_tool update-version auto --type major
devtools_tool update-version auto --type dev
dt update-version auto --type major
dt update-version auto --type dev
elif [ "$UPDATE_TYPE" == "dev" ]; then
if ! echo "$ORIGINAL_VERSION" | grep -Eq "\-dev\.[0-9]+" ; then
ERROR_DESCRIPTION="Doing \
Expand All @@ -94,13 +97,13 @@ jobs:
echo "::error ,title=Cannot do a dev bump on a Release Version ($ORIGINAL_VERSION)::$ERROR_DESCRIPTION"
exit 1;
fi
devtools_tool update-version auto --type dev
dt update-version auto --type dev
else
echo "ERROR: UNEXPECTED UPDATE TYPE: $UPDATE_TYPE"
exit 1
fi
NEW_VERSION=$(devtools_tool update-version current-version | tail -1)
NEW_VERSION=$(dt update-version current-version | tail -1)
echo "COMMIT_MESSAGE=Updating from $ORIGINAL_VERSION to $NEW_VERSION" >> $GITHUB_OUTPUT
env:
Expand Down
File renamed without changes.
55 changes: 33 additions & 22 deletions packages/.vscode/launch.json → .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
"configurations": [
{
"name": "opened test or devtools",
"cwd": "devtools_app",
"cwd": "packages/devtools_app",
"request": "launch",
"type": "dart",
},
{
"name": "devtools",
"request": "launch",
"type": "dart",
"program": "devtools_app/lib/main.dart",
"program": "packages/devtools_app/lib/main.dart",
},
{
"name": "devtools + experiments",
"request": "launch",
"type": "dart",
"program": "devtools_app/lib/main.dart",
"program": "packages/devtools_app/lib/main.dart",
"args": [
"--dart-define",
"memory_disconnect_experience=true",
Expand All @@ -32,21 +32,21 @@
"name": "devtools + profile",
"request": "launch",
"type": "dart",
"program": "devtools_app/lib/main.dart",
"program": "packages/devtools_app/lib/main.dart",
"flutterMode": "profile",
},
{
"name": "devtools + release",
"request": "launch",
"type": "dart",
"program": "devtools_app/lib/main.dart",
"program": "packages/devtools_app/lib/main.dart",
"flutterMode": "release",
},
{
"name": "devtools + profile + experiments",
"request": "launch",
"type": "dart",
"program": "devtools_app/lib/main.dart",
"program": "packages/devtools_app/lib/main.dart",
"flutterMode": "profile",
"args": [
"--dart-define=enable_experiments=true"
Expand All @@ -56,63 +56,74 @@
"name": "devtools + release",
"request": "launch",
"type": "dart",
"program": "devtools_app/lib/main.dart",
"program": "packages/devtools_app/lib/main.dart",
"flutterMode": "release",
},
{
"name": "memory/default",
"request": "launch",
"type": "dart",
"program": "devtools_app/test/test_infra/scenes/memory/default.stager_app.g.dart",
"program": "packages/devtools_app/test/test_infra/scenes/memory/default.stager_app.g.dart",
},
{
"name": "memory/diff_snapshot",
"request": "launch",
"type": "dart",
"program": "devtools_app/test/test_infra/scenes/memory/diff_snapshot.stager_app.g.dart",
"program": "packages/devtools_app/test/test_infra/scenes/memory/diff_snapshot.stager_app.g.dart",
},
{
"name": "performance/default",
"request": "launch",
"type": "dart",
"program": "devtools_app/test/test_infra/scenes/performance/default.stager_app.g.dart",
"program": "packages/devtools_app/test/test_infra/scenes/performance/default.stager_app.g.dart",
},
{
"name": "profiler/default",
"request": "launch",
"type": "dart",
"program": "devtools_app/test/test_infra/scenes/cpu_profiler/default.stager_app.g.dart",
"program": "packages/devtools_app/test/test_infra/scenes/cpu_profiler/default.stager_app.g.dart",
},
{
"name": "fixtures/flutter_app",
"request": "launch",
"type": "dart",
"program": "devtools_app/test/test_infra/fixtures/flutter_app/lib/main.dart",
"program": "packages/devtools_app/test/test_infra/fixtures/flutter_app/lib/main.dart",
},
{
"name": "fixtures/memory_app",
"request": "launch",
"type": "dart",
"program": "devtools_app/test/test_infra/fixtures/memory_app/lib/main.dart",
"program": "packages/devtools_app/test/test_infra/fixtures/memory_app/lib/main.dart",
},
{
"name": "standalone_ui/vs_code",
"name": "standalone_ui/editor_sidebar",
"request": "launch",
"type": "dart",
"program": "devtools_app/test/test_infra/scenes/standalone_ui/vs_code.stager_app.g.dart",
"program": "packages/devtools_app/test/test_infra/scenes/standalone_ui/editor_sidebar.stager_app.g.dart",
"preLaunchTask": "Start DTD on Port 8500",
},
{
"name": "standalone_ui/editor_sidebar",
"name": "standalone_ui/editor_sidebar + experiments",
"request": "launch",
"type": "dart",
"program": "packages/devtools_app/test/test_infra/scenes/standalone_ui/editor_sidebar.stager_app.g.dart",
"preLaunchTask": "Start DTD on Port 8500",
"args": [
"--dart-define=enable_experiments=true"
],
},
{
"name": "standalone_ui/property_editor_sidebar",
"request": "launch",
"type": "dart",
"program": "devtools_app/test/test_infra/scenes/standalone_ui/editor_sidebar.stager_app.g.dart",
"program": "packages/devtools_app/test/test_infra/scenes/standalone_ui/property_editor_sidebar.stager_app.g.dart",
"preLaunchTask": "Start DTD on Port 8500",
},
{
"name": "devtools_extensions: foo + sim",
"request": "launch",
"type": "dart",
"program": "devtools_extensions/example/packages_with_extensions/foo/packages/foo_devtools_extension/lib/main.dart",
"program": "packages/devtools_extensions/example/packages_with_extensions/foo/packages/foo_devtools_extension/lib/main.dart",
"args": [
"--dart-define=use_simulated_environment=true"
],
Expand All @@ -121,7 +132,7 @@
"name": "devtools_extensions: dart_foo + sim",
"request": "launch",
"type": "dart",
"program": "devtools_extensions/example/packages_with_extensions/dart_foo/packages/dart_foo_devtools_extension/lib/main.dart",
"program": "packages/devtools_extensions/example/packages_with_extensions/dart_foo/packages/dart_foo_devtools_extension/lib/main.dart",
"args": [
"--dart-define=use_simulated_environment=true"
],
Expand All @@ -130,13 +141,13 @@
"name": "devtools_extensions: app_that_uses_foo",
"request": "launch",
"type": "dart",
"program": "devtools_extensions/example/app_that_uses_foo/lib/main.dart",
"program": "packages/devtools_extensions/example/app_that_uses_foo/lib/main.dart",
},
{
"name": "devtools_extensions: app_that_uses_foo - bin",
"request": "launch",
"type": "dart",
"program": "devtools_extensions/example/app_that_uses_foo/bin/script.dart",
"program": "packages/devtools_extensions/example/app_that_uses_foo/bin/script.dart",
},
{
"name": "attach",
Expand All @@ -147,7 +158,7 @@
"name": "foo_devtools_extension example + simulated environment",
"request": "launch",
"type": "dart",
"program": "devtools_extensions/example/foo/packages/foo_devtools_extension/lib/main.dart",
"program": "packages/devtools_extensions/example/foo/packages/foo_devtools_extension/lib/main.dart",
"args": [
"--dart-define=use_simulated_environment=true"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/.vscode/settings.json → .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
// Set current working directory to devtools_app.
"terminal.integrated.cwd": "devtools_app",
"terminal.integrated.cwd": "packages/devtools_app",
"dart.showTodos": false,
}
File renamed without changes.
40 changes: 24 additions & 16 deletions BETA_TESTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright 2025 The Flutter Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
-->
# Build DevTools

This page describes the fastest way to build DevTools with the goal to use it. Do not mix this setup with development environment. If you want to make code changes, follow [contributing guidance](https://github.com/flutter/devtools/blob/master/CONTRIBUTING.md).
Expand Down Expand Up @@ -30,29 +35,32 @@ to the project.

In your terminal, navigate to a directory where you want to clone DevTools: `cd some/directory`.
This folder must not already contain a folder named 'devtools'.

**To clone flutter/devtools**:
- Clone the DevTools repo: `git clone [email protected]:flutter/devtools.git`
- If you haven't already, you may need to

If you do not already have an SSH key set up for your machine, you may need to
[generate a new SSH key](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh)
to connect to Github with SSH.
to connect to Github.

**To clone `flutter/devtools`**:
```shell
git clone [email protected]:flutter/devtools.git
```

**To clone your fork of flutter/devtools**:
- [Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the DevTools repo to your
own Github account.
- Clone your fork of the DevTools repo: `git clone [email protected]:your_github_account/devtools.git`
- If you haven't already, you may need to
[generate a new SSH key](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh)
to connect to Github with SSH.
- Clone your fork of the DevTools repo:
```shell
git clone git@github.com:<your_github_account>/devtools.git
```
- Make sure to [configure Git to keep your fork in sync](https://docs.github.com/en/get-started/quickstart/fork-a-repo#configuring-git-to-sync-your-fork-with-the-upstream-repository)
with the upstream DevTools repo.

2. Ensure that you have access to the `devtools_tool` executable by:
2. Ensure that you have access to the `dt` executable by:
- Running `flutter pub get` on the `devtools/tool` directory
- Adding the `devtools/tool/bin` folder to your `PATH` environment variable:
- **MacOS Users**
- add the following to your `~/.zshrc` file (or `~/.bashrc`, `~/.bash_profile` if you use Bash),
replacing `<DEVTOOLS_DIR>` with the local path to your DevTools repo:
replacing `<DEVTOOLS_DIR>` with the absolute path to your DevTools repo:

```
export PATH=$PATH:<DEVTOOLS_DIR>/tool/bin
Expand All @@ -61,20 +69,20 @@ to the project.
- Open "Edit environment variables for your account" from Control Panel
- Locate the `Path` variable and click **Edit**
- Click the **New** button and paste in `<DEVTOOLS_DIR>/tool/bin`, replacing `<DEVTOOLS_DIR>`
with the local path to your DevTools repo.
with the absolute path to your DevTools repo.

Explore the commands and helpers that the `devtools_tool` provides by running `devtools_tool -h`.
Explore the commands and helpers that the `dt` provides by running `dt -h`.

## Prepare to build DevTools

To ensure your DevTools repository is up to date and ready to build, run the following from the
`devtools` directory (this will delete any local changes you have made to your DevTools clone):
```bash
git checkout master
git reset --hard origin/master
git reset --hard origin/master # (use upstream/master instead if you cloned a fork of DevTools)

devtools_tool update-flutter-sdk
devtools_tool pub-get --only-main --upgrade
dt update-flutter-sdk
dt pub-get --only-main --upgrade
```

## Start DevTools and connect to an app
Expand Down
Loading

0 comments on commit 3d253c8

Please sign in to comment.