Skip to content

Conversation

DavidPetran
Copy link

@DavidPetran DavidPetran commented Oct 9, 2025

Fixes an issue for dSYMs built with XCode26.

We have some old logic that takes the first compile unit to get the compilation directory and makes filenames relative to that if applicable. The newer version of xcode is building dSYMs where the first CU has a compilation directory of '/'

We can't just switch to use relative paths as it would break existing groupings (where compilation directory is different from the project compilation directory e.g. libraries)

This change intends to target XC26 dSYMs by identifying the compilation directory of '/' in the first CU and in that case return a relative path for the filename of returned symbol. This is a change in behaviour, but it seems more correct for all paths to be relative to the CU. There may be some regrouping in included libraries but will fix the already broken file groupings.

See https://github.com/bugsnag/bugsnag-dsym/pull/38 for test

Note: I manually tested an apple library file path and it was unchanged behaviour.

@DavidPetran DavidPetran requested a review from bullmo October 10, 2025 09:00
@DavidPetran DavidPetran marked this pull request as ready for review October 10, 2025 09:00
bullmo
bullmo previously approved these changes Oct 10, 2025
Copy link

@bullmo bullmo left a comment

Choose a reason for hiding this comment

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

One minor comment but otherwise looks good


StringRef compDir = StringRef(unitForOffset->getCompilationDir());

// XCode26 dSYMs compiled with global first units, detected by "/" compilation directory of the first compile unit
Copy link

Choose a reason for hiding this comment

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

It's probably worth updating this comment to get a bit more generic (otherwise when looking at this in the future it might seem as though it was just an issue with v26 of XCode)

@DavidPetran DavidPetran merged commit 8275427 into main Oct 10, 2025
@DavidPetran DavidPetran deleted the djp/pipe-8933_xcode26_fix branch October 10, 2025 11:03
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.

2 participants