"`requires_arc` not specified" lint error even though it is specified #2005

Closed
rivera-ernesto opened this Issue Apr 3, 2014 · 9 comments

2 participants

@rivera-ernesto

With the 0.31.1-added lint check here now I get this error:

pod lib lint NBUKit.podspec 

 -> NBUKit (2.2.0)
    - WARN  | A value for `requires_arc` should be specified until the migration to a `true` default.

[!] NBUKit did not pass validation.
You can use the `--no-clean` option to inspect any issue.

Even thought the podspec has requires_arc set to true in the root spec, and set to false only in a subspec:

Pod::Spec.new do |s|

    s.name          = "NBUKit"
    s.version       = "2.2.0"
    s.summary       = "UIKit and NSFoundation convenience categories and subclasses."
    s.homepage      = "http://cyberagent.github.io/iOS-NBUKit/"
    s.license       = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' }
    s.author        = { "CyberAgent Inc." => "", "Ernesto Rivera" => "rivera_ernesto@cyberagent.co.jp" }
    s.source        = { :git => "https://github.com/CyberAgent/iOS-NBUKit.git", :tag => "#{s.version}" }

    s.platform      = :ios, '5.0'
    s.requires_arc  = true
    s.preserve_paths = "README.md", "NOTICE"

    s.dependency 'NBUCore', '>= 2.0.2'
    s.dependency 'Lockbox', '>= 1.4.6'

    s.subspec 'Base' do |sub|
        sub.source_files  = 'Source/*.{h,m}'
    end

    s.subspec 'Additions' do |sub|
        sub.source_files    = 'Source/Additions/*.{h,m}'
        sub.dependency      'NBUKit/Base'
    end

    s.subspec 'UI' do |sub|
        sub.source_files    = 'Source/UI/*.{h,m}'
        sub.resource_bundle = { 'NBUKit' => ['Resources/*.{png,lproj}', 'Source/UI/*.{xib}'] }
        sub.frameworks      = 'MessageUI'
        sub.dependency      'NBUKit/Additions'
        sub.dependency      'NBUKit/Library/NBUCompatibility'
        sub.dependency      'NBUKit/Library/RestKit Support'
        sub.dependency      'MotionOrientation@PTEz', '>= 1.0.0'
    end

    s.subspec 'Library' do |sl|

        sl.dependency 'NBUKit/Base'

        sl.subspec 'NBUCompatibility' do |sc|
            sc.source_files     = 'Library/NBUCompatibility/*.{h,m}'
            sc.dependency       'NBUKit/UI'
        end

        sl.subspec 'RestKit Support' do |srk|
            srk.requires_arc    = false
            srk.source_files    = 'Library/RestKit Support/*.{h,m}'
            srk.frameworks      = 'MobileCoreServices'
            srk.preserve_paths  = "README.*", "LICENSE"
        end

    end

end
@rivera-ernesto rivera-ernesto changed the title from `requires_arc` not specified lint error even though it is specified to "`requires_arc` not specified" lint error even though it is specified Apr 3, 2014
@rivera-ernesto rivera-ernesto added a commit to rivera-ernesto/CocoaPods-Specs that referenced this issue Apr 3, 2014
@rivera-ernesto rivera-ernesto NBUKit 2.2.0
May not lint due to CocoaPods/CocoaPods#2005
cd04ac3
@rivera-ernesto rivera-ernesto referenced this issue in CocoaPods/Specs Apr 3, 2014
Merged

NBUKit 2.2.0 #10068

@rivera-ernesto

That was quick 👍

@rivera-ernesto rivera-ernesto added a commit to rivera-ernesto/CocoaPods-Specs that referenced this issue Apr 7, 2014
@rivera-ernesto rivera-ernesto NBUImagePicker 1.3.0
Won't lint due to CocoaPods/CocoaPods#2005
527472b
@rivera-ernesto rivera-ernesto referenced this issue in CocoaPods/Specs Apr 7, 2014
Merged

NBUImagePicker 1.3.0 #10202

@rivera-ernesto

While waiting for this to be released to fix my Travis builds I tried to use gem install cocoapods --pre.

Yet the build still fails.

Is the --pre option supposed to use the master's head version?

@fabiopelosin
CocoaPods member

gem install cocoapods --pre = install CocoaPods taking into account pre release versions. To use CocoaPods head check https://github.com/CocoaPods/Rainforest.

@rivera-ernesto

I see. Thank you for the link!

I think setting up Rainforest on Travis will be too much for Travis tests, so probably I'll just wait for a CocoaPods release ;)


For now trying Rainforest locally I get this error:

CocoaPods/bin/pod --help
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler/setup (LoadError)
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from CocoaPods/bin/pod:23:in `<main>'

Looks like it would be related to #805, but I though Rainforest's pod was meant to be kept separated and run only from Rainfores/CocoaPods/bin/

@fabiopelosin
CocoaPods member

@rivera-ernesto The issue appears to be related to bundler not being installed. Does $ gem install bundler fix the issue?

@rivera-ernesto

Next I get:

CocoaPods/bin/pod --help
https://github.com/CocoaPods/Core.git (at master) is not yet checked out. Run `bundle install` first.

Getting closer. I guess https://github.com/CocoaPods/Rainforest#usage needs an update 😉

@fabiopelosin
CocoaPods member

Did you run rake bootstrap (pulling rainforest first because I just updated the name of the command)?

@fabiopelosin fabiopelosin added a commit to CocoaPods/Rainforest that referenced this issue Apr 15, 2014
@fabiopelosin fabiopelosin [Rake] Warn if bundler is not installed in boostrap task
CocoaPods/CocoaPods#2005\#issuecomment-40432358
3901e43
@rivera-ernesto

Thank you, the update and new instructions work and my podspecs validate again.

Bootstrapping takes however a crazy amount of time so probably for Travis I should better wait for a CocoaPods release.

By the way, could there be an automate way to generate CocoaPods' "nightly builds" gems that could be installed with the --pre option for people eagerly waiting for this kind of fixes? I so I could open a new issue.

@fabiopelosin
CocoaPods member

By the way, could there be an automate way to generate CocoaPods' "nightly builds" gems that could be installed with the --pre option for people eagerly waiting for this kind of fixes? I so I could open a new issue.

Interesting idea... yes please open a new issue so it can have more visibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment