Conversion to ARC fails with new build system

Originator:armadsen
Number:rdar://45063433 Date Originated:05-Oct-2018 11:29 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 10.0 (10A255)
Classification:Other Bug Reproducible:Always
 
Summary:
I’m trying to convert a relatively small, pure Objective-C framework project from MRC to ARC. In both Xcode 10.0 and Xcode 9.4, if the new build system is active, conversion to ARC fails. Additionally, Xcode 10 crashes after “completing” the conversion. Conversion to ARC works fine with the legacy build system.

Steps to Reproduce:
1. Open the attached project (also available here: https://github.com/armadsen/ORSButtonBar/tree/c3659d7f52dbae6e1b0b33169e8c19ba96257bf0)
2. Make sure the new build system is selected in Project Settings.
3. Select Edit->Convert->To Objective-C ARC…
4. Make sure the ORSButtonBar.framework target and all its source files are selected for conversion.
5. Follow the prompts to start the conversion
6. Click Check, then Next to start the conversion
7. See the “Review changes:” diff previewer appear.

Expected Results:
The diff preview shows that all source files have been converted to ARC by removing retain/release/autorelease calls.

Clicking save applies the changes.

Actual Results:
Only the first file in the project (ORSButtonBarView.m) is converted to ARC. The other source files are unchanged.

Additionally, clicking Save causes Xcode to crash. Note also that clicking Cancel then Discard Changes after the changes preview appears also triggers a similar crash to trying to save the changes.

Version:
Xcode 10.0 (10A255)

Notes:
This bug (minus the crash) also appears in the last release version of Xcode 9.4.x if the new build system is selected. In both Xcode 9 and 10, if the legacy build system is used, conversion to ARC works fine.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!