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

Licenses are displayed as None #109

Open
jwodder opened this issue Jul 7, 2022 · 1 comment
Open

Licenses are displayed as None #109

jwodder opened this issue Jul 7, 2022 · 1 comment

Comments

@jwodder
Copy link

jwodder commented Jul 7, 2022

I just installed cargo-show v0.5.9, and no matter what crate I view with it, the license is always displayed as None. For example, despite clap's crates.io page saying it's licensed under MIT or Apache-2.0, cargo show clap gives:

---
id: clap
name: clap
description: A simple to use, efficient, and full-featured Command Line Argument Parser
documentation: None
homepage: None
repository: https://github.com/clap-rs/clap
max_version: 3.2.8
downloads: 63587041
license: None
created: 2015-03-01T01:17:24.903018+00:00
updated: 2022-06-30T13:26:01.537514+00:00
@g-k
Copy link
Owner

g-k commented Jan 4, 2024

Interesting!

Screenshot 2024-01-04 at 9 37 28 AM
  • cargo show is using the crate key from API endpoint https://crates.io/api/v1/crates/clap response, but it doesn't include the license key (the unofficial API might've changed?)

  • clap's license changes from null to MIT to MIT or Apache-2.0 in the API response the versions field (cargo show --json clap | jq -c '.versions[] | {num: .num, license: .license}')

I'll try to find some time to update cargo show to use metadata from the most recent version to match crates.io behavior. IMO that would surprise people the least.

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