Skip to content

chore: Remove dep on derivative#7133

Merged
charliermarsh merged 2 commits intoastral-sh:mainfrom
bearcove:no-derivative
Sep 6, 2024
Merged

chore: Remove dep on derivative#7133
charliermarsh merged 2 commits intoastral-sh:mainfrom
bearcove:no-derivative

Conversation

@fasterthanlime
Copy link
Contributor

(This is part of #5711)

Summary

@BurntSushi and I spotted that the derivative crate is only used for one enum in the entire codebase — however, it's a proc macro, and we pay for the cost of (re)compiling it in many different contexts.

This replaces it with a private Inner core which uses the regular std derive macros — inlining and optimizations should make this equivalent to the other implementation, and not too hard to maintain hopefully (versus a manual impl of PartialEq and Hash which have to be kept in sync.)

Test Plan

Trust CI?

@zanieb zanieb added the internal A refactor or improvement that is not user-facing label Sep 6, 2024
Copy link
Member

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

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

Makes sense to me! Thank you!

@charliermarsh charliermarsh merged commit 5e1b9b1 into astral-sh:main Sep 6, 2024
@fasterthanlime
Copy link
Contributor Author

CleanShot 2024-09-07 at 00 17 44@2x

Was the windows test suite broken by one of the "temp dir in dev dir" PRs we landed recently?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal A refactor or improvement that is not user-facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants