[CP-stable]Fix layout for macOS frameworks for code assets#181607
Conversation
To implement code assets, Flutter tooling converts `.dylib` files emitted by hooks into Apple frameworks. The format of frameworks is slightly different between macOS and other Apple platforms, and this comment explains the correct format for macOS: https://github.com/flutter/flutter/blob/f954fb79dd1570d0d05c033df85b4041fddb151f/packages/flutter_tools/lib/src/isolated/native_assets/macos/native_assets.dart#L134-L142 Currently, the link from `Resources` to `Versions/Current/Resources` is incorrectly generated to `Versions/A/Resources`. This fixes that to generate both links to `Versions/Current`. Closes flutter#178623.
|
@vashworth please fill out the PR description above, afterwards the release team will review this request. |
|
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. |
There was a problem hiding this comment.
Code Review
The pull request includes a minor refactoring in native_assets.dart to improve code readability and efficiency by caching a directory lookup. Additionally, it enhances test coverage in native_assets_test.dart by adding specific assertions to verify the symlink structure of macOS frameworks. These changes contribute to better code maintainability and ensure the correct packaging of native assets.
fba81bf
into
flutter:flutter-3.38-candidate.0
Only one cherry pick: #181607. It doesn't touch the engine, so no need to change engine.version.
The only cherry pick is #181607.
This pull request is created by automatic cherry pick workflow
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
Issue Link:
What is the link to the issue this cherry-pick is addressing?
#178623
Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See best practices for examples
When using an ffi plugin on macOS, generated frameworks have the wrong structure.
Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
Apps using ffi plugins on macOS will get App Store rejections.
Workaround:
Is there a workaround for this issue?
No
Risk:
What is the risk level of this cherry-pick?
Test Coverage:
Are you confident that your fix is well-tested by automated tests?
Validation Steps:
What are the steps to validate that this fix works?