-
Notifications
You must be signed in to change notification settings - Fork 579
feat!: remove context from NoteEmission methods #17024
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
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.
Extremely nice change 🤩
Nico very smort
|
It turns out returning references (or structs holding references) from an if expression is not allowed. Now that To address that, I created an internal auxiliary if !is_initialized {
self.initialize(init_note).strip_context()
} else {
self.replace(transform_fn).strip_context()
}
.attach_context(self.context)This is fine to do because the context in |
f82194c to
a99f70e
Compare
|
I updated |
In discussing how to improve developer experience by getting rid of the `context` object as much as possible, I realized some of it is quite low hanging fruit. We can take a similar approach to the `storage` object and have the aztec-nr intermediate structs keep references to the context, resulting in the end-user invoking methods that already reference the context instead of having to manually provide it. The diff speaks for itself. Closes https://linear.app/aztec-labs/issue/F-109/remove-context-when-delivering-messages. Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
4ad88c6 to
93e81cc
Compare
Flakey Tests🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
In discussing how to improve developer experience by getting rid of the
contextobject as much as possible, I realized some of it is quite low hanging fruit. We can take a similar approach to thestorageobject and have the aztec-nr intermediate structs keep references to the context, resulting in the end-user invoking methods that already reference the context instead of having to manually provide it. The diff speaks for itself.Closes https://linear.app/aztec-labs/issue/F-109/remove-context-when-delivering-messages.