-
Notifications
You must be signed in to change notification settings - Fork 57
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
Fixing exists by adding keywords #167
base: master
Are you sure you want to change the base?
Conversation
@@ -192,7 +192,11 @@ end | |||
const PkgOrPkgs = Union{AbstractString, AbstractVector{<: AbstractString}} | |||
|
|||
"Install a new package or packages." | |||
function add(pkg::PkgOrPkgs, env::Environment=ROOTENV; channel::AbstractString="") | |||
function add(pkg::PkgOrPkgs; env::Environment=ROOTENV, channel::AbstractString="") |
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.
This is a breaking change. You should add:
@deprecate add(pkg::PkgOrPkgs, env::Environment; channel::AbstractString="") add(pkg, env=env, channel=channel)
and similar so that callers using the old API still function, albeit with a warning message.
src/Conda.jl
Outdated
add(pkg,env,channel) | ||
end | ||
|
||
function add(pkg::PkgOrPkgs, env::Environment, channel::AbstractString="") |
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.
Why is this 3-argument version here?
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.
We should just have the keyword version, plus a deprecated 2-arg version, if we want to do this.
Hi. |
Exists doesn't work when you have an environment that's a string, such as if you have a different root environment. The first commit just addresses exists, while the second one adds keyword values inspired by #118.