Skip to content

Conversation

eth3lbert
Copy link
Contributor

This the follow-up PR to #10819 for the release_tracks part. :D

@eth3lbert eth3lbert added C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works A-backend ⚙️ labels Mar 13, 2025
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.

ah, I see. I thought you wanted to move the entire release tracks calculation into the database 😅

@Turbo87 Turbo87 merged commit 99101c7 into rust-lang:main Mar 14, 2025
9 checks passed
@eth3lbert
Copy link
Contributor Author

ah, I see. I thought you wanted to move the entire release tracks calculation into the database 😅

ha, I actually experimented with this locally, and it is indeed doable. However, I chose to implement it as a simple start.
We can revisit this part after you get back from vacation! Btw, enjoy your vacation, have a great time :D

@eth3lbert eth3lbert deleted the semver-ord-release-tracks branch March 14, 2025 08:23
@eth3lbert
Copy link
Contributor Author

eth3lbert commented Mar 14, 2025

I actually experimented with this locally, and it is indeed doable.

This is something I tried locally:

SELECT DISTINCT ON (rt_name) num
FROM (
    SELECT num,
           semver_ord,
           -- CASE WHEN left(num, 1) = '0' THEN '.' || split_part(num, '.', 2)
           --     ELSE split_part(num, '.', 1)
           -- END AS rt_name,
           CASE WHEN left(num, 1) = '0' THEN array[0, split_part(num, '.', 2)::int]
                ELSE array[1, split_part(num, '.', 1)::int]
           END AS rt_name
    FROM versions
    WHERE crate_id = (SELECT id FROM crates WHERE name = 'rand_core')
        AND NOT yanked -- no yanked
        AND semver_ord[3] = '{}' -- no pre-release
) t
ORDER BY rt_name DESC, semver_ord DESC;

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