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
caching_session: use custom hasher instead of ahash in tests #625
Conversation
Please rebase on top of latest |
119228a
to
4040880
Compare
@cvybhu rebased, ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit: the commit message could mention the motivation for the change (was it that clippy crashes when trying to analyse ahash
?)
Currently, we are importing the `ahash` crate for only one reason: to test that CachingSession works with custom hasher implementations. The custom hasher quality doesn't matter at all in this test, so it's very easy to write own implementation for testing purposes, rendering the dependency on `ahash` obsolete. The change was prompted by a report from one of our users which use a fork of the driver and managed to trigger a bug in cargo - most likely this one: scylladb#625 . The most likely cause was that the project specified a different, non-compatible version of ahash in the dependencies than the one in scylla's dev-dependencies. While it doesn't fix the cargo bug and it can still happen with other dev-dependencies, the bug should no longer happen with conflicting `ahash`. Moreover, removing an unneeded depdencency from a project is a good motivation in itself.
4040880
to
cb97feb
Compare
@avelanarius No, it was actually a bug in cargo's resolver which can prevent a dependent project from building at all. Added more info to the commit description. |
Currently, we are importing the `ahash` crate for only one reason: to test that CachingSession works with custom hasher implementations. The custom hasher quality doesn't matter at all in this test, so it's very easy to write own implementation for testing purposes, rendering the dependency on `ahash` obsolete. The change was prompted by a report from one of our users which use a fork of the driver and managed to trigger a bug in cargo - most likely this one: rust-lang/cargo#7463 . The most likely cause was that the project specified a different, non-compatible version of ahash in the dependencies than the one in scylla's dev-dependencies. While it doesn't fix the cargo bug and it can still happen with other dev-dependencies, the bug should no longer happen with conflicting `ahash`. Moreover, removing an unneeded depdencency from a project is a good motivation in itself.
cb97feb
to
51bcc2c
Compare
In the updated commit message:
Shouldn't the link lead somewhere else? |
Yes, I realized that and already pushed a commit with corrected message. |
@cvybhu ping |
Currently, we are importing the
ahash
crate for only one reason: to test that CachingSession works with custom hasher implementations. The custom hasher quality doesn't matter at all in this test, so it's very easy to write own implementation for testing purposes, rendering the dependency onahash
obsolete.The change was prompted by a report from one of our users which use a fork of the driver and managed to trigger a bug in cargo - most likely this one: rust-lang/cargo#7463 . The most likely cause was that the project specified a different, non-compatible version of ahash in the dependencies than the one in scylla's dev-dependencies. While it doesn't fix the cargo bug and it can still happen with other dev-dependencies, the bug should no longer happen with conflicting
ahash
. Moreover, removing an unneeded depdencency from a project is a good motivation in itself.Pre-review checklist
I added relevant tests for new features and bug fixes.I added appropriateFixes:
annotations to PR description.