-
Notifications
You must be signed in to change notification settings - Fork 170
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
Support redis versioning #424
base: main
Are you sure you want to change the base?
Conversation
please add:
|
note/TODO to self: just noticed that ninja is not happy with this cmake file while |
okay. above TODO is fixed now. It works with ninja now. I think I tried this approach earlier also but it was stymied by the pthread bug that I pushed a fix for above. This time I was careful and tracked it down; so, one shot, two bugs ;) |
ok, is this ready to merge? it looks fine to me. you've tested it out I assume? if all is ready, please squash |
i need to add a couple of things you mentioned above (redis tests, etc.). Will let you know when done. |
what's status of this pr? |
this turned out to be much more complicated than i anticipated. It works on my desktop computer and fails intermittently on my laptop. There are some CI failures as well where it doesn't work. Turns out i need to give it another look (i am just avoiding this problem for now to have a look at it from fresh perspective in coming weeks). the problem remaining is the same: ninja doesn't like the way i am doing header generation in cmake and compiles the C++ file, which depend on the generated header, before generating the header. |
ok thanks |
Okay. So I changed this and now we set the new key in the redis database equal to the "argument names" passed to the command line. Eg: if you invoke souper with following command line:
we will construct the following key out of it (let's call it and then we will check if key named Note that Let me know if this works. |
8eb1626
to
39435b8
Compare
default: return false; | ||
} | ||
|
||
return true; |
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.
this line is dead code, please remove
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.
this is not a dead code.
- note that REDIS_REPLY_NIL and REDIS_REPLY_STRING don't return anything when things are compatible --- they just break out of the switch case and let this statement return true.
- Even if I put return statements to return true as described in (1), compiler will emit warning saying that control reaches end of non-void statement as we don't disable
Wreturn-type
from our CMake config (which is fine).
|
Pretty sure. The CommandLine library exposes |
so you're saying you can't do the getValue() thing suggested here? |
if it's not practical to make that work, I think you'll need to make a list of options that have interesting stuff on the RHS and look for those specifically. like the number of synthesis components, this totally matters, that sort of thing is the whole reason for the cache tags, it really doesn't make sense to do this and leave those out. |
|
yeah, that's true. I will think of something. Since it's clear now that the current patch is not sufficient, I will think more about it |
as we discussed in the last meeting, i went ahead with whitelisting some of the synthesis options. Now it includes values of the options a well. It should be easy whitelist new options. |
what's the status of this? |
Stores a new key "version" in redis db which contains the git hash
souper was built with (or timestamp if git hash is unavailable). If git
hash of souper matches value of "version" in redis db during connection,
all is good. If it doesn't matches, we error out. If no "version" key
matches, we put current souper version in the redis database and warn
the user that results might be incorrect.