27 Commits

Author SHA1 Message Date
Ben Konyi
33edd49421
[ Tool ] Remove support for experimental --fast-start feature (#173576)
This feature never worked correctly and has been disabled by default for
years.

Fixes https://github.com/flutter/flutter/issues/49499
2025-09-02 19:50:01 +00:00
hellohuanlin
dd2d7b5e3a
add format cmd to tools instruction (#173428)
The original instruction made me think that `dart analyze .` also
formats the code, but it does not.

`dev/bots/analyze.dart` formats the code, but not `dart analyze .`

*List which issues are fixed by this PR. You must list at least one
issue. An issue is not required if the PR fixes something trivial like a
typo.*

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-08-11 15:26:20 +00:00
John "codefu" McDole
7da78cb7b8
fix: get content hash for master on local engine branches (third attempt) (#173169)
The content hash doesn't exist for local engine changes, except for on
CI. If we detect we're on a branch with committed or uncommitted changes
to engine files; use "master".

towards #171790

re-land attempt for #173114 (try 2)
re-land attempt for #172792 (original)

The first commit in this PR is the previously LGTM'd changes for the
above; with tests.

The second commit is the critical change to make this work in post
submits (fixes #173143). It turns out that while LUCI reports the GitHub
private branches; our recipes directly checkout the git sha. This
matters because the content scripts couldn't determine the branch name
and the rev-parse was just HEAD. This lead the scripts down the
merge-base logic, which returns the previous commit.

A test was added specifically for this.

Alternatively to this change, we could have checked for LUCI_CONTEXT
being present in the environment. This is checked by Flutter tools in
some cases, but not by any other scripts in `bin/internal`. The downside
to checking HEAD: if you have a local branch with engine changes and you
move back a revision - `dart`/`flutter` invocations will generate the
hash for your local changes and fail.
2025-08-04 00:05:59 +00:00
auto-submit[bot]
c50dd2ea93
Reverts "fix: get content hash for master on local engine branches (#173114)" (#173145)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#173114
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: jtmcdole
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: there is still another problem with the merge
queue causing the content hash to be different:

git revision: e13dd5384cc0db576291c2925852879f1111f284
actual hash: 4b6f7b0f9849efaa59f515c8e95f3f27a6eb2ffb
hash in the queue? 9e5b2eef4ba79b15b4f80dbba812d199d262366f



<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: jtmcdole
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {matanlurey, chingjun}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
The content hash doesn't exist for local engine changes, except for on
CI. If we detect we're on a branch with committed or uncommitted changes
to engine files; use "master".

towards #171790

re-land attempt for #172792  with the following changes:

1. content_aware_hash.(ps1|sh) now consider multiple branches to choose
between HEAD and merge-base.
2. content_aware_hash_test.dart updated for these new requirements 
3. content_aware_hash_test.dart allows for forcing powershell on mac for
testing
4. updated docs/tool/Engine-artifacts.md documentation.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-08-01 23:37:49 +00:00
John "codefu" McDole
eb786c8c49
fix: get content hash for master on local engine branches (#173114)
The content hash doesn't exist for local engine changes, except for on
CI. If we detect we're on a branch with committed or uncommitted changes
to engine files; use "master".

towards #171790

re-land attempt for #172792  with the following changes:

1. content_aware_hash.(ps1|sh) now consider multiple branches to choose
between HEAD and merge-base.
2. content_aware_hash_test.dart updated for these new requirements 
3. content_aware_hash_test.dart allows for forcing powershell on mac for
testing
4. updated docs/tool/Engine-artifacts.md documentation.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
2025-08-01 20:35:26 +00:00
Matan Lurey
35ebc20b99
Update main/master repoExceptions analysis set (#172796)
Some of the repos are no longer referenced, others have migrated.
2025-07-25 22:48:15 +00:00
John "codefu" McDole
ff983d3598
feat: start using the content aware hash for downloading artifacts (#172552)
reland of https://github.com/flutter/flutter/pull/171927
towards https://github.com/flutter/flutter/issues/171790

Use the content aware hash when downloading engine artifacts. These are
currently produced when changes to DEPs, engine/, or the release file
are changed in a not-seen-before way.

We can eventually remove engine.version being tracked in release
branches as an optimization.

FLUTTER_PREBUILT_ENGINE_VERSION will stay for overriding the
engine.version for testing. Though Cocoon does not need to actually set
it for framework only PRs anymore.

fxies post submit tests for content_hash download:
SHARD=framework_tests SUBSHARD=misc dart --enable-asserts
dev/bots/test.dart
SHARD=tool_host_cross_arch_tests dart --enable-asserts
dev/bots/test.dart

```
  ╔═╡ERROR https://github.com/flutter/flutter/pull/1╞════════════════════════════════════════════════════════════════════
  ║ Expected "Flutter Engine Version: 45b085ab2118f30441ae6e2daab4b8eb3e4a063c", but found "Flutter Engine Version: 407c051ec9".
  ╚═══════════════════════════════════════════════════════════════════════════════
```

```
  Expected: contains '45b085ab2118f30441ae6e2daab4b8eb3e4a063c'
     Which: does not contain '45b085ab2118f30441ae6e2daab4b8eb3e4a063c'
```
2025-07-22 17:35:26 +00:00
auto-submit[bot]
c5465e9eb7
Reverts "feat: start using the content aware hash for downloading artifacts (#171927)" (#172505)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#171927
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: matanlurey
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Broke the tree, due to naughty tests but too
intensive to fix forward.
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: jtmcdole
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {matanlurey, chingjun}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
towards #171790 

Use the content aware hash when downloading engine artifacts. These are
currently produced when changes to DEPs, engine/, or the release file
are changed in a not-seen-before way.

We can eventually remove `engine.version` being tracked in release
branches as an optimization.

`FLUTTER_PREBUILT_ENGINE_VERSION` will stay for overriding the
engine.version for testing. Though Cocoon does not need to actually set
it for framework only PRs anymore.
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-07-21 23:09:47 +00:00
John "codefu" McDole
40992ec4f8
feat: start using the content aware hash for downloading artifacts (#171927)
towards #171790 

Use the content aware hash when downloading engine artifacts. These are
currently produced when changes to DEPs, engine/, or the release file
are changed in a not-seen-before way.

We can eventually remove `engine.version` being tracked in release
branches as an optimization.

`FLUTTER_PREBUILT_ENGINE_VERSION` will stay for overriding the
engine.version for testing. Though Cocoon does not need to actually set
it for framework only PRs anymore.
2025-07-21 17:41:44 +00:00
Sam Rawlins
0042be0562
Update tool/README.md regarding locally-built engine (#171102)
This needs some review, but reflects the merged engine repo.

CC @jonahwilliams
2025-06-24 21:06:55 +00:00
Matan Lurey
784e5149aa
Update Engine-artifacts.md to reflect flutter/cocoon/4785 (#170751)
See https://github.com/flutter/cocoon/pull/4785.
2025-06-18 18:17:48 +00:00
Ben Konyi
b2b4fb5cbf
Start removing Observatory support and references (#169216)
This change removes references to Observatory, including:

 - Deprecated flags
 - Deprecated embedder APIs
 - Outdated documentation
 - Documentation instances where "VM service" should have been used
 - Incorrectly named tests / directories

As a part of this change, `--serve-observatory` is no longer a valid
flag.

Observatory is still available for now via the `_serveObservatory` RPC,
but will be removed in a follow up PR once we've prepared for breakages
in G3.

Work towards https://github.com/dart-lang/sdk/issues/50233

FYI @a-siva
2025-05-24 00:00:30 +00:00
Matan Lurey
e2a6a1fd0b
Add documentation for experimental branches, update artifacts. (#169109)
I still need to get the Firebase short URL, but PTAL.
2025-05-20 20:14:13 +00:00
Matan Lurey
de61ad3450
Further update Engine-artifacts.md. (#168779)
Brings it line with Cocoon's current implementation, including for
"experimental" branches.
2025-05-14 15:07:05 +00:00
Matan Lurey
c99de24486
Update Engine-artifacts.md to reflect the new engine.version verifier (#168413)
Closes https://github.com/flutter/flutter/issues/168273.
2025-05-12 16:43:23 +00:00
Matan Lurey
a401c5ddde
Add bin/internal/last_engine_commit.sh and tests. (#168387)
Towards https://github.com/flutter/flutter/issues/168273.

Once merged, the recipes branch (specifically `release_packager.py`) can
use this as a lint.

/cc @reidbaker
2025-05-06 19:04:18 +00:00
Matan Lurey
38eaface2f
Clarify how/when FLUTTER_PREBUILT_ENGINE_VERSION is passed in Flutter's CI (#167204)
See also: https://github.com/flutter/website/pull/11903.
2025-04-15 18:07:04 +00:00
Matan Lurey
d2de6c65ec
Roll forward "Content aware hash moved..." with fix (#166873)
Rolls forward https://github.com/flutter/flutter/pull/166717.

Does not copy the `README` or `DEPS` files, and instead uses synthetic
scratch files.

These files can change, so we can't possibly know how to hash them
consistently.
2025-04-09 20:24:58 +00:00
auto-submit[bot]
4ab2102665
Reverts "Content aware hash moved to script and tracked (#166717)" (#166864)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#166717
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: matanlurey
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Broke tree on
[postsubmit](https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8718108088961866849/+/u/test:_run_suite_safari-dart2js-canvaskit-engine/stdout)
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: jtmcdole
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {matanlurey}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
1. Calculate the hash in only two places: `content_aware_hash.{ps1|sh}`
2. Call this from the workflow
3. Eventually call this from `update_engine_version.{ps1|sh}`

 The files of import:
* `DEPS`: tracks third party dependencies related to building the engine
* `engine`: all the code in the engine folder
* `bin/internal/content_aware_hash.ps1`: script for calculating the hash
on windows
* `bin/internal/content_aware_hash.sh`: script for calculating the hash
on mac/linux
* `.github/workflows/content-aware-hash.yml`: github action for CI/CD
hashing

Tested on windows and mac:

```shell
PS C:\src\flutter> C:\src\flutter\bin\internal\content_aware_hash.ps1
c24231e276e0719738e175e0622e040ad21a7012
```

```shell
❯ ~/src/flutter/bin/internal/content_aware_hash.sh
c24231e276e0719738e175e0622e040ad21a7012
```
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-04-09 17:58:47 +00:00
John "codefu" McDole
47ea86a10e
Content aware hash moved to script and tracked (#166717)
1. Calculate the hash in only two places: `content_aware_hash.{ps1|sh}`
2. Call this from the workflow
3. Eventually call this from `update_engine_version.{ps1|sh}`

 The files of import:
* `DEPS`: tracks third party dependencies related to building the engine
* `engine`: all the code in the engine folder
* `bin/internal/content_aware_hash.ps1`: script for calculating the hash
on windows
* `bin/internal/content_aware_hash.sh`: script for calculating the hash
on mac/linux
* `.github/workflows/content-aware-hash.yml`: github action for CI/CD
hashing

Tested on windows and mac:

```shell
PS C:\src\flutter> C:\src\flutter\bin\internal\content_aware_hash.ps1
c24231e276e0719738e175e0622e040ad21a7012
```

```shell
❯ ~/src/flutter/bin/internal/content_aware_hash.sh
c24231e276e0719738e175e0622e040ad21a7012
```
2025-04-09 16:47:09 +00:00
Matan Lurey
2b8aea7bd4
Update Engine-artifacts.md (#165127)
Part of https://github.com/flutter/flutter/issues/163896.

Remove "this process is changing".

The process has changed :)
2025-03-13 17:47:52 +00:00
Loïc Sharma
7e2b4e8f86
[Web] Improve onboarding docs (#164246) 2025-03-04 19:20:28 +00:00
Matan Lurey
3ab49e7d9a
Delete and update stale documentation regarding engine/engine hash. (#164324)
This is intended to be merged _after_
https://github.com/flutter/flutter/pull/164317.
2025-02-27 22:49:58 +00:00
Matan Lurey
a19509c6c3
Document how engine.version (is/will be) computed (#164335)
Towards https://github.com/flutter/flutter/issues/163896.
2025-02-27 22:48:48 +00:00
Andrew Kolos
dad3fea650
docs: Rework "Making changes to the flutter tool" to include flutter-dev (#157480)
Follow-up to https://github.com/flutter/flutter/pull/153599. This updates the tool readme, suggesting `bin/flutter-dev` as the primary way to run the flutter tool locally from source.

<details>

<summary> Pre-launch checklist </summary> 

</details>
2024-10-23 23:28:57 +00:00
Parker Lougheed
22570daa18
Misc docs cleanup and fixes (#155501) 2024-09-24 20:03:08 +00:00
Kate Lovett
6332ff6690
[wiki migration] Tool team pages (#148779)
This puts the wiki pages owned by the Tool team into the docs/tool directory as planned in [flutter.dev/go/migrate-flutter-wiki-spreadsheet](https://docs.google.com/spreadsheets/d/1x65189ZBdNiLRygpUYoU08pwvXD4M-Z157c6pm8deGI/edit?usp=sharing) 

It also adds the tool team labels to the label bot for future PRs.

Changes to the content were only updating cross links, or link to refer to the main branch rather than master.
Remaining links to the wiki will be updated once all other pages have finished moving, they still work in the meantime.

Part of https://github.com/flutter/flutter/issues/145009
2024-05-22 16:58:49 +00:00