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

[Build] Modified the RIDs sorted in descending order #6539

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

JongHeonChoi
Copy link
Contributor

Before :

9.0.0:8.0.0:7.0.0:6.5.0:6.0.0:5.5.0:5.0.0:4.0.0:10.0.0

After :

10.0.0:9.0.0:8.0.0:7.0.0:6.5.0:6.0.0:5.5.0:5.0.0:4.0.0


rid_list = list(set(rid_list))
rid_list.sort(reverse=True)
if len(key) == 5:
Copy link
Member

@JoonghyunCho JoonghyunCho Jan 3, 2025

Choose a reason for hiding this comment

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

It doesn't seem like good idea to use the string count of rid(9.0.0) to sort 10.0.0.
How about adding a function to make rid as integer group([10, 0, 0]) and compare rid as integer.
This will help increase maintainability for future rid, for example 11.0.0, 12.0.0, etc.

def parse_rid_as_int(rid):
    return [int(part) for part in rid.split(".")]
...
#rid_list.sort(reverse=True) <- instead of using sort
rid_list = sorted(rid_list, key=parse_rid_as_int, reverse=True)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for your good idea.

Copy link
Member

@JoonghyunCho JoonghyunCho left a comment

Choose a reason for hiding this comment

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

Thanks for update :)

@JoonghyunCho JoonghyunCho merged commit e5524b0 into Samsung:main Jan 6, 2025
3 checks passed
lwc0917 pushed a commit to lwc0917/TizenFX that referenced this pull request Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants