Closed vguerci closed 1 year ago
Resolves https://github.com/tuist/xcodeproj/issues/YYY
PBXObject isEqual, always returning true, doesn't respect Swift Hashable's requirements. That leads to weird/flaky issues like https://github.com/yonaskolb/XcodeGen/issues/1131
isEqual
true
Make sure == is consistent with hash, i.e. same hashValue implying isEqual being true
==
hash
hashValue
hash()
Ah damn, that doesn't pass tests, this needs more work ;p Closing, will reopen when solved.
Resolves https://github.com/tuist/xcodeproj/issues/YYY
Short description 📝
PBXObject
isEqual
, always returningtrue
, doesn't respect Swift Hashable's requirements. That leads to weird/flaky issues like https://github.com/yonaskolb/XcodeGen/issues/1131Solution 📦
Make sure
==
is consistent withhash
, i.e. samehashValue
implyingisEqual
beingtrue
Implementation 👩💻👨💻
isEqual
methods are implemented for consistency across the projecthash()
method, i.e. reference is what needs to be equal