Skip to content

Fixing exists by adding keywords#167

Draft
dsweber2 wants to merge 3 commits intoJuliaPy:masterfrom
dsweber2:master
Draft

Fixing exists by adding keywords#167
dsweber2 wants to merge 3 commits intoJuliaPy:masterfrom
dsweber2:master

Conversation

@dsweber2
Copy link
Copy Markdown

@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.

Comment thread src/Conda.jl

"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
Copy Markdown
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.

Comment thread src/Conda.jl Outdated
add(pkg,env,channel)
end

function add(pkg::PkgOrPkgs, env::Environment, channel::AbstractString="")
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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

@ViralBShah ViralBShah marked this pull request as draft October 21, 2025 23:50
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