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

MethodError(Base.LibGit2.GitAnnotated warning in Pkg.update #16028

Closed
lobingera opened this issue Apr 24, 2016 · 6 comments
Closed

MethodError(Base.LibGit2.GitAnnotated warning in Pkg.update #16028

lobingera opened this issue Apr 24, 2016 · 6 comments

Comments

@lobingera
Copy link

I just updated my julia v0.5 and ran Pkg.status() and update:

               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.0-dev+3729 (2016-04-24 04:17 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 733e744* (0 days old master)
|__/                   |  x86_64-linux-gnu

julia> Pkg.status()
5 required packages:
 - Cairo                         0.2.31
 - Compose                       0.4.2+             wip-v05-197
 - Fontconfig                    0.0.2
 - Gadfly                        0.4.2+             master
 - Gtk                           0.9.3
38 additional packages:
 - ArrayViews                    0.6.4
 - BinDeps                       0.3.21
 - Calculus                      0.1.14
 - Codecs                        0.1.5
 - ColorTypes                    0.2.1
 - Colors                        0.6.3
 - Compat                        0.7.13
 - Contour                       0.1.0
 - Cxx                           0.0.0-             master (unregistered)
 - DataArrays                    0.2.20
 - DataFrames                    0.7.0
 - DataStructures                0.4.3
 - Distances                     0.3.0
 - Distributions                 0.8.10
 - Docile                        0.5.23
 - DualNumbers                   0.2.2
 - FixedPointNumbers             0.1.2
 - FixedSizeArrays               0.0.10
 - GZip                          0.2.18
 - Graphics                      0.1.3
 - Grid                          0.4.0
 - Hexagons                      0.0.4
 - Iterators                     0.1.9
 - JSON                          0.5.0
 - KernelDensity                 0.1.2
 - Loess                         0.0.6
 - Measures                      0.0.2
 - NaNMath                       0.2.1
 - Optim                         0.4.4
 - PDMats                        0.4.1
 - Reexport                      0.0.3
 - SHA                           0.1.2
 - Showoff                       0.0.6+             v05-pr11
 - SortingAlgorithms             0.0.6
 - StatsBase                     0.8.0
 - StatsFuns                     0.2.0
 - URIParser                     0.1.3
 - WoodburyMatrices              0.1.5

julia> Pkg.update()
INFO: Updating METADATA...
INFO: Updating cache of FixedPointNumbers...
INFO: Updating cache of Compat...
MethodError(Base.LibGit2.GitAnnotated,(Base.LibGit2.GitRepo(Ptr{Void} @0x0000000001f31c90),nothing))
MethodError(Base.LibGit2.GitAnnotated,(Base.LibGit2.GitRepo(Ptr{Void} @0x0000000002e62ee0),nothing))
INFO: Updating Gadfly master...
INFO: Updating Cxx master... 3f6f184c → 423d56f1
INFO: Computing changes...
INFO: Upgrading ColorTypes: v0.2.1 => v0.2.2
INFO: Upgrading Compat: v0.7.13 => v0.7.14
INFO: Upgrading FixedPointNumbers: v0.1.2 => v0.1.3
INFO: Upgrading FixedSizeArrays: v0.0.10 => v0.1.0

the method error is continuosly reported:

julia> Pkg.update()
INFO: Updating METADATA...
MethodError(Base.LibGit2.GitAnnotated,(Base.LibGit2.GitRepo(Ptr{Void} @0x000000000557fc00),nothing))
MethodError(Base.LibGit2.GitAnnotated,(Base.LibGit2.GitRepo(Ptr{Void} @0x0000000001adeb40),nothing))
INFO: Updating Gadfly master...
INFO: Updating Cxx master...
INFO: Computing changes...
INFO: No packages to install, update or remove

julia> Pkg.update()
INFO: Updating METADATA...
MethodError(Base.LibGit2.GitAnnotated,(Base.LibGit2.GitRepo(Ptr{Void} @0x0000000005b0ba80),nothing))
MethodError(Base.LibGit2.GitAnnotated,(Base.LibGit2.GitRepo(Ptr{Void} @0x00000000059aa0e0),nothing))
INFO: Updating Gadfly master...
INFO: Updating Cxx master...
INFO: Computing changes...
INFO: No packages to install, update or remove

@wildart
Copy link
Member

wildart commented Apr 24, 2016

One reason is that your package in a branch that does not have remote tracking branch, or it's HEAD is detached. PR #15937 should fix reporting for this situation.

@lobingera
Copy link
Author

I see. Is it generally seen as problem if HEAD is detached or package exists withour remote? Or is this just situations, in which Pkg.update() is confused?

@wildart
Copy link
Member

wildart commented Apr 24, 2016

No confusion, all packages should be use master branch to keep track of code changes and master must have remote reference defined to sync up with remote repo. When you do development you could switch to different branch. So when the update happens, your dev branch does not have any remote references to update. This is the source of this error. Currently, it is hard to pin point where error occured (until I fix it), use Pkg.status to see package on branches other the master.

@lobingera
Copy link
Author

@wildart, just to understand you correctly: Any package subject to Pkg.update() needs a remote repo, even if it's only a local development?

@wildart
Copy link
Member

wildart commented Apr 27, 2016

Naturally, that is the purpose of the update procedure - to get updates from the up-to-date source (remote or local does not matter, depends how do you set it up).

@lobingera
Copy link
Author

I see, we are aligned here. Of course Pkg.update() should try to update everything - where possible; see also #13487. I'll close this and wait for better reporting in #15937.

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

No branches or pull requests

2 participants