pixi
pixi copied to clipboard
feat: List outdated packages
This is a very rough attempt at being able to show outdated packages (similar to pip list --outdated), but I wanted to get it out there to see if there is interest in developing it further.
Currently it only works for Conda packages, and I don't believe it should have any awareness of which package came from which channel, but it works in a few test cases.
This looks great!
Yeah love the idea! Please continue. Would be awesome to color it yellow if the new version is within the requirements range.
Would be awesome to color it yellow if the new version is within the requirements range.
Are you thinking just for direct dependencies, or for all?
Is there a reasonable way to search for the latest PyPI dependencies as well, or should I throw a warning if there are any PyPI dependencies for now? I was largely cribbing from cli/add.rs and `cli/search.rs
https://github.com/prefix-dev/pixi/blob/82e20a8e039fa14217a07d90fe696055077aba57/src/cli/add.rs#L229-L230
I tried poking around UV's source, but I'm not quite sure where I should start looking.
@abkfenris For uv you can construct a DefaultResolverProvider that takes in some uv specific variables.
This how they construct it in the resolver:
let provider = DefaultResolverProvider::new(
client,
DistributionDatabase::new(build_context.cache(), tags, client, build_context),
flat_index,
tags,
PythonRequirement::new(interpreter, markers),
AllowedYanks::from_manifest(&manifest, markers),
options.exclude_newer,
build_context.no_binary(),
build_context.no_build(),
);
Needs quite some variables, some of which can be taken from the UvResolutionContext that can be constructed from the project. That struct has a method called get_package_versions. Which should be what you are looking for I think.
Are you thinking just for direct dependencies, or for all?
This would only work for the direct once I guess
I'm unlikely to be able to dig back into this for another couple weeks if someone wants to run with it.
Awesome! I've wanted something like this for quite a while. It would be very useful to be able to see which packages aren't the latest versions due to constraints in the environment.