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

To do: ignore indirect dependencies on CondaPkg #112

Open
Tracked by #63
cjdoris opened this issue Oct 18, 2023 · 0 comments
Open
Tracked by #63

To do: ignore indirect dependencies on CondaPkg #112

cjdoris opened this issue Oct 18, 2023 · 0 comments
Assignees
Milestone

Comments

@cjdoris
Copy link
Collaborator

cjdoris commented Oct 18, 2023

Currently CondaPkg reads CondaPkg.toml files for any package which depends directly or indirectly on CondaPkg.

Should we only read dependencies from direct dependents? I think yes.

Why? Indirect dependencies are not normally considered API - i.e. if PkgA depends on PkgB depends on CondaPkg, the PkgA should not rely on PkgB always depending on CondaPkg - it may decide to use something else in a future version. It also means that a breaking release of CondaPkg can safely change the format of CondaPkg.toml (or use a different file entirely) without needing to support the old format. I'm not anticipating any such breaking change, but you never know!

This would require simply changing the line

for env in [proj; [p.source for p in values(Pkg.dependencies())]]
to filter packages with p.is_direct_dep.

  • This will be a breaking change, so is a good candidate for v1.
  • The behaviour (either way) needs to be documented.
  • Functions such as add and status should check if the project depends on CondaPkg and print a warning if not.
@cjdoris cjdoris mentioned this issue Oct 18, 2023
5 tasks
@cjdoris cjdoris self-assigned this Oct 21, 2023
@cjdoris cjdoris added this to the v1 milestone Oct 21, 2023
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

No branches or pull requests

1 participant