-
Notifications
You must be signed in to change notification settings - Fork 382
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
[BREAKING] support generic API #321
Conversation
|
@aryehlev since there is no reaction from the repository maintainer, have you thought about updating your fork with a description with a headline like:
I think it's an incredibly convenient feature to have a ristretto with generics, so it has the potential of getting some stars. |
Thanks for getting this to our attention. I will review the PR now. Please sign the CLA when you can. |
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.
I think we need to figure out if we want to use pointer to K & V everywhere first. I can review the rest of the PR then. Let me know what you think. Thanks for the PR.
@mangalaman93 thank you for your prompt response and the review. @aryehlev I'm not hasting you at all, but since your PR was created a while ago, there is a chance that your situation and intentions have changed and you no longer want to spend time on this. In this case, please let us know. Maybe someone else will appear who wants to work on the PR. |
@GRbit I think this is a useful PR, worth including. I am gonna slowly look at other PRs too and figure out our release plan. This would a breaking change, so it can only go into next major release etc. In terms of whether the args should be pointers, I think you are right. They shouldn't be pointers. I got confused seeing all these nil checks in the existing code. Could you just go through the rest of my comments and ensure that we are not doing the nil checks anywhere. I can review your PR then again. While we can get the PR ready, let me figure out a release plan too. This could take some time though, just FYI. |
Hey, thank you for the comments. It is definitely a major change and will only work with go 1.18 and up so I am not sure how you will want to release this. |
Luckily it's 1.12 already, so versions could e used to solve this issue. Though, people who update their libraries as a rule of thumb update Go version as well.
It's great to see activity here, even if it takes time. Thank you for all your time and efforts, it's really appreciated. |
We have upgraded badger and dgraph to Go 1.19, we should be able to do that for ristretto too while we do the next major release. It should be fine to test the PR with the same. |
Let me know if you are facing any challenge resolving conflicts. |
# Conflicts: # cache.go # cache_test.go # go.mod # policy.go # ttl.go # z/z.go
i think i now resolved all conflicts, please go over the code if u can |
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.
A few more comments. I will ask more engineers to review this PR.
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.
Hi @aryehlev, just a couple of minor comments and we are good to merge. Thanks for all the work.
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.
Looks good to me now! Thank you so much for all the work. I see one typo/spell error, I thought you had fixed it. Could you check that again please? I also want to get more reviews on this, let me see who is available.
I would like to congratulate @aryehlev on getting this PR approved and thank you both for your work! This was a long PR and it was nice to see it get this far! |
No description provided.