phrase / ios-sdk

Phrase Over the Air iOS SDK
https://phrase.com
Other
14 stars 3 forks source link

Hardcoded path in latest release 3.0 #30

Closed ChristianSteffens closed 3 years ago

ChristianSteffens commented 3 years ago

I noticed an error while debugging our app with the latest Phrase SDK 3.0. There's an hardcoded path in the latest framework @winkelsdorf

error: virtual filesystem overlay file 
'/Users/winkelsdorf/Library/Developer/Xcode/DerivedData/PhraseSDKdbgypdflrqbfdrdzewelqaanicsg/
 Build/Intermediates.noindex/ArchiveIntermediates/PhraseSDK/IntermediateBuildFilesPath/
 PhraseSDK.build/Release-iphoneos/PhraseSDK.build/all-product-headers.yaml' not found
winkelsdorf commented 3 years ago

@ChristianSteffens Thank you for the report! Going to investigate this immediately. I can already say that we don't use any hardcoded paths or .yaml files. Looks like it might be related to a lldb issue.

How are you integrating the framework? Are you using Carthage?

Schlabbi commented 3 years ago

Same issue here, this completely broke LLDB commands for my entire app. Had to downgrade to 2.3.0 to be able to use LLDB again.

image

Integrating the framework on my part was done using Cocoapods.

winkelsdorf commented 3 years ago

@Schlabbi Thanks for your additional feedback!

I'll keep you updated here.

ChristianSteffens commented 3 years ago

How are you integrating the framework? Are you using Carthage?

We're using cocoapods.

winkelsdorf commented 3 years ago

@ChristianSteffens @Schlabbi I'm able to reproduce this error. From what I'd found it is an error related to the generated dSYMS on Xcode 12 (see https://bugs.swift.org/browse/SR-12933). Trying to workaround that now.

winkelsdorf commented 3 years ago

@ChristianSteffens @Schlabbi Thank you very much for reporting and giving more details! 👍

I was able to identify the underlying issue. It is a regression in the Swift frontend compiler which leads to issues with the generated dSYMs despite using -no-serialize-debugging-options (see https://bugs.swift.org/browse/SR-12933 and https://steipete.com/posts/couldnt-irgen-expression/ for more details if you are curious).

The hardcoded path has always been included inside the dSYMs, but -no-serialize-debugging-options was used to ignore them when debugging. This is now broken with Xcode 12 (12.4?).

The shortly available hotfix release v3.0.1 will omit including the dSYMs. We're going to report this to Apple.

Let me know if this release resolves the issue for you.

winkelsdorf commented 3 years ago

@ChristianSteffens @Schlabbi v3.0.1 with a Hotfix is available now

gutaker commented 3 years ago

3.0.1 works like a charm. No errors, can debug now. Good job!

winkelsdorf commented 3 years ago

@gutaker Glad to hear that it's working for you now. Thank you very much for the feedback, I really appreciate that! Closing this issue now :)