-
Notifications
You must be signed in to change notification settings - Fork 1
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
Annotation arguments + small build fixes (depends on #44) #46
Conversation
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.
These changes LGTM. I think enforcing variable annotation is a good idea (instead of being loose and checking them in debug mode only)
@dtebbs - what subtle errors are you referring to in your PR description?
Namely that its possible to use some constructors / functions exactly as the interface allows, for the code to compile and run in some configuration, but then to later fail in another configuration with a cryptic error message (referring to a parameter not even specified). In general, we then need to see the callstack to find where the problem is. |
The |
I see. Yes good point about surrounding the |
Yes, I think this would make sense at some point. AFAIK, UPDATE: added a comment in #21 |
Marking this WIP again. I'll combine with #47 to address the issues mentioned there. |
1fc3cb1
to
a7b3303
Compare
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.
LGTM - just a tiny comment typo to fix and I'll merge.
libsnark/gadgetlib1/gadget.tcc
Outdated
@@ -16,6 +16,8 @@ gadget<FieldT>::gadget( | |||
protoboard<FieldT> &pb, const std::string &annotation_prefix) | |||
: pb(pb), annotation_prefix(annotation_prefix) | |||
{ | |||
// Anotations may appear as "" (even if set by the calling code) unless |
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.
Annotations
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.
Thanks. Should be fixed.
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.
LGTM
Along with some small build issues, fixes the mismatch between asserts on variable annotations (e.g.
assert(annotation != "")
) and the default parameters (e.g.annotation = ""
) which is highly confusing and can cause annoying errors.Partially addresses issue #21.