Skip to content

[Beta] Add dart snapshots recognized as mach-o binary to entitlements.txt#188085

Merged
auto-submit[bot] merged 7 commits into
flutter:flutter-3.45-candidate.0from
LongCatIsLooong:dart-snapshot-entitlements
Jun 17, 2026
Merged

[Beta] Add dart snapshots recognized as mach-o binary to entitlements.txt#188085
auto-submit[bot] merged 7 commits into
flutter:flutter-3.45-candidate.0from
LongCatIsLooong:dart-snapshot-entitlements

Conversation

@LongCatIsLooong

@LongCatIsLooong LongCatIsLooong commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Towards #188075. This should probably be fixed on master too. Will do that later if this works in the release branch.

The mime types of these files in the dart_sdk/bin/snapshots have changed:

file in dart_sdk/bin/snapshots mime type in 3.44 mime type on master / 3.45
analysis_server_aot.dart.snapshot application/x-sharedlib application/x-mach-binary
dart_tooling_daemon_aot.dart.snapshot application/x-sharedlib application/x-mach-binary
dart2bytecode.dart.snapshot application/x-sharedlib application/x-mach-binary
dart2js_aot.dart.snapshot application/x-sharedlib application/x-mach-binary
dart2wasm_product.snapshot application/x-sharedlib application/x-mach-binary
dartdev_aot.dart.snapshot application/x-sharedlib application/x-mach-binary
dartdevc_aot.dart.snapshot application/x-sharedlib application/x-mach-binary
dds_aot.dart.snapshot application/x-sharedlib application/x-mach-binary
frontend_server_aot.dart.snapshot application/x-sharedlib application/x-mach-binary
gen_kernel_aot.dart.snapshot application/x-sharedlib application/x-mach-binary
kernel_worker_aot.dart.snapshot application/x-sharedlib application/x-mach-binary

And these files in flutter/bin/cache/artifacts/engine/darwin-x64/

Filename Before After
frontend_server_aot.dart.snapshot application/x-sharedlib application/x-mach-binary
vm_isolate_snapshot.bin application/octet-stream inode/x-empty

And binary files will be put through this code path: https://github.com/flutter/cocoon/blob/b8b2020b071dd58c36347c4992c175e34edf6c44/cipd_packages/codesign/lib/src/file_codesign_visitor.dart#L374-L409

Verification

After rebuilding the engine, the entitlement files located at flutter/engine/src/out/host_debug_unopt_arm64/gen/flutter/build/archives include these files:

bash-3.2$ cat dart_sdk_entitlements.txt 
dart-sdk/bin/dart
dart-sdk/bin/dartaotruntime
dart-sdk/bin/dartvm
dart-sdk/bin/utils/gen_snapshot
dart-sdk/bin/utils/wasm-opt
dart-sdk/bin/snapshots/analysis_server_aot.dart.snapshot
dart-sdk/bin/snapshots/dart2bytecode.dart.snapshot
dart-sdk/bin/snapshots/dart2js_aot.dart.snapshot
dart-sdk/bin/snapshots/dart2wasm_product.snapshot
dart-sdk/bin/snapshots/dart_tooling_daemon_aot.dart.snapshot
dart-sdk/bin/snapshots/dartdev_aot.dart.snapshot
dart-sdk/bin/snapshots/dartdevc_aot.dart.snapshot
dart-sdk/bin/snapshots/dds_aot.dart.snapshot
dart-sdk/bin/snapshots/frontend_server_aot.dart.snapshot
dart-sdk/bin/snapshots/gen_kernel_aot.dart.snapshot
dart-sdk/bin/snapshots/kernel_worker_aot.dart.snapshot
bash-3.2$ cat entitlements.txt 
gen_snapshot
frontend_server_aot.dart.snapshot
impellerc
libtessellator.dylib
flutter_tester
libpath_ops.dylib

jason-simmons and others added 5 commits June 15, 2026 15:23
…include new Dart snapshots (flutter#186754)

A recent Dart roll (flutter#186690)
changed the format of Dart AOT snapshots so that they are now recognized
as binaries by run_verify_binaries_codesigned_tests.

The list of expected binaries needs to be updated accordingly.
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 16, 2026
@flutter-dashboard

Copy link
Copy Markdown

This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter.

Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed.

@github-actions github-actions Bot added a: text input Entering text in a text field or keyboard related problems platform-ios iOS applications specifically engine flutter/engine related. See also e: labels. team-ios Owned by iOS platform team labels Jun 16, 2026
@github-actions github-actions Bot removed CICD Run CI/CD a: text input Entering text in a text field or keyboard related problems platform-ios iOS applications specifically team-ios Owned by iOS platform team labels Jun 16, 2026
@LongCatIsLooong LongCatIsLooong added the CICD Run CI/CD label Jun 16, 2026
@LongCatIsLooong LongCatIsLooong marked this pull request as ready for review June 16, 2026 23:28

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds several Dart SDK AOT snapshots and the frontend server AOT snapshot to the binaries requiring entitlement verification, and updates the binary detection logic to recognize shared libraries. It also updates the GN build configuration to include these snapshots in the entitlement configurations. Feedback suggests sorting the newly added Dart SDK snapshot entries alphabetically in the GN configuration to maintain consistency.

Comment thread engine/src/flutter/build/archives/BUILD.gn
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 16, 2026
@LongCatIsLooong LongCatIsLooong added the CICD Run CI/CD label Jun 16, 2026
@LongCatIsLooong LongCatIsLooong added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 17, 2026
@auto-submit auto-submit Bot merged commit 792637d into flutter:flutter-3.45-candidate.0 Jun 17, 2026
177 checks passed
@LongCatIsLooong LongCatIsLooong deleted the dart-snapshot-entitlements branch June 17, 2026 02:50
xinan-wq pushed a commit to xinan-wq/flutter that referenced this pull request Jun 18, 2026
Towards flutter#188075, same as
flutter#188085, but targeting master.
See the description of flutter#188085. 

Also updated the documentation a little bit.

This will be CP'd to the 3.46 beta release if nothing goes wrong.

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] 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].
- [ ] 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].

If this change needs to override an active code freeze, provide a
comment explaining why. The code freeze workflow can be overridden by
code reviewers. See pinned issues for any active code freezes with
guidance.

**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
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[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>
LouiseHsu pushed a commit to LouiseHsu/flutter that referenced this pull request Jun 18, 2026
Towards flutter#188075, same as
flutter#188085, but targeting master.
See the description of flutter#188085. 

Also updated the documentation a little bit.

This will be CP'd to the 3.46 beta release if nothing goes wrong.

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] 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].
- [ ] 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].

If this change needs to override an active code freeze, provide a
comment explaining why. The code freeze workflow can be overridden by
code reviewers. See pinned issues for any active code freezes with
guidance.

**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
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[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>
via-guy pushed a commit to via-guy/flutter that referenced this pull request Jun 26, 2026
Towards flutter#188075, same as
flutter#188085, but targeting master.
See the description of flutter#188085. 

Also updated the documentation a little bit.

This will be CP'd to the 3.46 beta release if nothing goes wrong.

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] 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].
- [ ] 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].

If this change needs to override an active code freeze, provide a
comment explaining why. The code freeze workflow can be overridden by
code reviewers. See pinned issues for any active code freezes with
guidance.

**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
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD engine flutter/engine related. See also e: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants