Derived Data path settings per Xcode version

Originator:blesserx
Number:rdar://41246105 Date Originated:19-Jun-2018 07:14 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 10
Classification:Feature (New) Reproducible:Sometimes
 
Summary:
Xcode applications share the same preferences and build cache (in Derived Data folders). Most of time these files cannot be use across different Xcode versions. 

For example, when trying on New Build System between the legacy one, or Xcode 10 between Xcode 9, we often need to Clean Build Folder or the build will failed.

These issues can be solved by introduce path settings per Xcode version. Or I believe you can find a better solution so that developers don't need to Clean Build Folder after switching to a different Xcode.

Steps to Reproduce:
1. Open a project on Xcode 9.3.1 and build it with New Build System (Shared Workspace Settings)
2. Close Xcode 9.3.1
3. Open the same project on Xcode 10 beta 1 and build it with New Build System (Shared Workspace Settings)

Expected Results:
Build succeed.
Each Xcode has different Derived Data paths and won't mess around each others' cache data.

Actual Results:
Build failed with many kinds of error because it loads caches generated by other Xcode.
Clean Build Folder and try again will build successfully.

Version:
Xcode 10

Notes:
Xcode can change Derived Data paths settings in Preferences or Per-User Workspace Settings, which is great. But these settings are shared between different Xcode versions. 

This is a common issues so I don't provide a sample project.

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!