Pkg.jl
Pkg.jl copied to clipboard
Attempt to fix issue #2942
This basically skips an stdlib in deps_graph
if it is no longer an stdlib in the current Julia version (and therefore doesn't exist). I'm not entirely sure I know what I'm doing :)
How do we get the dependencies for that stdlib then, to put in the manifest?
How do we get the dependencies for that stdlib then, to put in the manifest?
Good point, I moved the check to the if
condition, so now it should continue on the else
branch for ex-stdlibs and attempt to get these from the registry. For the libjulia_jll
example in issue #2942 the outcome is the same, since the dependency of libjulia_jll
on LibOSXUnwind_jll
is only there in older (and thus "yanked" as far as I understand) versions of libjulia_jll
.
I don't know if the test failures here are my doing...
I believe the MacOS failure is a flaky test. The other is fixed on master. You just need to rebase/update.
Is there a test that could be added?
Regarding tests: the one package this affects right now is LibOSXUnwind_jll
. So perhaps a test involving that could be added... perhaps trying to do "something" with libjulia_jll
? Sorry, I don't know enough about the test rig for Pkg.jl to make really sensible suggestions, just random ideas...
Rebased and added test, which passes locally 🤞
@IanButterworth any chance to get this merged in a way that it gets into Julia 1.8? Or is that too late already?
Sorry, I've tried to understand this, but I can't. I think the logic here might need comments in the code. I requested @staticfloat's review who might be best placed to review?
It seems a reasonable thing to get into 1.8 IMO
The change (line 431 in Operations.jl) checks if the dependency is still an stdlib in the current running version of Julia, since uuid_is_stdlib
is true if the dependency was an stdlib in the targeted (older) version of Julia. If it is no longer and stdlib, it needs to be obtained from the repositories, which is done in the else
branch. At least that is how I understand it ;)
Sound like a great comment to add.
Also, might "download unavailable stdlibs during julia_version resolve" be a descriptive name for this PR?