Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
NattyNarwhal opened this issue Jan 23, 2024 · 0 comments
Open

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

NattyNarwhal opened this issue Jan 23, 2024 · 0 comments
Labels
refactor Code cleanup

Comments

@NattyNarwhal
Copy link
Member

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.

@NattyNarwhal NattyNarwhal added the refactor Code cleanup label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Code cleanup
Projects
None yet
Development

No branches or pull requests

1 participant