Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: Use engine_stamp.json in flutter tool #171454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

jtmcdole
Copy link
Member

@jtmcdole jtmcdole commented Jul 1, 2025

The flutter tool will now download and use an engine_stamp.json file to determine the engine version, content hash, build date, and commit date.

The file is treated as a new DevelopmentArtifact.informative and is fetched before flutterVersion is used. This ensures we have build information for a clean checkout with no bin/cache folder. Users that download from flutter.dev will have engine_stamp.json, so its a no-op.

This change provides support for content hashed engine artifacts, who's revision (the hash) is not a git commit sha. A side benefit is "git" is only used at build time to extract this information.

Note

Content hashed artifacts are not enabled yet for downloads; bin/internal/engine.version (releases) and the shell updaters still look for the git commit sha. One can test this out by setting FLUTTER_PREBUILD_ENGINE_VERSION to the content hash.

The flutter tool will now download and use an `engine_stamp.json`
file to determine the engine version, content hash, build date, and
commit date.

This change provides support for content hashed engine artifacts, who's
revision (the hash) is not a git commit sha. A side benifit is "git" is
only used at build time to extract this information.

Content hashed artifacts are not enabled yet;
bin/internal/engine.version (releases) and the shell updaters still look
for the git commit sha. One can test this out by setting
FLUTTER_PREBUILD_ENGINE_VERSION to the content hash.
@jtmcdole jtmcdole requested review from matanlurey and bkonyi July 1, 2025 16:14
@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jul 1, 2025
@jtmcdole
Copy link
Member Author

jtmcdole commented Jul 1, 2025

Failing tests look real - so moving to draft while I figure out how to recreate.

@jtmcdole jtmcdole marked this pull request as draft July 1, 2025 16:19
@flutter-dashboard
Copy link

This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@jtmcdole jtmcdole marked this pull request as ready for review July 2, 2025 00:05
@jtmcdole
Copy link
Member Author

jtmcdole commented Jul 2, 2025

Waiting on g3fix to retest.

@jtmcdole
Copy link
Member Author

jtmcdole commented Jul 2, 2025

G3Fix works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant