Skip to content

How to get a list of all non-yanked available versions of a package? #4723

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

Closed
Frederick888 opened this issue Nov 14, 2017 · 4 comments
Closed

Comments

@Frederick888
Copy link
Contributor

I was trying to fix kbknapp/cargo-outdated#101 and found that it might be a bit tricky to get a list of all non-yanked available versions of a package.

Because I would also like to get the pre-releases, wildcard requirement "*" does not work for me. Currently I'm using:

let dependency = Dependency::parse_no_deprecated(name, None, source_id)?;
let query_result = source.query_vec(&dependency)?;

...but Summary does not have an API like Summary::is_yanked() which could allow me to filter out those yanked ones.

Is there a workaround of this issue?

@lukaslueg
Copy link
Contributor

Same as #4679 ?!

@Frederick888
Copy link
Contributor Author

@lukaslueg Related but not the same. #4679 kinda suggests completely hiding yanked packages from Registry::query_vec() results, on the other hand here I'm actually asking for a way to access more fields in the crates.io API results (e.g. quickcheck). But it seems that (surprisingly) neither cargo nor crates-io provides such a functionality?

IMO it might be better to have another layer between query_vec() and Summary so it can serve as the returned results of query_vec() and allows developers to access more fields of crates-io API results.

@stale
Copy link

stale bot commented Sep 19, 2018

As there hasn't been any activity here in over 6 months I've marked this as stale and if no further activity happens for 7 days I will close it.

I'm a bot so this may be in error! If this issue should remain open, could someone (the author, a team member, or any interested party) please comment to that effect?

The team would be especially grateful if such a comment included details such as:

  • Is this still relevant?
  • If so, what is blocking it?
  • Is it known what could be done to help move this forward?

Thank you for contributing!

(The cargo team is currently evaluating the use of Stale bot, and using #6035 as the tracking issue to gather feedback.)

If you're reading this comment from the distant future, fear not if this was closed automatically. If you believe it's still an issue please leave a comment and a team member can reopen this issue. Opening a new issue is also acceptable!

@stale stale bot added the stale label Sep 19, 2018
@stale
Copy link

stale bot commented Oct 19, 2018

As I didn't see any updates in 30 days I'm going to close this. Please see the previous comment for more information!

@stale stale bot closed this as completed Oct 19, 2018
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

2 participants