cocoapods-playgrounds icon indicating copy to clipboard operation
cocoapods-playgrounds copied to clipboard

Limit local podspec feature to paths which are actually valid podspecs

Open nickvelloff opened this issue 8 years ago • 12 comments

 % pod playgrounds AsyncDisplayKit                                                                               ~/Documents MacBook-Pro
[!] /usr/local/bin/pod install --no-repo-update

Analyzing dependencies
Fetching podspec for `AsyncDisplayKit` from `/Users/nicholasvelloff/Documents`
[!] No podspec found for `AsyncDisplayKit` in `/Users/nicholasvelloff/Documents`

nickvelloff avatar Jul 03 '16 21:07 nickvelloff

% pod spec which AsyncDisplayKit                                                                                ~/Documents MacBook-Pro
/Users/nick/.cocoapods/repos/master/Specs/AsyncDisplayKit/1.9.80/AsyncDisplayKit.podspec.json

nickvelloff avatar Jul 03 '16 21:07 nickvelloff

Interesting, can you please share the output of pod env?

neonichu avatar Jul 04 '16 08:07 neonichu

% pod env                                              ~ Nicholass-MacBook-Pro

### Stack

   CocoaPods : 1.0.1
        Ruby : ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
    RubyGems : 2.6.4
        Host : Mac OS X 10.11.5 (15F34)
       Xcode : 7.3 (7D175)
         Git : git version 2.6.4 (Apple Git-63)
Ruby lib dir : /usr/local/Cellar/ruby/2.3.1/lib
Repositories : cythb - https://github.com/cythb/Specs.git @ b566b2949bc1335a7d24ec3d5dd007da11a11378
               master - https://github.com/CocoaPods/Specs.git @ 0d3f921f15f0ea56a92a526fcdfa3d6b660250f0
               the-grid - [email protected]:the-grid/public-podspecs.git @ cd59635be8bf81b58f7269d3766614005375f98e

### Installation Source

Executable Path: /usr/local/bin/pod

### Plugins
cocoapods-deintegrate : 1.0.0
cocoapods-playgrounds : 1.2.0
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.0.0
cocoapods-try         : 1.0.0

nickvelloff avatar Jul 04 '16 10:07 nickvelloff

OK one note... This is the second AsyncDisplayKit playground install. First worked as expected.

nickvelloff avatar Jul 04 '16 10:07 nickvelloff

Hm, that's weird — could you also share the Podfile that was generated for the Playground?

neonichu avatar Jul 04 '16 11:07 neonichu

use_frameworks!

target 'AsyncDisplayKitPlayground' do
pod 'AsyncDisplayKit', :path => '/Users/nicholasvelloff/Documents'
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['CONFIGURATION_BUILD_DIR'] = '$PODS_CONFIGURATION_B$
    end
  end
end

One more note: I have the AsyncDisplayKit project cloned in the same directory I'm executing this. I have a fork of AsyncDisplayKit I contribute with. Probably not related, but who knows...

nickvelloff avatar Jul 04 '16 11:07 nickvelloff

Ah, yes, this is actually related — pod playgrounds supports referencing local podspecs as well. So it found your local podspec and preferred that over the remote one.

neonichu avatar Jul 04 '16 11:07 neonichu

Hmmmmm.... /Users/nicholasvelloff/Documents doesn't have the spec.

nickvelloff avatar Jul 04 '16 11:07 nickvelloff

/Users/nicholasvelloff/Documents/AsyncDisplayKit/AsyncDisplayKit.podspec is the actual location

nickvelloff avatar Jul 04 '16 11:07 nickvelloff

I see, its a lookup anomaly. Got it. 👍

nickvelloff avatar Jul 04 '16 11:07 nickvelloff

Yah, it checks if the argument is a local path in the CWD, but not if it is actually a podspec — this should probably be improved :)

neonichu avatar Jul 04 '16 11:07 neonichu

Cool 👍 Thanks for this BTW... saves me a lot of time.

nickvelloff avatar Jul 04 '16 11:07 nickvelloff