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

ERROR: GitError(Code:EMERGECONFLICT, Class:Checkout, 492 conflicts prevent checkout) #1161

Closed
nbakas opened this issue Apr 17, 2019 · 10 comments

Comments

@nbakas
Copy link

nbakas commented Apr 17, 2019

When I try to add any new package or do Pkg.update()
Julia version 1.0.3.1 on Windows 10

@StefanKarpinski
Copy link
Sponsor Member

It sounds like you may have a dev'd repo that is in a conflicting state and cannot be updated.

@KristofferC
Copy link
Sponsor Member

Dev'd repos are never updated though.

More information are needed to answer this. Output of Pkg.status(). Does it happen in an empty project? Etc.

@StefanKarpinski
Copy link
Sponsor Member

I guess it's possible that the registry repo is in a messed up state. If that's the case, the fix is:
a) don't manually mess with the registry repos or, if you do then fix them before trying to update
b) for this time, go into ~/.julia/registries/General/ and make sure you're ok with blowing away whatever is in there and if you are then you can just delete that entire directory.

@nbakas
Copy link
Author

nbakas commented Apr 17, 2019

Thanks for the immediate replies!

It happens in an empty project, I just start Julia (in Atom/Juno)

Status `C:\Users\...\.juliapro\JuliaPro_v1.0.3.1\environments\v1.0\Project.toml`
  [e5e0dc1b] Juno v0.5.3

In ~/.juliapro/registries/ here is no folder General
note: I have ~/.juliapro and ~/.julia as well, I suppose the second remained from older installations

Here is the complete message

GitError(Code:EMERGECONFLICT, Class:Checkout, 492 conflicts prevent checkout)
macro expansion at error.jl:101 [inlined]
#checkout_tree#46(::LibGit2.CheckoutOptions, ::Function, ::LibGit2.GitRepo, ::LibGit2.GitCommit) at repository.jl:358
checkout_tree at repository.jl:356 [inlined]
ffmerge!(::LibGit2.GitRepo, ::LibGit2.GitAnnotated) at merge.jl:107
#merge!#89(::LibGit2.MergeOptions, ::LibGit2.CheckoutOptions, ::Function, ::LibGit2.GitRepo, ::Array{LibGit2.GitAnnotated,1}, ::Bool) at merge.jl:234
#merge! at none:0 [inlined]
#merge!#140(::String, ::String, ::Bool, ::LibGit2.MergeOptions, ::LibGit2.CheckoutOptions, ::Function, ::LibGit2.GitRepo) at LibGit2.jl:784
#merge! at none:0 [inlined]
update_registries(::Pkg.Types.Context, ::Array{Pkg.Types.RegistrySpec,1}) at Types.jl:1254
update_registries at Types.jl:1219 [inlined]
#handle_repos_add!#61(::Bool, ::Nothing, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at Types.jl:719
#handle_repos_add! at API.jl:0 [inlined]
#add_or_develop#15(::Symbol, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at API.jl:42
#add_or_develop at none:0 [inlined]
#add_or_develop#14 at API.jl:31 [inlined]
#add_or_develop at none:0 [inlined]
#add_or_develop#13 at API.jl:29 [inlined]
#add_or_develop at none:0 [inlined]
#add_or_develop#12 at API.jl:28 [inlined]
#add_or_develop at none:0 [inlined]
#add#20 at API.jl:59 [inlined]
add(::String) at API.jl:59
top-level scope at none:0
include_string(::Module, ::String, ::String) at loading.jl:1008
include_string(::Module, ::String, ::String, ::Int64) at eval.jl:30
(::getfield(Atom, Symbol("##114#119")){String,Int64,String})() at eval.jl:94
withpath(::getfield(Atom, Symbol("##114#119")){String,Int64,String}, ::Nothing) at utils.jl:30
withpath at eval.jl:46 [inlined]
#113 at eval.jl:93 [inlined]
with_logstate(::getfield(Atom, Symbol("##113#118")){String,Int64,String}, ::Base.CoreLogging.LogState) at logging.jl:395
with_logger at logging.jl:491 [inlined]
#112 at eval.jl:92 [inlined]
hideprompt(::getfield(Atom, Symbol("##112#117")){String,Int64,String}) at repl.jl:85
macro expansion at eval.jl:91 [inlined]
(::getfield(Atom, Symbol("##111#116")))(::Dict{String,Any}) at eval.jl:86
handlemsg(::Dict{String,Any}, ::Dict{String,Any}) at comm.jl:164
(::getfield(Atom, Symbol("##19#21")){Array{Any,1}})() at task.jl:259

@KristofferC
Copy link
Sponsor Member

Could you try remove the julia pro registry (just remove the directory in .juliapro/registries

@nbakas
Copy link
Author

nbakas commented Apr 17, 2019

I deleted folder registries, then restarted Julia, I got a message

Hold on tight while we're installing some packages for you.
This should only take a few seconds...

Updating registry at C:\Users\...\.juliapro\JuliaPro_v1.0.3.1\registries\JuliaPro
Updating

[2] #checkout_tree#46(::LibGit2.CheckoutOptions, ::Function, ::LibGit2.GitRepo, ::LibGit2.GitCommit) at C:\Users\julia\AppData\Local\Julia-1.0.3\share\julia\stdlib\v1.0\LibGit2\src\repository.jl:358
[3] checkout_tree at C:\Users\julia\AppData\Local\Julia-1.0.3\share\julia\stdlib\v1.0\LibGit2\src\repository.jl:356 [inlined]
[4] ffmerge!(::LibGit2.GitRepo, ::LibGit2.GitAnnotated) at C:\Users\julia\AppData\Local\Julia-1.0.3\share\julia\stdlib\v1.0\LibGit2\src\merge.jl:107
[5] #merge!#89(::LibGit2.MergeOptions, ::LibGit2.CheckoutOptions, ::Function, ::LibGit2.GitRepo, ::Array{LibGit2.GitAnnotated,1}, ::Bool) at C:\Users\julia\AppData\Local\Julia-1.0.3\share\julia\stdlib\v1.0\LibGit2\src\merge.jl:234
[6] #merge! at .\none:0 [inlined]
[7] #merge!#140(::String, ::String, ::Bool, ::LibGit2.MergeOptions, ::LibGit2.CheckoutOptions, ::Function, ::LibGit2.GitRepo) at C:\Users\julia\AppData\Local\Julia-1.0.3\share\julia\stdlib\v1.0\LibGit2\src\LibGit2.jl:784
[8] #merge! at .\none:0 [inlined]
[9] update_registries(::Pkg.Types.Context, ::Array{Pkg.Types.RegistrySpec,1}) at C:\Users\julia\AppData\Local\Julia-1.0.3\share\julia\stdlib\v1.0\Pkg\src\Types.jl:1254
[10] update_registries at C:\Users\julia\AppData\Local\Julia-1.0.3\share\julia\stdlib\v1.0\Pkg\src\Types.jl:1219 [inlined]
[11] #handle_repos_add!#61(::Bool, ::Nothing, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\Users\julia\AppData\Local\Julia-1.0.3\share\julia\stdlib\v1.0\Pkg\src\Types.jl:719
[12] #handle_repos_add! at .\none:0 [inlined]
[13] #add_or_develop#15(::Symbol, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1})
at C:\Users\julia\AppData\Local\Julia-1.0.3\share\julia\stdlib\v1.0\Pkg\src\API.jl:42
[14] #add_or_develop at .\none:0 [inlined]
[15] #add_or_develop#14 at C:\Users\julia\AppData\Local\Julia-1.0.3\share\julia\stdlib\v1.0\Pkg\src\API.jl:31 [inlined]
[16] #add_or_develop at .\none:0 [inlined]
[17] #add_or_develop#13 at C:\Users\julia\AppData\Local\Julia-1.0.3\share\julia\stdlib\v1.0\Pkg\src\API.jl:29 [inlined]
[18] #add_or_develop at .\none:0 [inlined]
[19] #add_or_develop#12 at C:\Users\julia\AppData\Local\Julia-1.0.3\share\julia\stdlib\v1.0\Pkg\src\API.jl:28 [inlined]
[20] #add_or_develop at .\none:0 [inlined]
[21] #add#20 at C:\Users\julia\AppData\Local\Julia-1.0.3\share\julia\stdlib\v1.0\Pkg\src\API.jl:59 [inlined]
[22] add(::String) at C:\Users\julia\AppData\Local\Julia-1.0.3\share\julia\stdlib\v1.0\Pkg\src\API.jl:59
[23] top-level scope at C:\JuliaPro-1.0.3.1.atom\packages\julia-client\script\boot_repl.jl:22
[24] include at .\boot.jl:317 [inlined]
[25] include_relative(::Module, ::String) at .\loading.jl:1044
[26] include(::Module, ::String) at .\sysimg.jl:29
[27] exec_options(::Base.JLOptions) at .\client.jl:266
[28] _start() at .\client.jl:425
in expression starting at C:\JuliaPro-1.0.3.1.atom\packages\julia-client\script\boot_repl.jl:1

It was working for a lot of time
Then I just left an empty folder /registries, and it exhibits the same behavior, it is working for minutes without actually doing anything

@nbakas
Copy link
Author

nbakas commented Apr 17, 2019

OK, I deleted everything from the registry (using regedit) as well as any folder created by the installation, reinstalled Julia and everything is working now

@ghost
Copy link

ghost commented Oct 26, 2019

I am having the same problem but cannot fix it. I just re-installed Julia Pro and when I try to add a package I get
git-repo `https://pkg.juliacomputing.com//registry/JuliaPro` ERROR: GitError(Code:EMERGECONFLICT, Class:Checkout, 619 conflicts prevent checkout) #checkout_tree#46(::LibGit2.CheckoutOptions, ::typeof(LibGit2.checkout_tree), ::LibGit2.GitRepo, ::LibGit2.GitCommit) at /Applications/JuliaPro-1.2.0-1.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:? ffmerge!(::LibGit2.GitRepo, ::LibGit2.GitAnnotated) at /Applications/JuliaPro-1.2.0-1.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:? #merge!#89(::LibGit2.MergeOptions, ::LibGit2.CheckoutOptions, ::typeof(LibGit2.merge!), ::LibGit2.GitRepo, ::Array{LibGit2.GitAnnotated,1}, ::Bool) at /Users/vagrant/worker/juliapro-release-osx1011-0_6/build/tmp_julia/Julia-1.2.app/Contents/Resources/julia/share/julia/stdlib/v1.2/LibGit2/src/merge.jl:234 #merge! at ./none:0 [inlined] #merge!#140(::String, ::String, ::Bool, ::LibGit2.MergeOptions, ::LibGit2.CheckoutOptions, ::typeof(LibGit2.merge!), ::LibGit2.GitRepo) at /Users/vagrant/worker/juliapro-release-osx1011-0_6/build/tmp_julia/Julia-1.2.app/Contents/Resources/julia/share/julia/stdlib/v1.2/LibGit2/src/LibGit2.jl:784 #merge! at ./none:0 [inlined] update_registries(::Pkg.Types.Context, ::Array{Pkg.Types.RegistrySpec,1}) at /Users/vagrant/worker/juliapro-release-osx1011-0_6/build/tmp_julia/Julia-1.2.app/Contents/Resources/julia/share/julia/stdlib/v1.2/Pkg/src/Types.jl:1254 update_registries at /Users/vagrant/worker/juliapro-release-osx1011-0_6/build/tmp_julia/Julia-1.2.app/Contents/Resources/julia/share/julia/stdlib/v1.2/Pkg/src/Types.jl:1219 [inlined] #handle_repos_add!#61(::Bool, ::Nothing, ::typeof(Pkg.Types.handle_repos_add!), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/vagrant/worker/juliapro-release-osx1011-0_6/build/tmp_julia/Julia-1.2.app/Contents/Resources/julia/share/julia/stdlib/v1.2/Pkg/src/Types.jl:719 #handle_repos_add! at ./none:0 [inlined] #add_or_develop#17(::Symbol, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Pkg.API.add_or_develop), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/vagrant/worker/juliapro-release-osx1011-0_6/build/tmp_julia/Julia-1.2.app/Contents/Resources/julia/share/julia/stdlib/v1.2/Pkg/src/API.jl:47 #add_or_develop at ./none:0 [inlined] #add_or_develop#16 at /Users/vagrant/worker/juliapro-release-osx1011-0_6/build/tmp_julia/Julia-1.2.app/Contents/Resources/julia/share/julia/stdlib/v1.2/Pkg/src/API.jl:36 [inlined] #add_or_develop at ./none:0 [inlined] #add_or_develop#13 at /Users/vagrant/worker/juliapro-release-osx1011-0_6/build/tmp_julia/Julia-1.2.app/Contents/Resources/julia/share/julia/stdlib/v1.2/Pkg/src/API.jl:34 [inlined] #add_or_develop at ./none:0 [inlined] #add_or_develop#12(::Base.Iterators.Pairs{Symbol,Symbol,Tuple{Symbol},NamedTuple{(:mode,),Tuple{Symbol}}}, ::typeof(Pkg.API.add_or_develop), ::String) at /Users/vagrant/worker/juliapro-release-osx1011-0_6/build/tmp_julia/Julia-1.2.app/Contents/Resources/julia/share/julia/stdlib/v1.2/Pkg/src/API.jl:33 #add_or_develop at ./none:0 [inlined] #add#22 at /Users/vagrant/worker/juliapro-release-osx1011-0_6/build/tmp_julia/Julia-1.2.app/Contents/Resources/julia/share/julia/stdlib/v1.2/Pkg/src/API.jl:64 [inlined] add(::String) at /Users/vagrant/worker/juliapro-release-osx1011-0_6/build/tmp_julia/Julia-1.2.app/Contents/Resources/julia/share/julia/stdlib/v1.2/Pkg/src/API.jl:64 top-level scope at none:0 eval at ./boot.jl:330 [inlined] (::getfield(Distributed, Symbol("##162#164")){Module,Expr})() at ./task.jl:268

@KristofferC
Copy link
Sponsor Member

Did you try #1161 (comment)?

@theburdman
Copy link

I have the same issue. Deleting the registry folder does not work for me on MacOS Catalina so I am dead in the water.

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

5 participants