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

:head has no effect on installation in 0.35 RC1 #2789

Closed
neonichu opened this issue Nov 5, 2014 · 9 comments · Fixed by #2793
Closed

:head has no effect on installation in 0.35 RC1 #2789

neonichu opened this issue Nov 5, 2014 · 9 comments · Fixed by #2793
Assignees
Labels
d2:moderate A moderately-difficult ticket that may require a bit of knowledge about the codebase s2:confirmed Issues that have been confirmed by a CocoaPods contributor t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!
Milestone

Comments

@neonichu
Copy link
Member

neonichu commented Nov 5, 2014

Using the Podfile

platform :ios, '8.0'

pod 'ContentfulDeliveryAPI', :head

RC1 will install the latest released version still:

$ pod install
[...]
Installing ContentfulDeliveryAPI (1.4.5)
[...]

while previous versions would install HEAD:

$ pod install
[...]
Installing ContentfulDeliveryAPI (HEAD based on 1.4.5)
[...]

The lock file created by RC1:

PODS:
  - AFNetworking (2.4.1):
    - AFNetworking/NSURLConnection (= 2.4.1)
    - AFNetworking/NSURLSession (= 2.4.1)
    - AFNetworking/Reachability (= 2.4.1)
    - AFNetworking/Security (= 2.4.1)
    - AFNetworking/Serialization (= 2.4.1)
    - AFNetworking/UIKit (= 2.4.1)
  - AFNetworking/NSURLConnection (2.4.1):
    - AFNetworking/Reachability
    - AFNetworking/Security
    - AFNetworking/Serialization
  - AFNetworking/NSURLSession (2.4.1):
    - AFNetworking/Reachability
    - AFNetworking/Security
    - AFNetworking/Serialization
  - AFNetworking/Reachability (2.4.1)
  - AFNetworking/Security (2.4.1)
  - AFNetworking/Serialization (2.4.1)
  - AFNetworking/UIKit (2.4.1):
    - AFNetworking/NSURLConnection
    - AFNetworking/NSURLSession
  - ContentfulDeliveryAPI (1.4.5):
    - AFNetworking
    - HRCoder
    - ISO8601DateFormatter
  - HRCoder (1.3.2)
  - ISO8601DateFormatter (0.7)

DEPENDENCIES:
  - ContentfulDeliveryAPI (HEAD)

SPEC CHECKSUMS:
  AFNetworking: 0aabc6fae66d6e5d039eeb21c315843c7aae51ab
  ContentfulDeliveryAPI: 5f49cd508ee4e746d7ca65d12ee5d5349be0d7bb
  HRCoder: 492f8e2e0b69b54842564d4bbeb1c0e151d4f95f
  ISO8601DateFormatter: 59731cd880cf87e71b4fa95f0d6b713dcbc4cbce

COCOAPODS: 0.35.0.rc1

and the obligatory 🌈

@neonichu neonichu added this to the 0.35.0 milestone Nov 5, 2014
@neonichu neonichu added the t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome! label Nov 5, 2014
@alloy
Copy link
Member

alloy commented Nov 5, 2014

@neonichu Did you verify (by checking the code) if it does in fact fetch the latest released version? Maybe it’s only the activated version info string that changed (and should probably be fixed).

@neonichu
Copy link
Member Author

neonichu commented Nov 5, 2014

Yes, it does indeed fetch the released code, that's how I even noticed the issue :)

@alloy
Copy link
Member

alloy commented Nov 5, 2014

@neonichu Ok. It should work as you expected it to.

@kylef
Copy link
Contributor

kylef commented Nov 5, 2014

I can confirm it does contain and download the HEAD code when installed from master. The lock file mentions HEAD too.

DEPENDENCIES:
  - AFNetworking (HEAD)

The installation message does infact show the version and not HEAD.

$ pod install --no-repo-update --no-integrate
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (2.4.1)
Generating Pods project

From --verbose:

-> Installing AFNetworking (2.4.1)
 > Git HEAD download
 > Git download
     $ /usr/local/bin/git clone https://github.com/AFNetworking/AFNetworking.git
     /Users/kylef/Projects/tmp/cp/Pods/AFNetworking --single-branch --depth 1
     Cloning into '/Users/kylef/Projects/tmp/cp/Pods/AFNetworking'...
   $ /usr/local/bin/git submodule update --init
  - Running pre install hooks

The Podfile:

platform :osx, '10.10'

pod 'AFNetworking', :head

I did however find a different bug when running pod install again with the lockfile generated from before:

NoMethodError - undefined method `requirement' for nil:NilClass
/Users/kylef/gems/gems/cocoapods-0.35.0.rc1/lib/cocoapods/resolver.rb:323:in `requirement_for_locked_pod_named'
/Users/kylef/gems/gems/cocoapods-0.35.0.rc1/lib/cocoapods/resolver.rb:107:in `search_for'
/Users/kylef/gems/gems/cocoapods-0.35.0.rc1/lib/cocoapods/resolver.rb:214:in `block in sort_dependencies'
/Users/kylef/gems/gems/cocoapods-0.35.0.rc1/lib/cocoapods/resolver.rb:208:in `each'
/Users/kylef/gems/gems/cocoapods-0.35.0.rc1/lib/cocoapods/resolver.rb:208:in `sort_by'
/Users/kylef/gems/gems/cocoapods-0.35.0.rc1/lib/cocoapods/resolver.rb:208:in `sort_dependencies'
/Users/kylef/gems/gems/molinillo-0.1.0/lib/molinillo/resolution.rb:116:in `block (2 levels) in <class:Resolution>'
/Users/kylef/gems/gems/molinillo-0.1.0/lib/molinillo/resolution.rb:311:in `push_state_for_requirements'
/Users/kylef/gems/gems/molinillo-0.1.0/lib/molinillo/resolution.rb:303:in `require_nested_dependencies_for'
/Users/kylef/gems/gems/molinillo-0.1.0/lib/molinillo/resolution.rb:291:in `activate_spec'
/Users/kylef/gems/gems/molinillo-0.1.0/lib/molinillo/resolution.rb:268:in `attempt_to_activate_new_spec'
/Users/kylef/gems/gems/molinillo-0.1.0/lib/molinillo/resolution.rb:235:in `attempt_to_activate'
/Users/kylef/gems/gems/molinillo-0.1.0/lib/molinillo/resolution.rb:132:in `process_topmost_state'
/Users/kylef/gems/gems/molinillo-0.1.0/lib/molinillo/resolution.rb:61:in `resolve'
/Users/kylef/gems/gems/molinillo-0.1.0/lib/molinillo/resolver.rb:40:in `resolve'
/Users/kylef/gems/gems/cocoapods-0.35.0.rc1/lib/cocoapods/resolver.rb:55:in `resolve'
/Users/kylef/gems/gems/cocoapods-0.35.0.rc1/lib/cocoapods/installer/analyzer.rb:328:in `block in resolve_dependencies'
/Users/kylef/gems/gems/cocoapods-0.35.0.rc1/lib/cocoapods/user_interface.rb:49:in `section'
/Users/kylef/gems/gems/cocoapods-0.35.0.rc1/lib/cocoapods/installer/analyzer.rb:326:in `resolve_dependencies'
/Users/kylef/gems/gems/cocoapods-0.35.0.rc1/lib/cocoapods/installer/analyzer.rb:57:in `analyze'
/Users/kylef/gems/gems/cocoapods-0.35.0.rc1/lib/cocoapods/installer.rb:184:in `analyze'
/Users/kylef/gems/gems/cocoapods-0.35.0.rc1/lib/cocoapods/installer.rb:106:in `block in resolve_dependencies'
/Users/kylef/gems/gems/cocoapods-0.35.0.rc1/lib/cocoapods/user_interface.rb:49:in `section'
/Users/kylef/gems/gems/cocoapods-0.35.0.rc1/lib/cocoapods/installer.rb:105:in `resolve_dependencies'
/Users/kylef/gems/gems/cocoapods-0.35.0.rc1/lib/cocoapods/installer.rb:90:in `install!'
/Users/kylef/gems/gems/cocoapods-0.35.0.rc1/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Users/kylef/gems/gems/cocoapods-0.35.0.rc1/lib/cocoapods/command/project.rb:101:in `run'
/Users/kylef/gems/gems/claide-0.7.0/lib/claide/command.rb:271:in `run'
/Users/kylef/gems/gems/cocoapods-0.35.0.rc1/lib/cocoapods/command.rb:45:in `run'
/Users/kylef/gems/gems/cocoapods-0.35.0.rc1/bin/pod:50:in `<top (required)>'
/Users/kylef/gems/bin/pod:23:in `load'
/Users/kylef/gems/bin/pod:23:in `<main>'

Note: as of the current time of writing this comment. I'm running CocoaPods, Core and Molinillo from master.

@kylef kylef added s2:confirmed Issues that have been confirmed by a CocoaPods contributor d2:moderate A moderately-difficult ticket that may require a bit of knowledge about the codebase labels Nov 5, 2014
@alloy
Copy link
Member

alloy commented Nov 5, 2014

I think the message and lockfile should tell the user that it is using HEAD and which podspec it is using, as was previously the case.

@neonichu
Copy link
Member Author

neonichu commented Nov 5, 2014

Using CP current master, the result is indeed correct (downloading code from HEAD), but the message is wrong, just as @kylef says.

@segiddins
Copy link
Member

@neonichu it would be awesome if you could add a spec, since I don't 100% understand what the actual issue is

@kylef
Copy link
Contributor

kylef commented Nov 5, 2014

@segiddins See my comment, it contains steps to reproduce, and running it again after rm -fr Pods it will then result in that exception.

The message for Installing AFNetworking (2.4.1) should mention HEAD like it does in 0.34.4.

segiddins added a commit that referenced this issue Nov 5, 2014
…ever actually installed (i.e. incompatible platform subspecs)

See #2789 (comment).
@segiddins
Copy link
Member

For clarity: the issue was not just the message -- it was a real change in how marking head versions propagated.

segiddins added a commit that referenced this issue Nov 5, 2014
…ever actually installed (i.e. incompatible platform subspecs)

See #2789 (comment).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
d2:moderate A moderately-difficult ticket that may require a bit of knowledge about the codebase s2:confirmed Issues that have been confirmed by a CocoaPods contributor t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants