Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

dsweber2
Copy link

@dsweber2 dsweber2 commented Feb 6, 2020

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.

@@ -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="")
Copy link
Member

@stevengj stevengj Feb 8, 2020

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="")
Copy link
Member

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?

Copy link
Member

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.

@fatteneder
Copy link

Hi.
I ran into this issue today. May I ask what is the status of the proposed fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants