Skip to content

Use rlang::hash instead of digest #4853

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

Merged
merged 4 commits into from
May 25, 2022
Merged

Use rlang::hash instead of digest #4853

merged 4 commits into from
May 25, 2022

Conversation

thomasp85
Copy link
Member

Fix #4458

This PR removes the digest dependencies in favour of rlang::hash().

Since guides are sorted by their hash value and the hash value changes it can lead to changes in the automatic ordering of legends, as reflected in the change in visual tests. Since we make no promises on how they are sorted I think this is fine but should of course be communicated

@thomasp85 thomasp85 requested a review from yutannihilation May 20, 2022 08:36
@yutannihilation
Copy link
Member

Looks good, and I agree with you on this point,

Since we make no promises on how they are sorted

however, IIUC, the legend order had been consistent for this 11 years (since the this first commit?: 0795c6f), which sounds long enough to make the users assume the behavior would never change. So, I think the NEWS item should have a bit more words (probably including how to determine the order manually by guide_*(order = )?), although this change isn't so "breaking"

@thomasp85
Copy link
Member Author

@yutannihilation I've improved the news bullet - it will be part of the "Breaking Changes" section in the news once we polish it prior to release

Copy link
Member

@yutannihilation yutannihilation left a comment

Choose a reason for hiding this comment

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

Thanks, looks good!

@thomasp85 thomasp85 merged commit 50e917a into main May 25, 2022
@thomasp85 thomasp85 deleted the issue-4458-rlang-hash branch May 25, 2022 07:32
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.

Switch digest::digest() to rlang::hash()?
2 participants