You need master GitHub.jl for Checks
I believe.
FemtoCleaner
is working for me. I confirm I am on master GitHub
, which is tagged v4.1.0
I tried to upgrade Ipopt.jl . Femtocleaner did not find anything.
Warning when using Ipopt:
julia> @time using Ipopt
WARNING: importing deprecated binding Base.Libdl into Sys.
WARNING: Base.Libdl is deprecated, run `using Libdl` instead
in module Ipopt
in __init__ at /home/ufechner/.julia/packages/Ipopt/udV2/src/Ipopt.jl
┌ Warning: `contains(haystack, needle)` is deprecated, use `occursin(needle, haystack)` instead.
│ caller = (::getfield(Ipopt, Symbol("##1#2")))(::String) at Ipopt.jl:26
└ @ Ipopt Ipopt.jl:26
1.425591 seconds (2.26 M allocations: 118.443 MiB, 4.80% gc time)
The last warning was easy to fix. But how can I fix the first two warnings regarding Base.Libdl? I did not find where this depreciated code is used. It does not seam to happen in Ipopt.jl, but in some dependency.
Any idea?
Pkg3 question: if I want to keep up with the new package developments generally, do I have to
pkg> activate .
pkg> up
separately in each package/project I am working on? My understanding is that unless I do this, the manifest in each project just remains fixed.
In contrast to v0.6, where the package state was global and a single Pkg.update()
would update everything. Note that I am not complaining, I think the new way makes more sense, just asking a clarifying question.
No the package manifests are ignored on the global level AFAICT, so up
in the top level environment is enough.
I found Base.Libdl in Ipopt.jl and replaced it with Libdl.
In addition I added at the top:
if VERSION >= v"0.7.0-DEV.3382"
using Libdl
end
Is it suggested to use such an if statement?
Sure, or you can include using Compat.Libdl
, which should work on both 0.6 and 0.7.
Thanks!
I started to fix the depreciations in the tests of Ipopt, but I realized that most of the depreciations appear in MathProgBase.jl, which is used by Ipopt. Unfortunately the tests of MathProgBase.jl fail, and fixing them is beyond my skills.
Have a look:
https://github.com/JuliaOpt/MathProgBase.jl/issues/213
Any hints welcome!
Is there a standardized way of telling where a given package is in this upgrade process? For example, Trying to use Distributions.jl led me to problems with Arpack.jl, which were quickly fixed. Distributions
still isn’t working. There a a few commits mentioning v0.7, but strangely there’s not a single issue mentioning it. Still, I can’t imagine I’m the only one trying to use it with 0.7 - is that possible?
I’m happy to learn the upgrade process and try to do a couple. But the uncertainty makes it really hard to judge what the road ahead looks like before I can get started on my own project. Any suggestions?
Just create an issue “Update Distributions.jl for Julia 0.7” and discuss the needed work with collaborators.
Fair enough, maybe others are wondering the same as me. Thanks
I was able to install FemtoCleaner as instructed (had to run Pkg.update() a few times). Now, when running the FemtoCleaner, I get an error:
julia> import FemtoCleaner
julia> FemtoCleaner.cleanrepo("home/tim/.julia/dev/Discretizers"; show_diff=true, delete_local=false)
INFO: Cloning home/tim/.julia/dev/Discretizers to /tmp/tmpArNh0h...
ERROR: GitError(Code:ERROR, Class:Net, Unsupported URL protocol)
Stacktrace:
[1] macro expansion at ./libgit2/error.jl:99 [inlined]
[2] clone(::String, ::String, ::Base.LibGit2.CloneOptions) at ./libgit2/repository.jl:276
[3] #clone#100(::String, ::Bool, ::Ptr{Void}, ::Nullable{Base.LibGit2.AbstractCredentials}, ::Function, ::String, ::String) at ./libgit2/libgit2.jl:562
[4] #cleanrepo#23(::Bool, ::Bool, ::Function, ::String) at /home/tim/.julia/v0.6/FemtoCleaner/src/FemtoCleaner.jl:301
[5] (::FemtoCleaner.#kw##cleanrepo)(::Array{Any,1}, ::FemtoCleaner.#cleanrepo, ::String) at ./<missing>:0
fatal: Not a git repository (or any of the parent directories): .git
ERROR: failed process: Process(`git status`, ProcessExited(128)) [128]
Stacktrace:
[1] pipeline_error(::Base.Process) at ./process.jl:682
[2] run(::Cmd) at ./process.jl:651
[3] #24 at /home/tim/.julia/v0.6/FemtoCleaner/src/FemtoCleaner.jl:313 [inlined]
[4] cd(::FemtoCleaner.##24#25, ::String) at ./file.jl:70
[5] #cleanrepo#23(::Bool, ::Bool, ::Function, ::String) at /home/tim/.julia/v0.6/FemtoCleaner/src/FemtoCleaner.jl:312
[6] (::FemtoCleaner.#kw##cleanrepo)(::Array{Any,1}, ::FemtoCleaner.#cleanrepo, ::String) at ./<missing>:0
Any suggestions on how to overcome this?
Try using an absolute path.
Thanks, looks like I blindly followed the example code without thinking. Needed a ‘/’ before “home”.