Skip to content

Commit

Permalink
[iOS] Rename Flutter.dSYM to Flutter.framework.dSYM (flutter#54458)
Browse files Browse the repository at this point in the history
Renames our Flutter framework dSYM to `Flutter.framework.dSYM` for consistency with all other dSYM bundle names. In iOS release archives, all other dSYM files are:

* `App.framework`: `App.framework.dSYM`
* `Runner.app`: `Runner.app.dSYM`

We continue to archive the dSYM to `Flutter.dSYM.zip` for backward compatibility with the existing instructions for manual symbolification in `docs/Crashes.md` and to remain compatible with dart-lang/dart-ci's symbolizer which expects `Flutter.dSYM` in [`Symbolizer._symbolizeIosFrames`][symbolizer].

Followup to: flutter#54414
Issue: flutter/flutter#116493
Motto: [Embrace the yak shave][yak_shave].

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
  • Loading branch information
cbracken authored Aug 9, 2024
1 parent 0520889 commit e5a6030
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions sky/tools/create_full_ios_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ def create_framework( # pylint: disable=too-many-arguments
framework_dsym = None
simulator_dsym = None
if args.dsym:
framework_dsym = os.path.splitext(framework)[0] + '.dSYM'
simulator_dsym = os.path.splitext(simulator_framework)[0] + '.dSYM'
framework_dsym = framework + '.dSYM'
simulator_dsym = simulator_framework + '.dSYM'

# Emit the framework for physical devices.
shutil.rmtree(framework, True)
Expand Down Expand Up @@ -218,10 +218,25 @@ def zip_archive(dst):
'extension_safe/Flutter.xcframework',
],
cwd=dst)
if os.path.exists(os.path.join(dst, 'Flutter.dSYM')):

# Generate Flutter.dSYM.zip for manual symbolification.
#
# Historically, the framework dSYM was named Flutter.dSYM, so in order to
# remain backward-compatible with existing instructions in docs/Crashes.md
# and existing tooling such as dart-lang/dart_ci, we rename back to that name
#
# TODO(cbracken): remove these archives and the upload steps once we bundle
# dSYMs in app archives. https://github.com/flutter/flutter/issues/116493
framework_dsym = os.path.join(dst, 'Flutter.framework.dSYM')
if os.path.exists(framework_dsym):
renamed_dsym = framework_dsym.replace('Flutter.framework.dSYM', 'Flutter.dSYM')
os.rename(framework_dsym, renamed_dsym)
subprocess.check_call(['zip', '-r', 'Flutter.dSYM.zip', 'Flutter.dSYM'], cwd=dst)

if os.path.exists(os.path.join(dst, 'extension_safe', 'Flutter.dSYM')):
extension_safe_dsym = os.path.join(dst, 'extension_safe', 'Flutter.framework.dSYM')
if os.path.exists(extension_safe_dsym):
renamed_dsym = extension_safe_dsym.replace('Flutter.framework.dSYM', 'Flutter.dSYM')
os.rename(extension_safe_dsym, renamed_dsym)
subprocess.check_call(['zip', '-r', 'extension_safe_Flutter.dSYM.zip', 'Flutter.dSYM'], cwd=dst)


Expand Down

0 comments on commit e5a6030

Please sign in to comment.