-
Notifications
You must be signed in to change notification settings - Fork 326
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
New fuzzy matching #7381
New fuzzy matching #7381
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.
on the js side it's just the package-lock.json change again
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.
The code is good to land except I miss some documentation here and there, and I'm worrying the potentially exponential cost of the matching algorithm. I can propose an alternative one to discuss in a separate issue.
lib/rust/fuzzly/src/lib.rs
Outdated
let mut states = cast_lifetime(core::mem::take(&mut self.states_buffer)); | ||
let mut next_states = cast_lifetime(core::mem::take(&mut self.states_buffer)); |
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.
If we take the value second time, it will always be just default. It seems that you meant &mut self.next_states_buffer
.
I wanted to ask for test checking this, but I realize it's actually impossible :) as you cannot test how many vector allocations are there.
Or can we?
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 don't see any good way to test such a thing in unit tests, but it would have come up in profiling (eventually).
And the last thing
|
@farmaazon Was this intended to be posted somewhere else? |
|
Ah, that broke in merge. The new label format will need some additional logic to locate the matched string in the displayed string... |
Highlighting is fixed for the new label format, so given that sorting looks good I think we're ready for merge. |
Pull Request Description
Implements #7046.
Important Notes
fuzzly
test cases for examples of matching/non-matching cases.Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
./run ide build
.