-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
no-arg activate: if already deactivated, activate current project #1891
base: master
Are you sure you want to change the base?
Conversation
Previously there was no convenient way to activate the current project from the Pkg REPL or API. This changes `Pkg.activate()` so that if there is no active project to deactivate, it instead activates `Base.current_project()`. This means that we can now say that `julia --project` is exactly equivlent to `julia` followed by `pkg> activate`.
well that may have broken some things |
Marking as 1.6 mostly as a reminder to myself to get this passing tests at some point before then. |
The concept of “home project” was removed in JuliaLang/julia#36434. Also see JuliaLang#1891. Fixes JuliaLang#3127
Coming here from #3547 and just wanted to confirm that this is the intended behavior for repeated no-arg calls to
I confess I'd be surprised by this behavior, specifically having the environment I provided on the command line forgotten while an unrelated non-base environment is brought into orbit. Wouldn't it make more sense to toggle back to the previously active environment rather than EDIT: I suppose that last suggestion is exactly the concept of a home project that you've excised, so I don't expect that to make a comeback. But isn't the behavior introduced here even more confusing? |
I agree that it’s very confusing to make the behavior of If all that’s needed is a convenient way to activate the current project, this could simply be added as a new flag, i. e. |
SemVer doesn't apply to interactive functionality, so that argument does not prevent changing this. It's worth taking into consideration, but we are free to alter interactive interfaces like Pkg and the REPL. |
I wasn’t aware that Pkg was considered an interactive interface! Is this stated anywhere? I’m certainly using it in a non-interactive way! What is the stable interface to accomplish the same things? |
If you're talking about the API then that should remain compatible, but the Pkg REPL certainly is interactive. I don't really feel strongly about this issue, btw, just seemed like this would be convenient. |
I was referring to the function (Side note: In principle, I do think it was a good idea to get rid of the “home project” concept, since it just added unnecessary complexity and confusion.) |
home project: remove all uses of this (no longer does anything as of active project: get rid of the concept of a home project julia#36434)
Previously there was no convenient way to activate the current project from the Pkg REPL or API. This changes
Pkg.activate()
so that if there is no active project to deactivate, it instead activatesBase.current_project()
. This means that we can now say thatjulia --project
is exactly equivlent tojulia
followed bypkg> activate
.