-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
Make Pkg more resilient to reading older manifests where ex-stdlibs are listed #3634
Conversation
…re listed This should prevent errors like: ``` ERROR: Could not locate the source code for the DelimitedFiles package. Are you trying to use a manifest generated by a different version of Julia? ``` When using older manifests that list DelimitedFiles in the stdlib format even though DelimitedFiles now is upgradable and has e.g. a `git-tree-sha1` entry when generated with current Pkg
This is great! Having Manifest forward-compatibility is always a lovely thing. Thanks for diving into this @KristofferC |
Does that mean that |
Yes it currently does. |
Ok, would it then make sense to break that check into |
From the package manager's p.o.v it isn't really though. In all ways the package manager interacts with DelimitedFiles, it acts like a normal package (with the exception of when old manifests are used). |
Maybe we should just have |
Yes, I am changing this to something along those lines. |
src/Types.jl
Outdated
is_stdlib(uuid::UUID) = uuid in keys(stdlibs()) && uuid ∉ UPGRADABLE_STDLIBS_UUIDS | ||
# Includes upgradable stdlibs | ||
function is_any_stdlib(uuid::UUID, julia_version::Union{VersionNumber, Nothing}) | ||
return is_stdlib(uuid, julia_version) || uuid in UPGRADABLE_STDLIBS_UUIDS | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is_any_stdlib
doesn't make sense to me.
I can't shake that it should be this, for correctness
is_stdlib(uuid::UUID) = uuid in keys(stdlibs()) && uuid ∉ UPGRADABLE_STDLIBS_UUIDS | |
# Includes upgradable stdlibs | |
function is_any_stdlib(uuid::UUID, julia_version::Union{VersionNumber, Nothing}) | |
return is_stdlib(uuid, julia_version) || uuid in UPGRADABLE_STDLIBS_UUIDS | |
end | |
is_stdlib(uuid::UUID) = uuid in keys(stdlibs()) | |
# Includes upgradable stdlibs | |
function is_upgradable_stdlib(uuid::UUID, julia_version::Union{VersionNumber, Nothing}) | |
return uuid in UPGRADABLE_STDLIBS_UUIDS | |
end |
And Pkg tests should check that UPGRADABLE_STDLIBS_UUIDS
are all stdlibs probably
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed and tweaked some things slightly. I don't really think that test is needed since it is true "by construction" and the test would be written virtually identically to the implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My reservations about what is_stdlib
should say are about internals so don't need to be figured out here
…re listed (#3634) * Make Pkg more resilient to reading older manifests where ex-stdlibs are listed This should prevent errors like: ``` ERROR: Could not locate the source code for the DelimitedFiles package. Are you trying to use a manifest generated by a different version of Julia? ``` When using older manifests that list DelimitedFiles in the stdlib format even though DelimitedFiles now is upgradable and has e.g. a `git-tree-sha1` entry when generated with current Pkg (cherry picked from commit ddcc7b2)
…re listed (#3634) * Make Pkg more resilient to reading older manifests where ex-stdlibs are listed This should prevent errors like: ``` ERROR: Could not locate the source code for the DelimitedFiles package. Are you trying to use a manifest generated by a different version of Julia? ``` When using older manifests that list DelimitedFiles in the stdlib format even though DelimitedFiles now is upgradable and has e.g. a `git-tree-sha1` entry when generated with current Pkg (cherry picked from commit ddcc7b2)
This should prevent errors like:
When using older manifests that list DelimitedFiles in the stdlib format even though DelimitedFiles now is upgradable and has e.g. a
git-tree-sha1
entry when generated with current Pkg