Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

:head not pulling the latest version. Incorrectly uses version specified in podspec. #1039

Closed
zakdances opened this Issue · 9 comments

4 participants

@zakdances

When I try to add a line such as

pod 'ReactiveCocoa', :head

to my podfile, to pulls ReactiveCocoa 1.5.0. which is not the latest version nor the latest commit. Here's what's printed out by CocoaPods:

Installing ReactiveCocoa (HEAD based on 1.5.0)
Installing ReactiveCocoa (1.5.0) 

Is there a bug causing :head to fail? Why does it print out two installing messages?

@fabiopelosin

Can you post the full Podfile?

@fabiopelosin

Also the output of pod install --verbose would be helpful.

@alloy
Owner

This seems similar to #1046. Can you also post the contents of your Podfile.lock file?

@grosshei

I'm having a similar issue. The default tag seems to be installed instead of HEAD and the install shows two lines.

Podfile

platform :ios, 5.0

pod 'FMDB/standalone', :head

Podfile.lock

PODS:
  - FMDB/common (2.0)
  - FMDB/standalone (HEAD based on 2.0):
    - FMDB/common
    - sqlite3
  - sqlite3 (3.7.16.2)

DEPENDENCIES:
  - FMDB/standalone (HEAD)

SPEC CHECKSUMS:
  FMDB: 30a7cbcdbd354f5ee1ba081a8773fd9130c43b48
  sqlite3: be63767eb5b8d5920eb009803c8af5c13d248100

COCOAPODS: 0.19.1

$ pod install --verbose

Analyzing dependencies

Updating spec repositories
Updating spec repo `master`
  $ /opt/local/bin/git pull
  Already up-to-date.

Resolving dependencies of `Podfile`
Resolving dependencies for target `Pods' (iOS 5.0)
  - FMDB/standalone (HEAD)
    - FMDB/common
    - sqlite3

Comparing resolved specification to the sandbox manifest
  A FMDB
  A sqlite3

Downloading dependencies

-> Installing FMDB (2.0)
 > GitHub download
   $ /opt/local/bin/git config core.bare
   true
   $ /opt/local/bin/git config core.bare
   true
 > Updating cache git repo (/Users/grosshei/Library/Caches/CocoaPods/GitHub/d92b1cbf09a2c9dfcf7b19167b8f9c87d5e7b65f)
     $ /opt/local/bin/git remote update
     Fetching origin
   $ /opt/local/bin/git init
   Initialized empty Git repository in /Users/grosshei/projects/cocoapodtest/Pods/FMDB/.git/
   $ /opt/local/bin/git remote add origin
   '/Users/grosshei/Library/Caches/CocoaPods/GitHub/d92b1cbf09a2c9dfcf7b19167b8f
   9c87d5e7b65f'
   $ /opt/local/bin/git fetch origin tags/v2.0 2>&1
   From /Users/grosshei/Library/Caches/CocoaPods/GitHub/d92b1cbf09a2c9dfcf7b19167b8f9c87d5e7b65f
    * tag               v2.0       -> FETCH_HEAD
   $ /opt/local/bin/git reset --hard FETCH_HEAD
   HEAD is now at b2047f9 Merge branch 'threadtests'
   $ /opt/local/bin/git checkout -b activated-pod-commit 2>&1
   Switched to a new branch 'activated-pod-commit'
 > Installing documentation

-> Installing FMDB (HEAD based on 2.0)
 > GitHub download
   $ /opt/local/bin/git config core.bare
   true
   $ /opt/local/bin/git config core.bare
   true
 > Updating cache git repo (/Users/grosshei/Library/Caches/CocoaPods/GitHub/d92b1cbf09a2c9dfcf7b19167b8f9c87d5e7b65f)
     $ /opt/local/bin/git remote update
     Fetching origin
   $ /opt/local/bin/git init
   Initialized empty Git repository in /Users/grosshei/projects/cocoapodtest/Pods/FMDB/.git/
   $ /opt/local/bin/git remote add origin
   '/Users/grosshei/Library/Caches/CocoaPods/GitHub/d92b1cbf09a2c9dfcf7b19167b8f
   9c87d5e7b65f'
   $ /opt/local/bin/git fetch origin tags/v2.0 2>&1
   From /Users/grosshei/Library/Caches/CocoaPods/GitHub/d92b1cbf09a2c9dfcf7b19167b8f9c87d5e7b65f
    * tag               v2.0       -> FETCH_HEAD
   $ /opt/local/bin/git reset --hard FETCH_HEAD
   HEAD is now at b2047f9 Merge branch 'threadtests'
   $ /opt/local/bin/git checkout -b activated-pod-commit 2>&1
   Switched to a new branch 'activated-pod-commit'
 > Installing documentation

-> Installing sqlite3 (3.7.16.2)
 > Http download
   $ /opt/local/bin/curl -L -o
   '/Users/grosshei/projects/cocoapodtest/Pods/sqlite3/file.zip'
   'http://www.sqlite.org/2013/sqlite-amalgamation-3071602.zip'
     % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                    Dload  Upload   Total   Spent    Left  Speed
100 1371k  100 1371k    0     0  2106k      0 --:--:-- --:--:-- --:--:-- 2110k
   $ /usr/bin/unzip
   '/Users/grosshei/projects/cocoapodtest/Pods/sqlite3/file.zip' -d
   '/Users/grosshei/projects/cocoapodtest/Pods/sqlite3'
   Archive:  /Users/grosshei/projects/cocoapodtest/Pods/sqlite3/file.zip
      creating: /Users/grosshei/projects/cocoapodtest/Pods/sqlite3/sqlite-amalgamation-3071602/
     inflating: /Users/grosshei/projects/cocoapodtest/Pods/sqlite3/sqlite-amalgamation-3071602/shell.c  
     inflating: /Users/grosshei/projects/cocoapodtest/Pods/sqlite3/sqlite-amalgamation-3071602/sqlite3.c  
     inflating: /Users/grosshei/projects/cocoapodtest/Pods/sqlite3/sqlite-amalgamation-3071602/sqlite3ext.h  
     inflating: /Users/grosshei/projects/cocoapodtest/Pods/sqlite3/sqlite-amalgamation-3071602/sqlite3.h  
 > Installing documentation
  - Running pre install hooks

Generating Pods project
  - Creating Pods project
  - Adding source files to Pods project
  - Adding resources to Pods project
  - Linking headers
  - Installing targets
    - Installing target `Pods` iOS 5.0
      - Adding Build files
      - Generating xcconfig file at `Pods/Pods.xcconfig`
      - Generating target environment header at `Pods/Pods-environment.h`
      - Generating prefix header at `Pods/Pods-prefix.pch`
      - Generating copy resources script at `Pods/Pods-resources.sh`
      - Generating acknowledgements at `Pods/Pods-acknowledgements.plist`
      - Generating acknowledgements at `Pods/Pods-acknowledgements.markdown`
      - Generating dummy source file at `Pods/Pods-dummy.m`
  - Running post install hooks
  - Writing Xcode project file to `Pods/Pods.xcodeproj`
  - Writing Lockfile in `Podfile.lock`
  - Writing Manifest in `Pods/Manifest.lock`

Integrating client project

[!] [!] Skipping documentation generation because appledoc can't be found.

[!] [!] Skipping documentation generation because appledoc can't be found.

[!] [!] Skipping documentation generation because appledoc can't be found.
@zakdances

I don't understand the commit here. Are we supposed add more source lines to the podspecs to point the head commit URL? I've just got CocoaPods 0.20.1 and I'm experiencing the same problem. The head: argument for ReactiveCocoaLayout installs 0.3.1 even though both the main repo and the podspec is at 0.3.2...

@fabiopelosin

@zakdances Currently the order of definition of the dependencies in the Podfile affects the outcome. Is the issue still present if you move the head dependency to the top?

@zakdances

@irrationalfab I can move the dependency to the top, but then :head arguments on other pods then pull the wrong version. Like you said, order does matter.

That's a problem because when you have multiple pods that all have dependencies on each other, moving one pod to fix something can cause another problem to pop up somewhere else.

I hope order agnosticism is somewhere on the roadmap for CocoaPods!

@alloy
Owner

I hope order agnosticism is somewhere on the roadmap for CocoaPods!

@zakdances It is, see: https://github.com/CocoaPods/CocoaPods/wiki/Common-Misconceptions#4-cocoapods-doesnt-do-dependency-resolution.

@fabiopelosin

That's a problem because when you have multiple pods that all have dependencies on each other

There should be a clear hierarchy. A dependency of a Pod should never depend on the dependent pod.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.