-
Notifications
You must be signed in to change notification settings - Fork 42
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
Allow nested parsers on MessageProducer level (v3) #2084
base: master
Are you sure you want to change the base?
Conversation
* Dependencies of DLT and SomeIP changed to Kevin forks * Code copied in the positions form Kevin's PR except section
* Replace `Display` trait bound with `to_text()` method which can fail * Add check for trait to explicitly tell if their parsing can fail at compile time. * Reaction on these Errors still missing in processors.
* Implement Error Resolver on sessions to try parsing failed parse items depending on ErrorHint from the error * Saving unresolved to a store isn't implemented. * Add inline attribute to can_error to make sure the compiler will figure out this condition at compile time.
* Add more comment to the section where we are writing to a string about error handling + ignore the error instead of panicking. * Clippy fixes
Set used Error parsing functions in one module to be shared in indexer CLI too.
* Check for constant bool `CAN_ERROR` directly method without the need to an extra method to access it. * Remove the unneeded inline method
I still think this kind of solutions should be implemented only if the standard case of processing the log is with various nested parsers. Otherwise, |
f86262a
to
3abb654
Compare
@AmmarAbouZor thanks much for the possible solution. Here is a short summary by all current variants
|
Hi @DmitryAstafyev, thanks for the useful summery for the three approaches. I think I may have a small remark on scope of V3 because this solution actually replaces |
* Resolving log messages provides an enum with text or template which need to be resolved. * Sessions can try to resolve all the chunks from the templates * Faulty messages are removed for now to keep the focus here on multiple parsers. * Renaming modules, types and methods
3abb654
to
6df3299
Compare
This PR isn't for to be merged. It's a suggestion in the scope of work on #2073 and #2078
It's inspired the suggestion in #2071
LogMessage
doesn't implementDisplay
anymore. Instead, it has the methodtry_resolve()
which can provide an enum of either a text message if the message can be resolved or a template of resolved and unresolved chunks when a full resolve isn't possible + Resolve hints for the session to know which method should be provided to resovle the rest of the chunks.ParseRestResolver
struct which can try to resolved the rest unresolved chunks in the templates depending on the error hint, by having a SomeIP parser in the case of SomeIP Error hint.Here are basic benchmarks for the three PRs to solve the DLT with SomeIP case: