-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Regenerate FlutterMacOS.xcframework when sources of dependencies change #51396
Regenerate FlutterMacOS.xcframework when sources of dependencies change #51396
Conversation
shell/platform/darwin/macos/BUILD.gn
Outdated
":copy_dylib", | ||
":copy_framework_headers", | ||
":copy_framework_icu", | ||
":copy_framework_info_plist", | ||
":copy_framework_module_map", | ||
":copy_license", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since _generate_symlinks_and_verify_framework_module
deps on _generate_symlinks
which deps on this same list, it seems like maybe the deps aren't the source of the problem. Maybe sources = [ $root_build_dir/$_flutter_framework_name.stamp ]
would make this re-run if the framework is rebuilt?
@zanderso what's the gn idiomatic way to do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the right way to do this is to leave this deps list unchanged, but to make _generate_symlinks
a public_deps
of _generate_symlinks_and_verify_framework_module
. (I think that's all that should be needed, but making the deps
of _generate_symlinks
be public_deps
in addition would be the next thing to try.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately setting deps
to public_deps
for both _generate_symlinks
and _generate_symlinks_and_verify_framework_module
didn't work, perhaps because _generate_symlinks_and_verify_framework_module
is a shared_library
?
Looking at how we do this for iOS, we have the flutter_framework
depend on a group
universal_flutter_framework
, which then has a dependency on the shared_library
(copy_and_verify_framework_module
) and the other deps
engine/shell/platform/darwin/ios/BUILD.gn
Lines 448 to 478 in 76f33eb
group("universal_flutter_framework") { | |
visibility = [ ":*" ] | |
deps = [ | |
":copy_and_verify_framework_module", | |
":copy_dylib", | |
":copy_framework_icu", | |
":copy_framework_info_plist", | |
":copy_framework_module_map", | |
":copy_framework_privacy_manifest", | |
":copy_license", | |
] | |
if (is_asan) { | |
deps += [ ":copy_asan_runtime_dylib" ] | |
} | |
} | |
action("flutter_framework") { | |
script = "//flutter/sky/tools/create_xcframework.py" | |
outputs = [ "$root_out_dir/Flutter.xcframework" ] | |
args = [ | |
"--frameworks", | |
rebase_path("$_flutter_framework_dir"), | |
"--name", | |
"Flutter", | |
"--location", | |
rebase_path("$root_out_dir"), | |
] | |
deps = [ ":universal_flutter_framework" ] | |
} |
I could add a group
to the macOS version to mimic it, also perhaps instead of the deps from _generate_symlinks
, just use _generate_symlinks
as the dep. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shucks. The sematics of GN deps and when thy block and when they propagate are certainly confusing. If there's a working pattern on the macOS side, then mimicking that here makes sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RSLGTM to whatever @zanderso approves.
…145429) flutter/engine@bd3a924...dce639a 2024-03-19 skia-flutter-autoroll@skia.org Roll Skia from f67715b35713 to 0b3bd42131fe (12 revisions) (flutter/engine#51530) 2024-03-19 15619084+vashworth@users.noreply.github.com Regenerate FlutterMacOS.xcframework when sources of dependencies change (flutter/engine#51396) 2024-03-19 skia-flutter-autoroll@skia.org Roll Dart SDK from 7c64e31f4c3e to 7885a3fa6bfd (1 revision) (flutter/engine#51528) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Fixes flutter/flutter#144716.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.