Skip to content

Commit

Permalink
Updated DTCoreText 1.6.3 podspec for CocoaPods 0.23
Browse files Browse the repository at this point in the history
  • Loading branch information
odrobnik committed Aug 8, 2013
1 parent 3cf3adc commit be05054
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions DTCoreText/1.6.3/DTCoreText.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ Pod::Spec.new do |spec|
spec.summary = 'Methods to allow using HTML code with CoreText.'
spec.author = { 'Oliver Drobnik' => 'oliver@cocoanetics.com' }
spec.prefix_header_contents = '#import <CoreText/CoreText.h>'

spec.pre_install do |pod_representation, library_representation|
Dir.chdir(pod_representation.root + 'Core/Source/') do
Dir.glob('*.css') do |css_file|
system '/usr/bin/xxd', '-i', css_file, css_file + '.c'
end
end
end
spec.prepare_command = '/usr/bin/xxd -i Core/Source/default.css Core/Source/default.css.c'
end

19 comments on commit be05054

@andrewroycarter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This broke installs again

Haven't had a chance to debug yet but I didn't bump or change version numbers- so this commit is breaking existing versions.

Report

  • What did you do?
  • What did you expect to happen?
  • What happened instead?

Stack

   CocoaPods : 0.20.2
        Ruby : ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin12.3.0]
    RubyGems : 1.8.23
        Host : Mac OS X 10.9 (13A538g)
       Xcode : 4.6.3 (4H1503)
Ruby lib dir : /opt/rubies/ruby-1.9.3-p327/lib
Repositories : CocoaPods-InternalSpecs - git@github.com:willowtreeapps/CocoaPods-InternalSpecs.git @ 429c7705c657de52c5035f697b6378385f5ef25b
               master - https://github.com/CocoaPods/Specs.git @ 19c61d877820fc7d327b475c8decd2668fd1b073

Podfile

platform :ios, '5.0'

pod 'PSTCollectionView', '1.0.0'
pod 'glm', '0.9.4.3' 
pod 'OpenCV', '2.4.3.2'
pod 'MTShareViewController', '0.1.2'
pod 'TestFlightSDK', '1.2.4'
pod 'AFNetworking', '1.2.1'
pod 'CPAnimationSequence', '0.0.3'
pod 'CrittercismSDK', '3.5.1'
pod 'MTStackViewController', '1.0.2'
pod 'CocoaLumberjack', '1.6.2'
pod 'EGOTableViewPullRefresh', '0.1.0'
pod 'Mantle', '0.2.2'
pod 'TTTAttributedLabel', '1.6.3'
pod 'DTCoreText', '1.6.1'
pod 'PDKeychainBindingsController', '0.0.1'
pod 'UIView+Helpers', '1.2.0' 
pod 'JLRoutes', '1.2'
pod 'SVProgressHUD', '0.9'
pod 'SVWebViewController', '0.1'

post_install do |installer|

  require 'fileutils'

  FileUtils.copy('Pods/Pods-Acknowledgements.plist', 'ValpakClient/Settings.bundle/Acknowledgements.plist')

  installer.project.targets.each do |target|
    target.build_configurations.each do |config|

      # in gem Xcodeproj 4.x the method of getting the config name changed.
      # this accounts for both cases.
      name = nil
      if config.respond_to?("name")
        name = config.name
      else
        name = config.attributes['name']
      end

      if config.name == 'Debug'
        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = 'DEBUG=1 _AFNETWORKING_ALLOW_INVALID_SSL_CERTIFICATES_'
      end
      if config.name == 'Release'
        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '_AFNETWORKING_ALLOW_INVALID_SSL_CERTIFICATES_'
      end
    end
  end
end

Error

Pod::DSLError - Invalid `DTCoreText.podspec` file: undefined method `prepare_command=' for #<Pod::Specification name="DTCoreText">
 #
 #  from /Users/andrewcarter/.cocoapods/master/DTCoreText/1.6.3/DTCoreText.podspec:17
 #  -------------------------------------------
 #    spec.prefix_header_contents = '#import <CoreText/CoreText.h>'
 >    spec.prepare_command = '/usr/bin/xxd -i Core/Source/default.css Core/Source/default.css.c'
 #  end
 #  -------------------------------------------
 #
/Users/andrewcarter/.cocoapods/master/DTCoreText/1.6.3/DTCoreText.podspec:17:in `block in _eval_podspec'
/Users/andrewcarter/.gem/ruby/1.9.3/gems/cocoapods-core-0.20.2/lib/cocoapods-core/specification.rb:40:in `initialize'
/Users/andrewcarter/.cocoapods/master/DTCoreText/1.6.3/DTCoreText.podspec:1:in `new'
/Users/andrewcarter/.cocoapods/master/DTCoreText/1.6.3/DTCoreText.podspec:1:in `_eval_podspec'
/Users/andrewcarter/.gem/ruby/1.9.3/gems/cocoapods-core-0.20.2/lib/cocoapods-core/specification.rb:608:in `eval'
/Users/andrewcarter/.gem/ruby/1.9.3/gems/cocoapods-core-0.20.2/lib/cocoapods-core/specification.rb:608:in `_eval_podspec'
/Users/andrewcarter/.gem/ruby/1.9.3/gems/cocoapods-core-0.20.2/lib/cocoapods-core/specification.rb:558:in `from_string'
/Users/andrewcarter/.gem/ruby/1.9.3/gems/cocoapods-core-0.20.2/lib/cocoapods-core/specification.rb:541:in `from_file'
/Users/andrewcarter/.gem/ruby/1.9.3/gems/cocoapods-core-0.20.2/lib/cocoapods-core/specification/set.rb:88:in `specification'
/Users/andrewcarter/.gem/ruby/1.9.3/gems/cocoapods-core-0.20.2/lib/cocoapods-core/source.rb:156:in `block in search'
/Users/andrewcarter/.gem/ruby/1.9.3/gems/cocoapods-core-0.20.2/lib/cocoapods-core/source.rb:151:in `each'
/Users/andrewcarter/.gem/ruby/1.9.3/gems/cocoapods-core-0.20.2/lib/cocoapods-core/source.rb:151:in `find'
/Users/andrewcarter/.gem/ruby/1.9.3/gems/cocoapods-core-0.20.2/lib/cocoapods-core/source.rb:151:in `search'
/Users/andrewcarter/.gem/ruby/1.9.3/gems/cocoapods-core-0.20.2/lib/cocoapods-core/source/aggregate.rb:104:in `block in search'
/Users/andrewcarter/.gem/ruby/1.9.3/gems/cocoapods-core-0.20.2/lib/cocoapods-core/source/aggregate.rb:104:in `select'
/Users/andrewcarter/.gem/ruby/1.9.3/gems/cocoapods-core-0.20.2/lib/cocoapods-core/source/aggregate.rb:104:in `search'
/Users/andrewcarter/.gem/ruby/1.9.3/gems/cocoapods-0.20.2/lib/cocoapods/sources_manager.rb:41:in `search'
/Users/andrewcarter/.gem/ruby/1.9.3/gems/cocoapods-0.20.2/lib/cocoapods/command/outdated.rb:33:in `block in run'
/Users/andrewcarter/.gem/ruby/1.9.3/gems/cocoapods-0.20.2/lib/cocoapods/command/outdated.rb:32:in `each'
/Users/andrewcarter/.gem/ruby/1.9.3/gems/cocoapods-0.20.2/lib/cocoapods/command/outdated.rb:32:in `run'
/Users/andrewcarter/.gem/ruby/1.9.3/gems/claide-0.3.2/lib/claide/command.rb:206:in `run'
/Users/andrewcarter/.gem/ruby/1.9.3/gems/cocoapods-0.20.2/lib/cocoapods/command.rb:49:in `run'
/Users/andrewcarter/.gem/ruby/1.9.3/gems/cocoapods-0.20.2/bin/pod:19:in `<top (required)>'
/Users/andrewcarter/.gem/ruby/1.9.3/bin/pod:23:in `load'
/Users/andrewcarter/.gem/ruby/1.9.3/bin/pod:23:in `<main>'

@andrewroycarter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also seeing

/  ᐅ pod search DTCoreText


-> DTCoreText (1.6.3)

[!] Skipping `DTCoreText` because the podspec contains errors.
/  ᐅ 

@odrobnik
Copy link
Contributor Author

@odrobnik odrobnik commented on be05054 Aug 8, 2013 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrewroycarter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If pod spec X works with cocoa pods Y, it should remain that way forever. Breaking changes shouldn’t be made.

Given that this has happened with your pod in my project 3 or 4 times, I’m just going to copy the source into my project, because I can’t trust you to properly maintain your pod specs.

@odrobnik
Copy link
Contributor Author

@odrobnik odrobnik commented on be05054 Aug 8, 2013 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrewroycarter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just can't seem to wrap my ahead around how a static pod spec, static git tag, and static version of cocoa pods, would all of the sudden not work because a newer pod spec requires a newer version of cocoa pods. Anyhow, it will be a non issue now that've I've moved away from using your pod, and soon from using your project all together.

@keith
Copy link
Member

@keith keith commented on be05054 Aug 8, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrewroycarter I think your expectation is misaligned here. As CocoaPods has not hit 1.0 yet the core team is still changing tons of behavior in it which requires specs to change and use the new ways of doing things. The only consistency we attempt to guarantee is that with for the same library with the newest version of CocoaPods whenever you run pod install you will get the same end result. This means that you occasionally have to update your RubyGems ([sudo] gem update). You should think of CocoaPods as still a beta tool which means that you always want to be up to date.

@andrewroycarter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the key thing here is that future versions of a library on an external repo shouldn't break existing versions. This is the entire point of using systems like this.

@odrobnik
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The key thing here is that DTCoreText 1.6.3 always required CocoaPods 0.23 and never supported anything earlier. The first version that you accidentially grabbed before I could fix the Travis error worked with your way outdated 0.20 version.

Frankly your actions and statements are a bit childish.

@andrewroycarter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once we get to name calling I'm out of the conversation- sorry

@odrobnik
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nobody is calling names, Andrew. You are not being friendly, are aggressive and state that you cannot trust me. Furthermore you propose to hurt my feelings by removing my code from your project.

You made a mistake but instead of fixing it and being mindful of the facts of Open Source software under heavy development you show your entitlement mentality.

I don't know what I did that causes you to go to war over such a benign matter. Tell me, so I can learn to avoid it in the future.

@andrewroycarter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I'm so riled up is because I was aiming to deliver a build to a client at 1:00 today, and it's 5:00 now and I'm just solving the issue. Sorry if I seem abrasive, I'm sure you've been there. Maybe the root problem here is me using cocoa pods on a production application- because if the project is still at the point where having to make large changes to your project and development environment at any point due to an update is totally acceptable, I really shouldn't be using it for what I am (as much as I love cocoa pods).

Also, in the future, if you want to try and start an internet argument on a social network with me (https://twitter.com/Cocoanetics/status/365555974909599744) my twitter username is @andrewroycarter. Talk about being childish :)

I have figured out a way to migrate from a version of cocoa pods around 0.20-ish to the latest which works with this pod, so if anyone viewing this thread got stuck in the same boat as me, let me know and I'll see if I can help you solve the problem too.

Again, sorry for being so aggressive, let's put this in the past (and of course I'm still using your project because it's to helpful to drop!)

@andrewroycarter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also must admit I still don't understand how this situation works out with cocoapods! If I'm using version 0.20.2 of cocoapods, and version 1.6.1 of DTCoreText, why the addition of 1.6.3 to the specs repo cause my setup to break? Is it because my version of cocoapods can't parse the latest version of the DTCoreText spec, and even though I'm not using it cocoapods still needed to reference it somehow? I'm on the latest of everything now so all is well, but I am curious!

@keith
Copy link
Member

@keith keith commented on be05054 Aug 8, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you using the fuzzy matcher in your Podfile. Like pod 'foo', '~> 1.0'

@andrewroycarter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My complete Podfile is in the first comment, but the relevant bit is
pod 'DTCoreText', '1.6.1'
I might make a sample project and see if I can figure out what happened? I understand how moving to new versions of cocoa pods or to a new version of a pod could cause this issue, but can't figure out how this scenario panned out!

@andrewroycarter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok check this out

https://github.com/andrewroycarter/CocoapodsTest

if you run bundle install; bundle exec pod install you'll see that it fails. But- this setup (cocoapods 0.20.2 DTCoreText 1.6.1) was working prior to the addition of 1.6.3

EDIT:
Maybe it has something to do with 1.6.1 spec dependancies? Maybe one of the DTFoundation/* podspecs changed?

@keith
Copy link
Member

@keith keith commented on be05054 Aug 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. I see what's happening here. This may have been fixed since the release of your old version. Bug filed CocoaPods/CocoaPods#1272

@andrewroycarter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you caught it! Thanks for the insight.
Sorry again @Cocoanetics for causing a ruckus, seems like we've found the issue!

@keith
Copy link
Member

@keith keith commented on be05054 Aug 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrewroycarter you'll still have to update CocoaPods to get the fix 😜

Please sign in to comment.