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

Add Sort.keyComparator for specifying a comparator with key #25852

Merged
merged 6 commits into from
Sep 3, 2024

Conversation

jabraham17
Copy link
Member

@jabraham17 jabraham17 commented Aug 30, 2024

Adds the keyComparator interface to the Sort module. This deprecates the old way of defining comparators with key methods.

Implements part of #25553

Testing

  • built and checked docs
  • paratest with/without comm

[Reviewed by @lydia-duncan]

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature. The key has been revoked.
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
@jabraham17 jabraham17 marked this pull request as ready for review September 3, 2024 18:12
@lydia-duncan lydia-duncan self-requested a review September 3, 2024 18:17
Copy link
Member

@lydia-duncan lydia-duncan left a comment

Choose a reason for hiding this comment

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

I have error message nits given how things appear in the test updates

Signed-off-by: Jade Abraham <[email protected]>
…omparator special method

Signed-off-by: Jade Abraham <[email protected]>
@jabraham17 jabraham17 merged commit ed609a5 into chapel-lang:main Sep 3, 2024
7 checks passed
@jabraham17 jabraham17 deleted the add-keyComparator branch September 3, 2024 21:56
ShreyasKhandekar added a commit to ShreyasKhandekar/chapel that referenced this pull request Sep 18, 2024
Update the sort module documentation based on the work done in the sort module stabilization subteam.

On a high level
- Added a short intro with a few examples of using `proc sort`, before this change it was a bit wierd to just see Comparators as the first thing in the sort module docs.
- Edited the comparators section to mention the new prescribed way to create and use custom comparators using the newly created interfaces.
- Went over the rest of the doc to update other things that have changed like argument names

This includes work done in the following PRs:

    chapel-lang#25863
    chapel-lang#25852
    chapel-lang#25821
    chapel-lang#25817
    chapel-lang#25813
    chapel-lang#25807
    chapel-lang#25705
    chapel-lang#25703
    chapel-lang#25699
    chapel-lang#25698
    chapel-lang#25586

Signed-off-by: Shreyas Khandekar <[email protected]>
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

Successfully merging this pull request may close these issues.

None yet

2 participants