Pkg.upgrade() of JuMP/MathProgBase


#1

I did Pkg.checkout() of JuMP/MathProgBase to get the latest versions. However, Pkg.upgrade() is downgrading JuMP/MathProgBase to old versions. I am using julia 0.5. How to resolve this?


#2

Yes, there really is no good way to resolve this right now. It’s one reason why I shy away from maximum version requirements! To pin it down by hand, use Pkg.dependents("JuMP") and Pkg.dependents("MathProgBase") to get a listing of packages which are dependents, and then go through your library folder in alphabetical order looking at the REQUIRE file to see if any of the dependents have a maximum version requirement. Note that some of these packages may be dependencies of a different library, so you’ll likely have to check many more packages than you explicitly installed.

In the end, you will find one with the maximum version requirement and go open an issue, or remove that package. However, that package may be pulled in by a different package, in which case it will reinstall itself and so you need to check via Pkg.dependents what’s doing that (or this may show up in the Pkg.update() printout?)

Either way, resolving these kinds of dependencies issues is not fun.


#3

Thank you very much for the response.

I think now everything os ok.

I wrote a code in Mads.jl to find the version dependencies:

"Lists modules required by a module (Mads by default)"
function required(modulename::String="Mads", filtermodule::String="")
	filename = joinpath(Pkg.dir(modulename), "REQUIRE")
	if isfile(filename)
		modules = readdlm(filename)
		if filtermodule != ""
			i = modules[:,1].==filtermodule
		else
			i = modules[:,1].!="julia"
		end
		return modules[i,:];
	else
		return [filtermodule ""];
	end
end

"Lists modules dependents on a module (Mads by default)"
function dependents(modulename::String="Mads", filter::Bool=false)
	depmodules = Pkg.dependents(modulename)
	modules = Array(Any, (0, 2))
	for i in depmodules
		modules = [modules; [i Mads.required(i, modulename)[:,2]]]
	end
	if filter
		i = modules[:,2].!=""
		modules = modules[i,:]
	end
	return modules;
end