FEAT: Add hasher parsing support - #370
Closed
AntoxaBarin wants to merge 9 commits into
Closed
Conversation
AntoxaBarin
marked this pull request as draft
July 20, 2025 20:25
AntoxaBarin
marked this pull request as ready for review
July 20, 2025 20:36
Comment on lines
+73
to
+74
| LOG_WARN(fmt::format("Unknown hasher type: {}", hasher_value)); | ||
| return std::make_unique<sim::BaseHasher>(); |
Collaborator
There was a problem hiding this comment.
I think its better to throw error here:
Suggested change
| LOG_WARN(fmt::format("Unknown hasher type: {}", hasher_value)); | |
| return std::make_unique<sim::BaseHasher>(); | |
| throw std::runtime_error(fmt::format("Unsupported hasher type: {}", hasher_value)); |
Contributor
There was a problem hiding this comment.
Do we really want to force user to specify hasher? I think it would be more convenient to just set some default value if hasher is not specified and write some warining log, as suggested above
Collaborator
There was a problem hiding this comment.
We have 'parse_with_default', so yes
Az3git
reviewed
Jul 22, 2025
If there is no 'hasher' field in config, use BasicHasher
| std::shared_ptr<HostType> ptr = | ||
| IdentifieableParser<HostType>::parse_and_registrate( | ||
| key_node, val_node); | ||
| key_node, val_node, std::move(parsed_hasher)); |
Collaborator
There was a problem hiding this comment.
You may move field parsed_hasher more than one time. Please, change the architecture
Collaborator
|
Closed until parsing refactoring |
This file contains hidden or 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
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.
closes #373