SubmarinerApp / Submariner

A Subsonic client for macOS
https://submarinerapp.com
BSD 3-Clause "New" or "Revised" License
122 stars 3 forks source link

Upgrade Xcode tools version for next Core Data model revision #189

Open NattyNarwhal opened 5 months ago

NattyNarwhal commented 5 months ago

Going past Xcode 8.0 on a Core Data model's tools version will cause a build failure like:

DataModelCompile /Users/calvin/Library/Developer/Xcode/DerivedData/Submariner-byqsafueaaogzpaafmvsmhoravnb/Build/Products/Debug/Submariner.app/Contents/Resources/ /Users/calvin/src/Submariner/Submariner/Submariner.xcdatamodeld (in target 'Submariner' from project 'Submariner')
    cd /Users/calvin/src/Submariner
    /Applications/Xcode.app/Contents/Developer/usr/bin/momc --sdkroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk --macosx-deployment-target 12.0 --module Submariner /Users/calvin/src/Submariner/Submariner/Submariner.xcdatamodeld /Users/calvin/Library/Developer/Xcode/DerivedData/Submariner-byqsafueaaogzpaafmvsmhoravnb/Build/Products/Debug/Submariner.app/Contents/Resources/

Submariner v2.xcdatamodel: note: Model Submariner v2 version checksum: utUzgdGb9k7D1+ptLSHyZ96WkkOyef6E1lL1i1tUxpw=
cdtool: Failed to parse model XML with failure reason Entity Playlist already has an index with name byTracksIndex
cdtool hash unarchiving error: The data isn’t in the correct format.
/Users/calvin/src/Submariner/Submariner/Submariner.xcdatamodeld/Submariner v5.xcdatamodel:: error: cdtool cannot compile [0]

(Note that it blames Submariner v2 even if you've only bumped a newer version.)

Apparently, these are because the indices have non-unique names. You should be able to rename the indices (we don't reference them anywhere explicitly), i.e. by giving them a suffix based on their entity name. I tested this and it did seem to work, so remember to do this next time we bump the model for real.