-
Notifications
You must be signed in to change notification settings - Fork 59
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
Implement generic log #238
Conversation
This is great! Can you screenshot an example to see that it's working? Also what is the error when you pass multiple arguments? I thought it would work :o |
These screenshots are generated by running tests from When you pass multiple arguments to
I think these checks cannot be skipped because it will be required for the generic |
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 looks great!
I left a couple comments. It would be great to recursively print out the array or struct.
src/backends/r1cs/mod.rs
Outdated
} | ||
|
||
// Array | ||
Some(TyKind::Array(_, _)) => { |
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.
Also it could be recursive array.
For example
- [[1, 2],[3, 4]]
- [thing1, thing2] // thing* are structs
So maybe it would be better to recursively print out the elements based on the element's type.
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.
src/backends/r1cs/mod.rs
Outdated
} | ||
|
||
// Custom types | ||
Some(TyKind::Custom { module: _, name: _ }) => { |
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.
Similar to the comment about recursive logging ^
I think it would be better to print out like
Thing1 {
xx: ..
another_thing: {...} recursively print out
arr: [...] // recursively print out
}
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.
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 great!
I add a couple minor comments. Also please resolve the code conflicts so it can be merged.
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.
Cool, thanks!
This PR implements logging of different types for R1CS backend. It is based on PR #231. Currently, the
log
function supports only single argument.