Skip to content

Re-implement dSYM copying and stripping to avoid duplicate outputs.#9547

Merged
dnkoutso merged 1 commit into
CocoaPods:masterfrom
dnkoutso:dsym_revamp
Feb 21, 2020
Merged

Re-implement dSYM copying and stripping to avoid duplicate outputs.#9547
dnkoutso merged 1 commit into
CocoaPods:masterfrom
dnkoutso:dsym_revamp

Conversation

@dnkoutso

@dnkoutso dnkoutso commented Feb 20, 2020

Copy link
Copy Markdown
Contributor

dSYMs should have never been treated as objects to "embed" like .frameworks all they need is copying and stripping. This PR move those steps into a single target and avoids multiple targets being built producing the same "output" in which Xcode 11 errors out.

closes #9185

integration specs: CocoaPods/cocoapods-integration-specs#269

@amorde amorde left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looking great! nice work

Comment thread lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb Outdated
@dnkoutso dnkoutso force-pushed the dsym_revamp branch 6 times, most recently from ad190fa to 6e2b0c2 Compare February 20, 2020 23:24
@dnkoutso dnkoutso changed the title WIP - Revamp dSYM integration Revamp dSYM integration Feb 20, 2020
@dnkoutso dnkoutso force-pushed the dsym_revamp branch 2 times, most recently from 028e1bb to b10dabb Compare February 20, 2020 23:39
script_phase_names = script_phases.map { |k| k[:name] }
# Delete script phases no longer present in the target.
native_target_script_phases = native_target.shell_script_build_phases.select { |bp| !bp.name.nil? && bp.name.start_with?(USER_BUILD_PHASE_PREFIX) }
native_target_script_phases = native_target.shell_script_build_phases.select do |bp|

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

just formatting as line was too long. no changes.

Comment thread lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb Outdated
#
def script
script = <<-SH.strip_heredoc
#!/bin/sh

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

just updated indentation. I think because I added string interpolation to the mix it broke indentation. Either way no changes here except using the script constants instead.

Comment thread lib/cocoapods/installer/user_project_integrator/target_integrator.rb Outdated
@dnkoutso dnkoutso force-pushed the dsym_revamp branch 3 times, most recently from b983379 to db2e3d7 Compare February 21, 2020 00:10
Comment thread lib/cocoapods/installer/xcode/pods_project_generator.rb Outdated
Comment thread lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb Outdated
Comment thread lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb Outdated

@nikolaykasyanov nikolaykasyanov 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.

👏

@nikolaykasyanov

nikolaykasyanov commented Feb 21, 2020

Copy link
Copy Markdown
Contributor

I'm getting a build error using New Build System (Xcode 11.3.111.4 beta 2) on this branch:

Showing All Messages
Build system information
error: Cycle in dependencies between targets 'A-Unit-Tests' and 'A'; building could produce unreliable results.
Cycle path: A-Unit-Tests → A → A-Unit-Tests
Cycle details:
→ That command depends on command in Target 'A-Unit-Tests': script phase “[CP] Embed Pods Frameworks”
→ Target 'A-Unit-Tests' has target dependency on Target 'A'
→ Target 'A' has target dependency on Target 'B'
○ That command depends on command in Target 'B': script phase “[CP] Copy dSYMs”

Target name explanation.

UPD there's also a warning from the build system, not sure if related:

Showing All Messages
missing creator for mutated node: ('/Users/user/Library/Developer/Xcode/DerivedData/project-bfjsebfzwmezwxetcmlmiduwobqw/Build/Products/Debug-iphonesimulator/B/B.framework.dSYM')

@nikolaykasyanov

Copy link
Copy Markdown
Contributor

Looks like [CP] Copy dSYMs output file list refernce is incorrect (equal to the input list):
${PODS_ROOT}/Target Support Files/B/B-strip-dsym-input-files.xcfilelist

Comment thread lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb Outdated
@dnkoutso dnkoutso force-pushed the dsym_revamp branch 3 times, most recently from 9cf0b0f to f339988 Compare February 21, 2020 15:59
@dnkoutso dnkoutso force-pushed the dsym_revamp branch 5 times, most recently from 9f55cde to babcc11 Compare February 21, 2020 17:50
@dnkoutso dnkoutso changed the title Revamp dSYM integration Re-implement dSYM copying and stripping to avoid duplicate outputs. Feb 21, 2020

@nikolaykasyanov nikolaykasyanov 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.

Working great 🎉

@dnkoutso dnkoutso force-pushed the dsym_revamp branch 3 times, most recently from 9662858 to 702cfe6 Compare February 21, 2020 20:32
@dnkoutso

Copy link
Copy Markdown
Contributor Author

Re did it with a file instead but same functionality. Merging.

@dnkoutso dnkoutso merged commit 9817297 into CocoaPods:master Feb 21, 2020
@dnkoutso dnkoutso deleted the dsym_revamp branch February 21, 2020 21:01
@migonin

migonin commented Mar 4, 2020

Copy link
Copy Markdown

@dnkoutso did it fix #7155 also?

@amorde

amorde commented Mar 4, 2020

Copy link
Copy Markdown
Member

@migonin no, this PR only changes the implementation details of how .dSYM symbols get included in archives.

Please keep comments about issues on that issue itself, it's difficult to jump around issues & PRs to follow conversation when its not in one place.

@umar1136

Copy link
Copy Markdown

expect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Multiple commands produce" error when building unit test target without a host

5 participants