pinterest / PINCache

Fast, non-deadlocking parallel object cache for iOS, tvOS and OS X

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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)')

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, branch master) 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.

Issue still persists in Xcode 12 beta 5 with following pods
PINCache (3.0.1-beta.8)
PINOperation (1.1.2)
PINRemoteImage (3.0.0)

Screenshot 2020-08-28 at 23 49 25

Upgraded to Xcode 12 beta 6 and getting just this 1 issue. Hoping you could fix it soon.

Screenshot 2020-08-29 at 16 25 24

Upgraded to Xcode 12 beta 6 and getting just this 1 issue. Hoping you could fix it soon.

Screenshot 2020-08-29 at 16 25 24

Facing the same issue on Xcode 12 beta 6.

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
Screenshot 2020-09-08 at 20 50 41
Screenshot 2020-09-08 at 20 50 52
Screenshot 2020-09-08 at 20 51 00
Screenshot 2020-09-08 at 20 51 10

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.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!

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?

image
image

It's not working on Xcode 12.0, as you all mentioned above.

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 ?

commented

upgrade the latest version 3.0.3.