PINCache doesn't build in Xcode 12 Beta 4
mycroftcanner opened this issue · comments
It generates a lot of semantic issues:
Incompatible block pointer types sending 'PINMemoryCacheObjectBlock _Nullable __strong' (aka 'void (^__strong)(PINMemoryCache * _Nonnull __strong, NSString * _Nonnull __strong, id _Nullable __strong)') to parameter of type 'PINCacheObjectBlock _Nonnull' (aka 'void (^)(id _Nonnull __strong, NSString * _Nonnull __strong, id _Nullable __strong)')
This
It builds now after this commit but tests fail.
PINMemoryCache is also broken
@mycroftcanner Tests succeed for me locally, can you explain which tests fail and what you mean by PINMemoryCache is broken?
I had a bunch of compilation errors in tests as well. All looking like the one @mycroftcanner initially reported. I've fixed it in this PR.
@mycroftcanner I just merged @arangato 's PR (thank you!), does this address what you were hitting?
The same issues also available on Xcode Version 12.0 beta 5
@garrettmoon CocoaPods still look for old version and you specify the master branch then PINRemoteImage is out of sync and Texture won't build too.
The following will fail:
pod 'PINCache', :git => 'https://github.com/pinterest/PINCache', :branch => 'master'
pod 'PINRemoteImage', :git => 'https://github.com/pinterest/PINRemoteImage', :branch => 'master'
Texture (from
https://github.com/TextureGroup/Texture
, branchmaster
) was resolved to 3.0.0, which depends > on
Texture/PINRemoteImage (= 3.0.0) was resolved to 3.0.0, which depends on
PINRemoteImage/PINCache was resolved to 3.0.0, which depends on
PINCache (= 3.0.1-beta.8)
There was a simple workaround earlier but not I am super confused.
Has anyone been successful with getting it to build. I'm getting the same error message Incompatible block pointer types.
a temporary solution add the flags into bulid config CFLAGS
to disable check
-Xclang -fcompatibility-qualified-id-block-type-checking
This has been fixed in PINCache 3.0.1. We'll put out a new PINRemoteImage release which includes this soon.
When we install the pod PINRemoteImage - it installs with following pods
Installing PINCache (3.0.1-beta.8)
Installing PINOperation (1.1.2)
Installing PINRemoteImage (3.0.0)
To update as suggested - when we install PINCache it updates to latest version but installs an older version of PINRemoteImage and followings pods.
Installing FLAnimatedImage (1.0.12)
Installing PINCache 3.0.1 (was 3.0.1-beta.8)
Installing PINOperation 1.2 (was 1.1.2)
Installing PINRemoteImage 2.1.4 (was 3.0.0)
This gives 4 build errors - screenshots below
Hope this helps in recreating the issue.
I have fixed it doing these steps:
1- Find PINCache+PINRemoteImageCaching.m file in your project and replace it with this file:
https://github.com/pinterest/PINRemoteImage/blob/master/Source/Classes/PINCache/PINCache%2BPINRemoteImageCaching.m
2- Apply changes of this commit to your project files (or you can simply replace the files which had change during this commit):
10b3c3c
Done!
a temporary solution add the flags into bulid config
CFLAGS
to disable check-Xclang -fcompatibility-qualified-id-block-type-checking
where to add the flag, I have added in build settings flags still error shows.
I have fixed it doing these steps:
1- Find PINCache+PINRemoteImageCaching.m file in your project and replace it with this file:
https://github.com/pinterest/PINRemoteImage/blob/master/Source/Classes/PINCache/PINCache%2BPINRemoteImageCaching.m2- Apply changes of this commit to your project files (or you can simply replace the files which had change during this commit):
10b3c3cDone!
this one also not working for me
Still have this issue with the Xcode 12 final version.
Should I change my Xcode back to 11 or there is a solution to solve it?
It's not working on Xcode 12.0, as you all mentioned above.
You must use PINCache
version 3.0.3 or above.
I did try PINCache 3.0.3 but still get same errors - Any updates on this issue ?
upgrade the latest version 3.0.3.