Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NameError on pod install #31

Closed
miklselsoe opened this issue Jun 6, 2016 · 2 comments · Fixed by #33
Closed

NameError on pod install #31

miklselsoe opened this issue Jun 6, 2016 · 2 comments · Fixed by #33

Comments

@miklselsoe
Copy link

I'm trying to migrate from the post install script to the cocoapods-acknowledgements plugin. When I run pod install I get this error:

NameError - uninitialized constant Class::UI
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/sources_manager.rb:170:in `const_missing'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-acknowledgements-1.1.1/lib/cocoapods_acknowledgements/plist_generator.rb:69:in `license_text'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-acknowledgements-1.1.1/lib/cocoapods_acknowledgements/plist_generator.rb:21:in `block in generate'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-acknowledgements-1.1.1/lib/cocoapods_acknowledgements/plist_generator.rb:17:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-acknowledgements-1.1.1/lib/cocoapods_acknowledgements/plist_generator.rb:17:in `generate'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-acknowledgements-1.1.1/lib/cocoapods_acknowledgements.rb:66:in `block (4 levels) in <module:CocoaPodsAcknowledgements>'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-acknowledgements-1.1.1/lib/cocoapods_acknowledgements.rb:63:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-acknowledgements-1.1.1/lib/cocoapods_acknowledgements.rb:63:in `block (3 levels) in <module:CocoaPodsAcknowledgements>'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-acknowledgements-1.1.1/lib/cocoapods_acknowledgements.rb:60:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-acknowledgements-1.1.1/lib/cocoapods_acknowledgements.rb:60:in `block (2 levels) in <module:CocoaPodsAcknowledgements>'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/user_interface.rb:63:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-acknowledgements-1.1.1/lib/cocoapods_acknowledgements.rb:52:in `block in <module:CocoaPodsAcknowledgements>'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/hooks_manager.rb:109:in `call'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/hooks_manager.rb:109:in `block (3 levels) in run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/user_interface.rb:141:in `message'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/hooks_manager.rb:103:in `block (2 levels) in run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/hooks_manager.rb:101:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/hooks_manager.rb:101:in `block in run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/user_interface.rb:141:in `message'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/hooks_manager.rb:100:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:473:in `run_plugins_post_install_hooks'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:454:in `perform_post_install_actions'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:121:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/install.rb:37:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command.rb:50:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

My podfile looks like this:

source '[email protected]:CocoaPods/Specs.git'

plugin 'cocoapods-acknowledgements', :settings_bundle => true

platform :ios,'9.0'
use_frameworks!
inhibit_all_warnings!

def shared_pods
    pod 'Kingfisher', '~> 2.4.1'
    pod 'SwiftyJSON', '~> 2.3'
    pod 'Locksmith', '~> 2.0.8'
    pod 'DTMarkdownParser', '~> 0.2.2'
    pod 'Changeset', '~> 1.0.5'
    pod 'ReachabilitySwift', '~> 2.3.3'
    pod 'IHKeyboardAvoiding', '~> 2.5'

    pod 'Crashlytics', '~> 3.7.0', :configurations => ['Debug', 'Testing']
end

target 'Target1' do
    shared_pods
end

target 'Target2' do
    shared_pods
end

It seems it may have something to do with reading one of the license files? Or?

@marcelofabri
Copy link
Collaborator

Sorry for taking so long to look at this. It really seems that the plugin isn't able to read one of the licenses and it'd warn about it (https://github.com/CocoaPods/cocoapods-acknowledgements/blob/master/lib/cocoapods_acknowledgements/plist_generator.rb#L69), but it couldn't find the class responsible for logging.

So, we have at least one bug: the plugin is crashing when trying to warn in license_text.

We may have another bug if the license really exists. Can you try to make a small reproducible Podfile with the "culprit" dependency so we can check it it's really a bug?

Thanks for filling this.

@miklselsoe
Copy link
Author

I too apologize on the long response time. The upside is that I found out what caused the issue.

The pod Changeset in version 1.0.5 refers to a license file that doesn't exist. If this pod is included in the Podfile, cocoapods-acknowledgements fails. Here's a sample project:
https://www.dropbox.com/s/kllubwefk8805ar/cocoapods_issue.zip?dl=1

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

Successfully merging a pull request may close this issue.

2 participants