MobileNativeFoundation / rules_xcodeproj

Bazel rules for generating Xcode projects.
MIT License
514 stars 81 forks source link

Bug: Xcode 15.3 LLDB error #2946

Closed polac24 closed 5 months ago

polac24 commented 5 months ago

Description

Whenever I hit a breakpoint in Xcode 15.3, I get an error:

Traceback (most recent call last):
  File ".../DerivedData/my_poroject/Build/Intermediates.noindex/Debug/swift_debug_settings.py", line 8738, in handle_stop
    module_name = module.file.__get_fullpath__()
AttributeError: 'SBFileSpec' object has no attribute '__get_fullpath__'

That is caused because of the LLDB API difference, which doesn't expose __get_fullpath__ anymore:

Xcode 15.1

$ script help(lldb)
...
     |  __eq__(self, rhs)
     |      __eq__(SBFileSpec self, SBFileSpec rhs) -> bool
     |  
     |  __get_fullpath__(self)
     |  
     |  __init__(self, *args)
...

Xcode 15.3

$ script help(lldb)
...
     |  __eq__(self, rhs)
     |      __eq__(SBFileSpec self, SBFileSpec rhs) -> bool
     |  
     |  __init__(self, *args)
...

The solution would be to use either __str__ or module.file.GetDirectory()+"/"+module.file.GetFilename() that works on both old and new APIs (See https://github.com/MobileNativeFoundation/rules_xcodeproj/pull/2947)

Reproduction steps

Build a project with Xcode 15.3 Set a breakpoint

Expected behavior

No warning/failures in the LLDB console

rules_xcodeproj version

1.16.0

Xcode version

15.3

Bazel version

6.4.0

rules_apple version

No response

rules_swift version

No response

Additional information

No response