pinterest / PINCache

Fast, non-deadlocking parallel object cache for iOS, tvOS and OS X
Apache License 2.0
2.66k stars 361 forks source link

Module 'PINOperation' not found ERROR in objc! #289

Closed internalG closed 3 years ago

internalG commented 4 years ago

The @import PINOperation; change bring this error to project. The SPM support breaks objc project.

Braindie commented 4 years ago

+1

iwheelbuy commented 4 years ago

I believe something is wrong with pod 'PINCache', '3.0.2'

def pod__PINRemoteImage
  pod 'PINRemoteImage', '3.0.1', :modular_headers => true
  pod 'PINCache', '3.0.1', :modular_headers => true
end

This way it works for me.

garrettmoon commented 4 years ago

What version of Xcode are you using? Can you upload a sample project demonstrating the issue?

iwheelbuy commented 4 years ago

@garrettmoon 12 GM or 12.0.1 - both don't work. PIN.zip

yang152412 commented 4 years ago

The @import PINOperation; change bring this error to project. The SPM support breaks objc project.

+1

luoshihui commented 4 years ago

The @import PINOperation; change bring this error to project. The SPM support breaks objc project.

+1

internalG commented 4 years ago

The podfile to reproduce the issue:

platform :ios, '8.0' inhibit_all_warnings! target 'pname' do pod 'AFNetworking/NSURLConnection', '~> 2.0' pod 'PINCache' end

post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 8.0 config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '8.0' end end end end

rainypixels commented 4 years ago

UPDATE: For anyone with the same question, I ran pod update --verbose and realized the 3.0.2 branch of PINCache was being fetched (while the fix is in master). Adding the following to the podfile fetches the right versions with imports fixed:

pod 'PINCache', :git => 'https://github.com/pinterest/PINCache.git', :branch => 'master'


@garrettmoon I saw that you fixed this issue and merged to master (🙏) but the update doesn't seem to reflect in Texture which specifies PINCache as a dependency. That’s still pulling the .m files with @import PINOperation;. Apologies if I'm missing something stupid. 😬

garrettmoon commented 4 years ago

UPDATE: For anyone with the same question, I ran pod update --verbose and realized the 3.0.2 branch of PINCache was being fetched (while the fix is in master). Adding the following to the podfile fetches the right versions with imports fixed:

pod 'PINCache', :git => 'https://github.com/pinterest/PINCache.git', :branch => 'master'

@garrettmoon I saw that you fixed this issue and merged to master (🙏) but the update doesn't seem to reflect in Texture which specifies PINCache as a dependency. That’s still pulling the .m files with @import PINOperation;. Apologies if I'm missing something stupid. 😬

You're not missing anything – it takes us time to cascade releases all the way down to Texture. I'm working on making this easier so we take less time!

internalG commented 3 years ago

Fixed with 3.0.3.