-
Notifications
You must be signed in to change notification settings - Fork 17
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
Filterx handle unknown function arguments #153
Merged
alltilla
merged 21 commits into
axoflow:main
from
bazsi:filterx-handle-unknown-function-arguments
Jun 10, 2024
Merged
Filterx handle unknown function arguments #153
alltilla
merged 21 commits into
axoflow:main
from
bazsi:filterx-handle-unknown-function-arguments
Jun 10, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bazsi
force-pushed
the
filterx-handle-unknown-function-arguments
branch
2 times, most recently
from
June 8, 2024 09:59
54479d2
to
5adc196
Compare
bazsi
changed the title
WIP: Filterx handle unknown function arguments
Filterx handle unknown function arguments
Jun 8, 2024
bazsi
force-pushed
the
filterx-handle-unknown-function-arguments
branch
2 times, most recently
from
June 9, 2024 08:17
0ca56f0
to
fe4afd1
Compare
alltilla
reviewed
Jun 10, 2024
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.
I only have one rebase related comment, otherwise LGTM.
Thanks for this!
modules/examples/filterx/example-filterx-func/example-filterx-func-plugin.c
Show resolved
Hide resolved
This fixes a problem where the documentation link is not printed in case CHECK_ERROR_WITHOUT_MESSAGE() is used in the main grammar. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Improve error reporting by highlighting the actual error message a bit more. The error message was printed at the end of the startup log which may not be visible enough. Leave an empty line to make sure it is easy to notice for the user. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
This is an alternative to the normal push_error() function which takes a string as an extra detail to the error instead of an object. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…context This only happens in unit test programs. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
object related functions (such as type casts) are tied to FilterXExpr anyway, so let's declare the type at least, as there's an inherent interdependency between them. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…of just the expr Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Instead of a list use a pointer array. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
So far function_name was only saved and not displayed, but whenever we display it, adding () at the end helps users recognize this is a function. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…nt is null The simple function framework already ensures that all arguments are non-null, so don't double-check them, as it adds another error path and increases cognitive load. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Simple functions are just callbacks which were simply cast to an untyped pointer, making it difficult to change their prototype. By introducing a type-safe framework, we will at least get a warning from the compiler when there's a function prototype mismatch. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Instead of calling the filterx-exposed simple function, add a wrapper that removes this complexity. btw, we should probably swap these two functions, provide a low-level constructor and a filterx simple function on top of it. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…dation This patch does two things: 1) adds FilterXExpr * argument to all simple functions 2) changes msg_error() style error handling to filterx style Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
alltilla
force-pushed
the
filterx-handle-unknown-function-arguments
branch
from
June 10, 2024 08:14
1bd9dda
to
4d2bcfb
Compare
alltilla
approved these changes
Jun 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This branch implements the handling of incorrect filterx function arguments, and also improves error handling aesthetics in multiple ways.
Here's a list of user-visible changes:
Internal changes: