arsenal9971 / Shearlab.jl

Shearlab is a Julia Library with toolbox for two- and threedimensional data processing using the Shearlet system as basis functions which generates an sparse representation of cartoon-like functions.
https://arsenal9971.github.io/Shearlab.jl/
Other
31 stars 9 forks source link

Cannot update #18

Closed BoundaryValueProblems closed 6 years ago

BoundaryValueProblems commented 6 years ago

@arsenal9971, I'm trying to update Shearlab.jl, but it failed as follows. The current version I have on this machine is 0.2.0+ (master branch). But interestingly, after this failure, I still could run Pkg.build("Shearlab") and using Shearlab without errors. But that's because these commands run on the current version on my machines, not on the latest updated version. The same thing happens on three different configurations I use, i.e., linux, Mac OS X, windows10. Thanks a lot for your help!

julia> Pkg.update("Shearlab")
INFO: Updating METADATA...
INFO: Computing changes...
INFO: No packages to install, update or remove
ERROR: Update finished with errors.
=> Package Shearlab cannot be updated.
GitError(Code:ERROR, Class:Checkout, Cannot checkout to invalid path 'presentations/Oberseminar/\')
macro expansion at .\libgit2\error.jl:99 [inlined]
#checkout_tree#26(::Base.LibGit2.CheckoutOptions, ::Function, ::Base.LibGit2.GitRepo, ::Base.LibGit2.GitCommit) at .\libgit2\repository.jl:233
ffmerge!(::Base.LibGit2.GitRepo, ::Base.LibGit2.GitAnnotated) at .\libgit2\merge.jl:52
#merge!#62(::Base.LibGit2.MergeOptions, ::Base.LibGit2.CheckoutOptions, ::Function, ::Base.LibGit2.GitRepo, ::Array{Base.LibGit2.GitAnnotated,1}, ::Bool) at .\libgit2\merge.jl:122
(::Base.#kw##merge!)(::Array{Any,1}, ::Base.#merge!, ::Base.LibGit2.GitRepo, ::Array{Base.LibGit2.GitAnnotated,1}, ::Bool) at .\<missing>:0
#merge!#109(::String, ::String, ::Bool, ::Base.LibGit2.MergeOptions, ::Base.LibGit2.CheckoutOptions, ::Function, ::Base.LibGit2.GitRepo) at .\libgit2\libgit2.jl:722
(::Base.#kw##merge!)(::Array{Any,1}, ::Base.#merge!, ::Base.LibGit2.GitRepo) at .\<missing>:0
(::Base.Pkg.Entry.##37#43{CompositeException})(::Base.LibGit2.GitRepo) at .\pkg\entry.jl:431
with(::Base.Pkg.Entry.##37#43{CompositeException}, ::Base.LibGit2.GitRepo) at .\libgit2\types.jl:608
update(::String, ::Set{String}) at .\pkg\entry.jl:419
(::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}}})() at .\pkg\dir.jl:36
cd(::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}}}, ::String) at .\file.jl:59
#cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N} where N) at .\pkg\dir.jl:36
update(::String, ::Vararg{String,N} where N) at .\pkg\pkg.jl:228
eval(::Module, ::Any) at .\boot.jl:235
eval_user_input(::Any, ::Base.REPL.REPLBackend) at .\REPL.jl:66
macro expansion at .\REPL.jl:97 [inlined]
(::Base.REPL.##1#2{Base.REPL.REPLBackend})() at .\event.jl:73
Stacktrace:
 [1] update(::String, ::Set{String}) at .\pkg\entry.jl:466
 [2] (::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}}})() at .\pkg\dir.jl:36
 [3] cd(::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}}}, ::String) at .\file.jl:59
 [4] #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N} where N) at .\pkg\dir.jl:36
 [5] update(::String, ::Vararg{String,N} where N) at .\pkg\pkg.jl:228
arsenal9971 commented 6 years ago

@BoundaryValueProblems

I am actually quite surprise that Pkg.update("Shearlab") tries to checkout on the current stage version and not on the official version (I guess that why it says version 0.2.0+ and not just 0.2.0) , this should not happen whatsoever, I will start an issue in the Base repository (I should be able to play around in my repository without affecting the users).

This means that all the source code at you computer is correctly installed, just for some reason the presentations cannot be cloned, if this message is too annoying for you. I can recommend you maybe two workarounds:

1.- You can enforce the julia library to have certain version and then build it, this will change from v"0.2.0+" to v"0.2.0"

julia> Pkg.pin("Shearlab",v"0.2.0") #Enforce the library to have that version
julia> Pkg.build("Shearlab")

2.- You can remove the library, update the METADATA and install it again from scratch (I already install the last version in the last weeks in different servers and I did not have any issue.

julia> Pkg.rm("Shearlab")
julia> Pkg.update() #update METADATA
julia> Pkg.add("Shearlab")

Let me know if any of those work. In any case you don't really need to do it since your current version is actually working. I can also help you personally in two weeks when you come to visit my research group.

BoundaryValueProblems commented 6 years ago

Thanks, @arsenal9971! Actually, sometime ago, I ran Pkg.checkout("Shearlab") so that I could get the latest master branch all the time. That's why Pkg.status() gives me 0.2.0+. I can always go back to the officially release version 0.2.0, by running Pkg.free("Shearlab"). Let me know if you recommend that I should just use the officially released version. Just I want to mention that I also checked out some other packages such as Plots.jl and most of its backends, e.g., PlotlyJS.jl, PyPlot.jl, and GR.jl as well as some other packages. I usually do not have problems with those master branches. Thanks and see you soon!

arsenal9971 commented 6 years ago

I recommend you in the case of Shearlab.jl to use the officially released version, everytime I do a a important update on the features of the library I do a official released and it takes not so much to be accepted. In the while I once in a while play with the repository so sometimes things may crash if you are based on the latest repo version.

BoundaryValueProblems commented 6 years ago

OK, I just ran Pkg.free("Shearlab") so that my copy has become the officially-released version 0.2.0. I'll try not to get the very latest repo/master version for Shearlab. Thanks!

devel-chm commented 6 years ago

I'm not sure if this is related but when I try a simple clone of the Shearlab.jl repository, there are multiple errors, the checkout fails and there is a bunch of cruft about working files and files deleted... I tried another time but the same results. Is it possible that the repository itself is corrupted---independent of whether the update works or not from julia?

This is what I get from the clone attempt:

git clone http://github.com/arsenal9971/Shearlab.jl Cloning into 'Shearlab.jl'... warning: redirecting to https://github.com/arsenal9971/Shearlab.jl/ remote: Counting objects: 1457, done. remote: Compressing objects: 100% (147/147), done. remote: Total 1457 (delta 128), reused 160 (delta 73), pack-reused 1234 Receiving objects: 100% (1457/1457), 209.82 MiB | 8.34 MiB/s, done. Resolving deltas: 100% (501/501), done. error: unable to create file presentations/Oberseminar/\: Is a directory error: unable to create file presentations/Oberseminar/cones.jpg: No such file or directory error: unable to create file presentations/Oberseminar/phantom.png: No such file or directory error: unable to create file presentations/Oberseminar/phantom_measured.png: No such file or directory error: unable to create file presentations/Oberseminar/phantom_reproducing.m: No such file or directory error: unable to create file presentations/Oberseminar/sinogram.png: No such file or directory Checking out files: 100% (771/771), done. fatal: unable to checkout working tree warning: Clone succeeded, but checkout failed. You can inspect what was checked out with 'git status' and retry the checkout with 'git checkout -f HEAD'

I've attached the output from git status on the Shearlab.jl clone which shows the "cruft" Shearlab.jl_git_status.txt

arsenal9971 commented 6 years ago

I am not really sure, since I cannot reproduce your error. I just did in a computer of a collegue git clone, and it worked perfectly.

devel-chm commented 6 years ago

The problem appears to be the directory "presentations/Oberseminar/\"

Maybe having a file named "\" is ok on unix but this is cygwin/win10 which uses \ as a directory path separator so this is not a file. If you don't need that "presentations/Oberseminar/\" file, maybe you could delete it? I'm not enough of a git expert to figure out how to work around the problem on my end.

--Chris

On Mon, Jun 18, 2018 at 4:57 AM, Hector Andrade Loarca < notifications@github.com> wrote:

I am not really sure, since I cannot reproduce your error. I just did in a computer of a collegue git clone, and it worked perfectly.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/arsenal9971/Shearlab.jl/issues/18#issuecomment-397987335, or mute the thread https://github.com/notifications/unsubscribe-auth/AAwNecyiSoCkyqoPa7-WCU9K7RpFk26tks5t92uSgaJpZM4UQimi .

arsenal9971 commented 6 years ago

@devel-chm Done!!, thanks for the notice, let me know if now it works, I think nobody is enough git expert to call them self git expert

devel-chm commented 6 years ago

Works now. Thanks! I guess that was the problem.

-chm

On Tue, Jun 19, 2018 at 10:10 AM, Hector Andrade Loarca < notifications@github.com> wrote:

@devel-chm https://github.com/devel-chm Done!!, thanks for the notice, let me know if now it works

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/arsenal9971/Shearlab.jl/issues/18#issuecomment-398412670, or mute the thread https://github.com/notifications/unsubscribe-auth/AAwNeRv3cB5Tkg5pgZMFsQWznSSjrUS_ks5t-QZSgaJpZM4UQimi .

arsenal9971 commented 6 years ago

Yes, that was it