-
Notifications
You must be signed in to change notification settings - Fork 1k
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
#640: Add BITFIELD_RO command #956
#640: Add BITFIELD_RO command #956
Conversation
Hey @JyotinderSingh @lucifercr07 @apoorvyadav1111 , please review this PR for adding BITFIELD_RO command. |
Hi @iamskp11 , Thanks for the changes. I have some suggestions regarding refactoring the code for both evals to ensure consistency in any future modifications in one. I ll be reviewing the code thoroughly in the morning and comment the suggestions, if you would consider them. |
Sure @apoorvyadav1111 . |
Yes I had similar in mind. Although we can have two functions; one to parse ops and another to run ops. The one which parses ops need the flag. The one which runs it will not will execute the ops irrespective of the type of command . |
Didn't get this @apoorvyadav1111 . I think parsing ops function should not worry about command/flag. Let that parse the ops, and if we get update/set commands, we can throw error if it is with RO flag. |
Hey @apoorvyadav1111 @JyotinderSingh @lucifercr07 , can you have a look at #994 , and review it. It uses a generic method for BITFIELD and BITFIELD_RO commands, with a flag for allowing only GET subcommand. |
Hi @iamskp11 , the idea is to change the current bitfield and bitfield_ro commands into :
With these changes, pseudocode for bitfield would be:
and bitfield_ro would be:
You can make changes according to when you refactor them. The idea is to reuse the logic in bitfield. Apoorv |
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, let's improve the bitfield and bitfield_ro as discussed. We can connect over discord to discuss more.
@apoorvyadav1111 , thats great. Now, I got your idea. Will share the PR soon. Thanks a lot! |
Hi @iamskp11 , let me take a look at 994 before you create another PR. I just glanced it and it might work as well. I just want to ensure efforts are not wasted if 994 looks good |
Hey @apoorvyadav1111 , have done the changes as per your suggestion. Integration and unit tests work fine for both BITFIELD and BITFIELD_RO. Please review. |
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, the code looks good to me and is what I had in mind. Regarding moving parsing functions to utils, I am not sure. Maybe @JyotinderSingh can share his views on this. In any case, it should be a small change even if we move the code back to eval.go.
Thanks for taking up my suggestion.
Apoorv
Have done the function name changes , @JyotinderSingh . PR is now ready for review |
Hi @iamskp11 , Please respond and resolve the review comments from @JyotinderSingh . |
Hi @apoorvyadav1111 , have done that in my previous commit. It's ready for review. b4601ac |
This PR closes #640 - BITFIELD_RO command.