Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

iOS,macOS: Clean up create_ios_framework.py #54500

Merged
merged 3 commits into from
Aug 12, 2024

Conversation

cbracken
Copy link
Member

Over time, this script and others in sky/tools have accumulated a lot of additional and sometimes duplicate code.

This is a first pass cleanup of create_ios_framework.py to extract common utility code to utils.py and refactor for better readability.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

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

@cbracken
Copy link
Member Author

This will be followed by cleanups for the other scripts. There's a lot more that could be cleaned up here, but I figured this patch already touches nearly half the lines of code in the script as-is.

@cbracken cbracken requested review from zanderso and jmagman August 12, 2024 04:54
@cbracken cbracken force-pushed the clean-up-creation-scripts branch from c212f09 to aa5bdd6 Compare August 12, 2024 04:56
Over time, this script and others in sky/tools have accumulated a lot of
additional and sometimes duplicate code.

This is a first pass cleanup of create_ios_framework.py to extract
common utility code to utils.py and refactor for better readability.
@cbracken cbracken force-pushed the clean-up-creation-scripts branch from cfa9edb to 68109b5 Compare August 12, 2024 19:08
@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 12, 2024
@auto-submit auto-submit bot merged commit 619df47 into flutter:main Aug 12, 2024
29 checks passed
@cbracken cbracken deleted the clean-up-creation-scripts branch August 12, 2024 21:10
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 12, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 12, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 13, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Aug 13, 2024
…153326)

flutter/engine@5d8ee52...07ecd90

2024-08-12 skia-flutter-autoroll@skia.org Roll Skia from c9fd814b106a to 7bed8fb6fae2 (2 revisions) (flutter/engine#54516)
2024-08-12 skia-flutter-autoroll@skia.org Roll Skia from e232752d04c5 to c9fd814b106a (3 revisions) (flutter/engine#54515)
2024-08-12 43054281+camsim99@users.noreply.github.com [Android] Update integration test AVD dependency to use Android 35 emulators (flutter/engine#54186)
2024-08-12 jonahwilliams@google.com [iOS] keep threads merged when using Skia renderer on iOS (flutter/engine#54514)
2024-08-12 chris@bracken.jp iOS,macOS: Clean up create_ios_framework.py (flutter/engine#54500)
2024-08-12 skia-flutter-autoroll@skia.org Roll Skia from ec7558d41b34 to e232752d04c5 (3 revisions) (flutter/engine#54511)
2024-08-12 skia-flutter-autoroll@skia.org Roll Dart SDK from cfe2b63d3aca to a6cd8099ff85 (1 revision) (flutter/engine#54512)

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 jsimmons@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
auto-submit bot pushed a commit that referenced this pull request Aug 13, 2024
Over time, this script and others in sky/tools have accumulated a lot of additional and sometimes duplicate code.

This is a first pass cleanup of create_macos_framework.py to extract common utility code to utils.py and refactor for better readability.

The iOS analogue of this patch was #54500.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
auto-submit bot added a commit that referenced this pull request Aug 14, 2024
Reverts: #54543
Initiated by: zanderso
Reason for reverting: Failing roll flutter/flutter#153406
Original PR Author: cbracken

Reviewed By: {zanderso}

This change reverts the following previous change:
Over time, this script and others in sky/tools have accumulated a lot of additional and sometimes duplicate code.

This is a first pass cleanup of create_macos_framework.py to extract common utility code to utils.py and refactor for better readability.

The iOS analogue of this patch was #54500.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
cbracken added a commit that referenced this pull request Aug 14, 2024
Over time, this script and others in sky/tools have accumulated a lot of additional and sometimes duplicate code.

This is a first pass cleanup of create_macos_framework.py to extract common utility code to utils.py and refactor for better readability.

The iOS analogue of this patch was #54500.

This is a reland of #54543, which failed to set the `-y` option on zip when zipping `FlutterMacOS.xcframework` but did so for the other zip steps where required. Since there is no case where we *want* to archive dereferenced symlinks, and because it's required for macOS frameworks, we now set this option for all callers in the `sky_tools.create_zip()` function to avoid future cases where someone working on this code misses one. If we ever need it, we can extract a parameter. This patch also references the correct script in its description (the original incorrectly mentioned `create_ios_framework.py`).

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
auto-submit bot pushed a commit that referenced this pull request Aug 14, 2024
Over time, this script and others in `sky/tools` have accumulated a lot of additional and sometimes duplicate code.

This is a first pass cleanup of `create_macos_framework.py` to extract common utility code to `sky/utils.py` and refactor for better readability.

The iOS analogue of this patch was #54500.

This is a reland of #54543 (reverted in #54550), which failed to set the `-y` option (preserve symlinks) when zipping `FlutterMacOS.xcframework` but did so for the other zip steps where required. Since there is no case where we *want* to archive dereferenced symlinks, and because it's required for macOS frameworks, we now set this option for all callers in the `sky_tools.create_zip()` function to avoid future cases where someone working on this code misses one. If we ever need it, we can extract a parameter. This patch also references the correct script in its description (the original incorrectly mentioned `create_ios_framework.py`).

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
DBowen33 pushed a commit to DBowen33/flutter that referenced this pull request Aug 16, 2024
…lutter#153326)

flutter/engine@5d8ee52...07ecd90

2024-08-12 skia-flutter-autoroll@skia.org Roll Skia from c9fd814b106a to 7bed8fb6fae2 (2 revisions) (flutter/engine#54516)
2024-08-12 skia-flutter-autoroll@skia.org Roll Skia from e232752d04c5 to c9fd814b106a (3 revisions) (flutter/engine#54515)
2024-08-12 43054281+camsim99@users.noreply.github.com [Android] Update integration test AVD dependency to use Android 35 emulators (flutter/engine#54186)
2024-08-12 jonahwilliams@google.com [iOS] keep threads merged when using Skia renderer on iOS (flutter/engine#54514)
2024-08-12 chris@bracken.jp iOS,macOS: Clean up create_ios_framework.py (flutter/engine#54500)
2024-08-12 skia-flutter-autoroll@skia.org Roll Skia from ec7558d41b34 to e232752d04c5 (3 revisions) (flutter/engine#54511)
2024-08-12 skia-flutter-autoroll@skia.org Roll Dart SDK from cfe2b63d3aca to a6cd8099ff85 (1 revision) (flutter/engine#54512)

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 jsimmons@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
Buchimi pushed a commit to Buchimi/flutter that referenced this pull request Sep 2, 2024
…lutter#153326)

flutter/engine@5d8ee52...07ecd90

2024-08-12 skia-flutter-autoroll@skia.org Roll Skia from c9fd814b106a to 7bed8fb6fae2 (2 revisions) (flutter/engine#54516)
2024-08-12 skia-flutter-autoroll@skia.org Roll Skia from e232752d04c5 to c9fd814b106a (3 revisions) (flutter/engine#54515)
2024-08-12 43054281+camsim99@users.noreply.github.com [Android] Update integration test AVD dependency to use Android 35 emulators (flutter/engine#54186)
2024-08-12 jonahwilliams@google.com [iOS] keep threads merged when using Skia renderer on iOS (flutter/engine#54514)
2024-08-12 chris@bracken.jp iOS,macOS: Clean up create_ios_framework.py (flutter/engine#54500)
2024-08-12 skia-flutter-autoroll@skia.org Roll Skia from ec7558d41b34 to e232752d04c5 (3 revisions) (flutter/engine#54511)
2024-08-12 skia-flutter-autoroll@skia.org Roll Dart SDK from cfe2b63d3aca to a6cd8099ff85 (1 revision) (flutter/engine#54512)

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 jsimmons@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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants