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

0.6: ERROR: GitError(Code:ENOTFOUND, Class:Tree, the path '0.1.0' does not exist in the given tree) #101

Closed
dlfivefifty opened this issue Feb 20, 2017 · 12 comments · Fixed by #142

Comments

@dlfivefifty
Copy link

julia> using PkgDev

julia> PkgDev.publish()
WARNING: cat{T <: GitObject}(repo::GitRepo, ::Type{T}, object::AbstractString) is deprecated, use cat(repo, object) instead.
Stacktrace:
 [1] depwarn(::String, ::Symbol) at ./deprecated.jl:64
 [2] cat(::Base.LibGit2.GitRepo, ::Type{Base.LibGit2.GitBlob}, ::String) at ./deprecated.jl:51
 [3] (::PkgDev.Entry.##4#9{String,Dict{String,Array{String,1}},String})(::Base.LibGit2.GitRepo) at /Users/solver/.julia/v0.6/PkgDev/src/entry.jl:80
 [4] with(::PkgDev.Entry.##4#9{String,Dict{String,Array{String,1}},String}, ::Base.LibGit2.GitRepo) at ./libgit2/types.jl:576
 [5] publish(::String, ::String) at /Users/solver/.julia/v0.6/PkgDev/src/entry.jl:64
 [6] publish() at /Users/solver/.julia/v0.6/PkgDev/src/PkgDev.jl:70
 [7] eval(::Module, ::Any) at ./boot.jl:235
 [8] eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:66
 [9] macro expansion at ./REPL.jl:97 [inlined]
 [10] (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:73
while loading no file, in expression starting on line 0
ERROR: GitError(Code:ENOTFOUND, Class:Tree, the path '0.1.0' does not exist in the given tree)
Stacktrace:
 [1] macro expansion at ./libgit2/error.jl:99 [inlined]
 [2] Base.LibGit2.GitObject(::Base.LibGit2.GitRepo, ::String) at ./libgit2/repository.jl:127
 [3] cat at ./libgit2/libgit2.jl:479 [inlined]
 [4] cat(::Base.LibGit2.GitRepo, ::Type{Base.LibGit2.GitBlob}, ::String) at ./deprecated.jl:53
 [5] (::PkgDev.Entry.##4#9{String,Dict{String,Array{String,1}},String})(::Base.LibGit2.GitRepo) at /Users/solver/.julia/v0.6/PkgDev/src/entry.jl:80
 [6] with(::PkgDev.Entry.##4#9{String,Dict{String,Array{String,1}},String}, ::Base.LibGit2.GitRepo) at ./libgit2/types.jl:576
 [7] publish(::String, ::String) at /Users/solver/.julia/v0.6/PkgDev/src/entry.jl:64
 [8] publish() at /Users/solver/.julia/v0.6/PkgDev/src/PkgDev.jl:70
@tkelman
Copy link
Contributor

tkelman commented Feb 20, 2017

what package?

@dlfivefifty
Copy link
Author

dlfivefifty commented Feb 20, 2017 via email

@tkelman
Copy link
Contributor

tkelman commented Feb 21, 2017

thanks for the report. if you're in a hurry, use attobot or tag from 0.5, assuming this doesn't happen there

cc @simonbyrne or @kshyatt, most likely one of your refactorings is throwing where it previously wasn't. can we use a nullable-if-not-found api here, or ask if something exists before returning it? silently returning garbage was a bad old api, but we should avoid needing try catches everywhere if the new api is going to throw in a bunch of expected situations

@dancasimiro
Copy link

I ran into this error as well when I tried to publish a new version of WAV.jl.

julia> PkgDev.publish()
ERROR: GitError(Code:ENOTFOUND, Class:Tree, the path '0.8.4' does not exist in the given tree)
Stacktrace:
 [1] macro expansion at ./libgit2/error.jl:99 [inlined]
 [2] Base.LibGit2.GitObject(::Base.LibGit2.GitRepo, ::String) at ./libgit2/repository.jl:127
 [3] cat at ./libgit2/libgit2.jl:500 [inlined]
 [4] cat(::Base.LibGit2.GitRepo, ::Type{Base.LibGit2.GitBlob}, ::String) at ./deprecated.jl:53
 [5] (::PkgDev.Entry.##4#9{String,Dict{String,Array{String,1}},String})(::Base.LibGit2.GitRepo) at /Users/daniel.casimiro/.julia/v0.6/PkgDev/src/entry.jl:80
 [6] with(::PkgDev.Entry.##4#9{String,Dict{String,Array{String,1}},String}, ::Base.LibGit2.GitRepo) at ./libgit2/types.jl:596
 [7] publish(::String, ::String) at /Users/daniel.casimiro/.julia/v0.6/PkgDev/src/entry.jl:64
 [8] publish() at /Users/daniel.casimiro/.julia/v0.6/PkgDev/src/PkgDev.jl:70

I am using julia v0.6 alpha:

julia> versioninfo()
Julia Version 0.6.0-pre.alpha.173
Commit 93cddfc096* (2017-03-18 17:19 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin16.4.0)
  CPU: Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, haswell)

PkgDev is at version 0.1.3.

@tkelman
Copy link
Contributor

tkelman commented May 13, 2017

I think this was fixed by JuliaLang/julia#21171 and should be okay on 0.6.0-rc1 and later (will throw a deprecation warning, but otherwise should work). Leave a comment and we'll reopen if there's still a problem.

@tkelman tkelman closed this as completed May 13, 2017
@ahwillia
Copy link

I think I'm hitting this same error even though I'm on julia version 0.6.2?

error message:

julia> PkgDev.publish()
ERROR: GitError(Code:ENOTFOUND, Class:Tree, the path '0.1.1' does not exist in the given tree)
Stacktrace:
 [1] macro expansion at ./libgit2/error.jl:99 [inlined]
 [2] Base.LibGit2.GitBlob(::Base.LibGit2.GitRepo, ::String) at ./libgit2/repository.jl:116
 [3] (::PkgDev.Entry.##4#9{String,Dict{String,Array{String,1}},String})(::Base.LibGit2.GitRepo) at /Users/alex/.julia/v0.6/PkgDev/src/entry.jl:76
 [4] with(::PkgDev.Entry.##4#9{String,Dict{String,Array{String,1}},String}, ::Base.LibGit2.GitRepo) at ./libgit2/types.jl:608
 [5] publish(::String, ::String) at /Users/alex/.julia/v0.6/PkgDev/src/entry.jl:60
 [6] publish() at /Users/alex/.julia/v0.6/PkgDev/src/PkgDev.jl:78

version info:

julia> versioninfo()
Julia Version 0.6.2
Commit d386e40c17 (2017-12-13 18:08 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin14.5.0)
  CPU: Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Prescott)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, broadwell)

packages:

julia> Pkg.status()
5 required packages:
 - DynamicalSystems              0.12.0
 - Einsum                        0.1.1              master
 - NonNegLeastSquares            0.1.0
 - PkgDev                        0.2.0
 - PyPlot                        2.5.0

git status in METADATA:

dustyfangs:METADATA alex$ git status
On branch metadata-v2
Your branch is ahead of 'origin/metadata-v2' by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean

@mlubin
Copy link
Member

mlubin commented Apr 23, 2018

Same here

simonbyrne added a commit that referenced this issue Apr 23, 2018
#141 made some changes, however I forgot that `content` has different error handling behaviour than `cat`. This is a bit of a kludge, but hopefully should work.
@simonbyrne
Copy link
Contributor

Would you mind trying the sb/fixcat branch of PkgDev, and see if that works?

@mlubin
Copy link
Member

mlubin commented Apr 23, 2018

Sorry, I already manually did the PR to METADATA.

@ahwillia
Copy link

ahwillia commented Apr 24, 2018

Didn't fix it for me. I'm still getting the same error.

On Pkg.checkout(...) I got the following error:

julia> Pkg.checkout("PkgDev", "sb/fixcat")
INFO: Checking out PkgDev sb/fixcat...
ERROR: GitError(Code:ERROR, Class:Merge, There is no tracking information for the current branch.)
Stacktrace:
 [1] (::Base.LibGit2.##117#125{Base.LibGit2.GitRepo})(::Base.LibGit2.GitReference) at ./libgit2/libgit2.jl:709
 [2] with(::Base.LibGit2.##117#125{Base.LibGit2.GitRepo}, ::Base.LibGit2.GitReference) at ./libgit2/types.jl:608
 [3] #merge!#109(::String, ::String, ::Bool, ::Base.LibGit2.MergeOptions, ::Base.LibGit2.CheckoutOptions, ::Function, ::Base.LibGit2.GitRepo) at ./libgit2/libgit2.jl:706
 [4] (::Base.#kw##merge!)(::Array{Any,1}, ::Base.#merge!, ::Base.LibGit2.GitRepo) at ./<missing>:0
 [5] (::Base.Pkg.Entry.##16#18{String,String,Bool,Bool})(::Base.LibGit2.GitRepo) at ./pkg/entry.jl:230
 [6] transact(::Base.Pkg.Entry.##16#18{String,String,Bool,Bool}, ::Base.LibGit2.GitRepo) at ./libgit2/libgit2.jl:882
 [7] with(::Base.Pkg.Entry.##15#17{String,String,Bool,Bool}, ::Base.LibGit2.GitRepo) at ./libgit2/types.jl:608
 [8] checkout(::String, ::String, ::Bool, ::Bool) at ./pkg/entry.jl:226
 [9] (::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#checkout,Tuple{String,String,Bool,Bool}})() at ./pkg/dir.jl:36
 [10] cd(::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#checkout,Tuple{String,String,Bool,Bool}}, ::String) at ./file.jl:70
 [11] #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N} where N) at ./pkg/dir.jl:36
 [12] #checkout#1(::Bool, ::Bool, ::Function, ::String, ::String) at ./pkg/pkg.jl:188
 [13] checkout(::String, ::String) at ./pkg/pkg.jl:188

But then in ~/.julia/v0.6/PkgDev the git status looks okay...

On branch sb/fixcat
Your branch is based on 'origin/sb/fixcat', but the upstream is gone.
  (use "git branch --unset-upstream" to fixup)

nothing to commit, working tree clean

Packages now:

julia> Pkg.status()
5 required packages:
 - DynamicalSystems              0.12.0
 - Einsum                        0.1.1+             master
 - NonNegLeastSquares            0.1.0
 - PkgDev                        0.2.0              sb/fixcat
 - PyPlot                        2.5.0

@simonbyrne
Copy link
Contributor

simonbyrne commented Apr 24, 2018

Arrrrrrr! I think you're hitting JuliaLang/julia#17146

Since you have git installed, can you manually do:

cd ~/.julia/v0.6/PkgDev
git checkout master
git pull
git branch -D sb/fixcat
git checkout sb/fixcat

Then in julia

using PkgDev
PkgDev.publish()

@ahwillia
Copy link

Seemed to work thanks!

simonbyrne added a commit that referenced this issue Apr 24, 2018
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

Successfully merging a pull request may close this issue.

6 participants