-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
update Compat for rename of Pkg to OldPkg #547
Conversation
src/Compat.jl
Outdated
@@ -1436,7 +1436,8 @@ end | |||
@static if VERSION < v"0.7.0-DEV.3656" | |||
const Pkg = Base.Pkg | |||
else | |||
import Pkg | |||
import OldPkg |
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.
Needs a VERSION
dependency. Of course, we don't know the version of merging JuliaLang/julia#27095 yet, but this should be updated once JuliaLang/julia#27095 has landed.
So the plan is to merge this ASAP after JuliaLang/julia#27095 is in and then probably also tag a release soonish to make it generally available? |
On second thought, this is backwards: |
Yeah, that is probably the correct direction. |
We should also figure out what to do with |
Not really. What I thought here was just to keep those packages that are using |
Thinking aloud here, not saying we actually should do this, but the "clean" way would be to
And all this has to happen before What a nightmare. |
Datapoint: |
Usage of Pkg in non-interactive environments should be quite minimal. A big change like this will not be super clean and things like:
is way too much work for little benefit. Right now, I have tried including enough functionality so existing CI scripts will work with Pkg3 -> Pkg which I think would be the main annoyance. |
Given the premises:
I'd say providing a way on Compat to access Pkg2 is a non-starter. Too bad we're already doing so, but at least its uses are rare. How about the following: Let's focus on those functions which are in common use in non-interactive context and for which a clear Pkg3 alternative exists. On Julia 0.6, provide a custom |
What would break then if we don't change anything here? |
I'm not sure what people are using Pkg for inside their packages except trying to find out stuff about the current package environment, which is completely redisigned. So there is no way typically that you could use the same code for these type in 0.6 and 0.7. I'm not sure how much point there is to Compat.Pkg at all after the rename tbh. |
Alright, the most common non-interactive usage of
(or similar for
? Then it seems Compat should enable the following to work on Julia 0.6 or later:
If that's correct so far, there indeed seems to be no need for this PR; |
That should work since I've put in this: https://github.com/JuliaLang/Pkg3.jl/blob/master/src/API.jl#L399-L418 |
https://github.com/JuliaLang/Pkg3.jl/blob/b19fbd72555ec0fe3430c4feb02ed205aa1540c3/src/API.jl#L412 left me under the impression this was deprecated... |
Yeah, but thinking about it, it doesn't have to be. Perhaps being able to get the path to the package being used is useful. The problem is that most packages will not be developed and their source is considered immutable so you shouldn't really go in and do stuff to them, but if it is just for reading things (like what PkgBenchmark does) then it should be fine. Anway, my goal of those functions has been to just keep CI working while people upgrade their packages. |
Yes, of course, but in this case, the question is (was): upgrade to what? If Oh, err, wait, obviously the UUID in |
Yes, so compat.Pkg -> Pkg3 on 0.7 and OldPkg on 0.6 and see the complaints? I think that would work ok. |
Um, hang on, in the |
You can have a dependency graph for a project / package
where
and you cannot locally "rename" a package by just changing its name in the Project file. |
That looks correct to me, @StefanKarpinski |
Actually, there is a possibility: remove I'll see myself out... |
Yeah... would perhaps solve it for the short term until nightlies for #27095 are updated and it is possible to tell people to just get a new nightly... |
01f178a
to
341e55c
Compare
WIll be needed for JuliaLang/julia#27095.