Skip to content
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

Can't use lldb po when the GiphySDK is included in the project. #256

Open
aljux opened this issue Oct 2, 2024 · 2 comments
Open

Can't use lldb po when the GiphySDK is included in the project. #256

aljux opened this issue Oct 2, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@aljux
Copy link

aljux commented Oct 2, 2024

🐛 Bug Report

When including the giphy SDK in a project, it's no longer possible to use the lldb to print any object description, which makes debugging rather difficult.
Tested to include the SDK both via cocoapods and SPM.

po scrollView
Could not import Swift modules for translation unit: failed to get module "GiphyUISDK" from AST context:
error: .../Contents/Resources/Swift/aarch64/GiphyUISDK.swiftinterface:9:19: underlying Objective-C module 'GiphyUISDK' not found
@_exported import GiphyUISDK
                  ^
error: .../Contents/Resources/Swift/aarch64/GiphyUISDK.swiftinterface:1478:65: initializer does not override a designated initializer from its superclass
  @_Concurrency.MainActor(unsafe) @objc override dynamic public init(image: UIKit.UIImage?)
                                        ~~~~~~~~                ^
error: .../Contents/Resources/Swift/aarch64/GiphyUISDK.swiftinterface:1480:65: initializer does not override a designated initializer from its superclass
  @_Concurrency.MainActor(unsafe) @objc override dynamic public init(image: UIKit.UIImage?, highlightedImage: UIKit.UIImage?)
                                        ~~~~~~~~                ^
error: .../Contents/Resources/Swift/aarch64/GiphyUISDK.swiftinterface:1481:65: initializer does not override a designated initializer from its superclass
  @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreFoundation.CGRect)
                                        ~~~~~~~~                ^
error: .../Contents/Resources/Swift/aarch64/GiphyUISDK.swiftinterface:1464:125: no type named 'GiphyYYAnimatedImageView' in module 'GiphyUISDK'
@objc @_inheritsConvenienceInitializers @objcMembers @_Concurrency.MainActor(unsafe) public class GPHMediaView : GiphyUISDK.GiphyYYAnimatedImageView {
                                                                                                                            ^
error: .../Contents/Resources/Swift/aarch64/GiphyUISDK.swiftinterface:1735:107: no type named 'GiphyYYImage' in module 'GiphyUISDK'
  public func downloadAsset(_ urlString: Swift.String, key: Swift.String? = nil, completion: ((GiphyUISDK.GiphyYYImage?, (any Swift.Error)?) -> Swift.Void)?) -> Foundation.URLSessionDataTask?
  
error: .../Contents/Resources/Swift/aarch64/GiphyUISDK.swiftinterface:2:1: failed to build module 'GiphyUISDK'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)', while this compiler is 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)'). Please select a toolchain which matches the SDK.
// swift-interface-format-version: 1.0

To Reproduce

(Write your steps here:)

  1. Download Xcode 16, create a project that includes the giphySDK via SPM
  2. Build, set a breakpoint
  3. Try to type "po {OBJECT_NAME}", see error

Expected behavior

We should be able to use the lldb as normal

(Write what you thought would happen.)

Actual Behavior

error message in description is shown

Your Environment

  • Giphy iOS SDK version: FILL THIS OUT
  • Dependency Manager: SPM
  • Xcode Version: 16.0
  • Swift Version: 5
  • Device info (Simulator/Device? iOS version? Debug/Release?): iOS 18, all devices / simulators, debug
@aljux aljux added the bug Something isn't working label Oct 2, 2024
@aljux
Copy link
Author

aljux commented Oct 2, 2024

Saw that the version 2.2.11 uses the swift 6 toolchain, so switched to that version but still get some errors:

(lldb) po scrollView
Could not import Swift modules for translation unit: failed to get module "GiphyUISDK" from AST context:
error: .../Contents/Resources/Swift/aarch64/GiphyUISDK.swiftinterface:10:19: underlying Objective-C module 'GiphyUISDK' not found
@_exported import GiphyUISDK
                  ^
error: .../Contents/Resources/Swift/aarch64/GiphyUISDK.swiftinterface:1483:73: initializer does not override a designated initializer from its superclass
  @_Concurrency.MainActor @preconcurrency @objc override dynamic public init(image: UIKit.UIImage?)
                                                ~~~~~~~~                ^
error: .../Contents/Resources/Swift/aarch64/GiphyUISDK.swiftinterface:1485:73: initializer does not override a designated initializer from its superclass
  @_Concurrency.MainActor @preconcurrency @objc override dynamic public init(image: UIKit.UIImage?, highlightedImage: UIKit.UIImage?)
                                                ~~~~~~~~                ^
error: .../Contents/Resources/Swift/aarch64/GiphyUISDK.swiftinterface:1486:73: initializer does not override a designated initializer from its superclass
  @_Concurrency.MainActor @preconcurrency @objc override dynamic public init(frame: CoreFoundation.CGRect)
                                                ~~~~~~~~                ^
error: .../Contents/Resources/Swift/aarch64/GiphyUISDK.swiftinterface:1469:133: no type named 'GiphyYYAnimatedImageView' in module 'GiphyUISDK'
@objc @_inheritsConvenienceInitializers @objcMembers @_Concurrency.MainActor @preconcurrency public class GPHMediaView : GiphyUISDK.GiphyYYAnimatedImageView {
                                                                                                                                    ^
error: .../Contents/Resources/Swift/aarch64/GiphyUISDK.swiftinterface:1744:107: no type named 'GiphyYYImage' in module 'GiphyUISDK'
  public func downloadAsset(_ urlString: Swift.String, key: Swift.String? = nil, completion: ((GiphyUISDK.GiphyYYImage?, (any Swift.Error)?) -> Swift.Void)?) -> Foundation.URLSessionDataTask?
                                                                                                          ^
error: .../Contents/Resources/Swift/aarch64/GiphyUISDK.swiftinterface:2:1: failed to build module 'GiphyUISDK' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug
// swift-interface-format-version: 1.0

@cgmaier
Copy link
Contributor

cgmaier commented Oct 18, 2024

hey @aljux thanks for flagging this. by any chance, can you advise on a possible change we can make on our end that might address this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants