Skip to content

Conversation

@eth3lbert
Copy link
Contributor

While #10344 is merged, we currently include the default_version. Ideally, we should not load all versions for the index/version page. However, there are still some blockers. One blocker is VersionDownload due to its belongsTo relationship with version. This requires us to wait for versions to be loaded before loading downloads.
This PR aims to add an include mode to the GET /api/v1/crates/{name}/downloads endpoint. This allows it to include the related versions and avoids the need to wait for versions to be fully loaded in app.

@eth3lbert eth3lbert force-pushed the download-include-versions branch 2 times, most recently from ffadb14 to 781715a Compare February 7, 2025 17:05
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The versions should only be used to display the count on the crate page. Therefore, I think it should be safe to remove this test case. Let me know if this is inappropriate.

@Turbo87 Turbo87 added C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works A-backend ⚙️ labels Feb 10, 2025
@eth3lbert eth3lbert force-pushed the download-include-versions branch from 781715a to 6124efd Compare February 13, 2025 11:25
@eth3lbert eth3lbert requested a review from Turbo87 February 14, 2025 16:07
Copy link
Member

@Turbo87 Turbo87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's give this a try :)

@Turbo87 Turbo87 merged commit 5b5fd9d into rust-lang:main Feb 15, 2025
11 checks passed
@eth3lbert eth3lbert deleted the download-include-versions branch February 15, 2025 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-backend ⚙️ C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants