-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Raise warnings when for DNS events that are not raised due to p_all_addl #4155
base: master
Are you sure you want to change the base?
Conversation
…p_all_addl By default, dns_skip_all_addl is set to false. This causes several events to not be raised. This change emits warnings when a user defines event handlers for events that will not be raised. Furthermore, it adds notes about this behavior to the documentation. We also introduce a new BIF, `is_event_handled`, which checks if an event is handled. Fixes GH-4061
testing/btest/Baseline/scripts.base.protocols.dns.event-handler-warning/.stderr
Show resolved
Hide resolved
This commit addresses review feedback for DH-4155. Furthermore it fixes test failures, and adds a new test for the is_event_handled bif.
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.
Approving. There's one more test failure about ZAM BiF tracking.
Some background how to fix is here: #4105
@vpax - could we treat unknown BiFs as having side-effects by default and keep some maintenance list outside of the btest infrastructure?
I'm also wondering if annotating functions with &pure
or &no_side_effect
or &idempotent
instead would be a bit easier. Not just for us, also for new contributors. In the future, BiFs added by external plugins could also inform ZAM about their attributes/properties this way.
I think that's indeed how they'll be treated. The BTest failure will occur but not the mis-use. Regarding
Likewise sounds fine as long as it's pretty streamlined to figure out when to update it. (That might wind up being equivalent to the current BTest approach, but if you have thoughts for how to do it more readily, great!) |
By default, dns_skip_all_addl is set to false. This causes several events to not be raised. This change emits warnings when a user defines event handlers for events that will not be raised.
Furthermore, it adds notes about this behavior to the documentation. We also introduce a new BIF,
is_event_handled
, which checks if an event is handled.Fixes GH-4061