helix-editor / nucleo

A fast and convenient fuzzy matcher library for rust
Mozilla Public License 2.0
896 stars 28 forks source link

consider using release tags and a changelog #15

Closed extrawurst closed 1 year ago

extrawurst commented 1 year ago

I am considering using nucleo in gitui as it draws nice speed improvements but I would feel better if the crate would make it easier to figure out what changed from a release to another, two tings mainly helping with that:

pascalkuthe commented 1 year ago

Thanks for your interest in nucleo. The reason these things don't exist yet is that I haven't really published nucleo yet. The only reason there is a crates.io release is so we can merge the PR into helix for the next release (package managers don't like us using git dependencies) and to avoid typo squatting. I even added a disclaimer to the top of the README published to crates.io for that reason:

Disclaimer: An 0.1 version has been published to crates.io. This allows us to merge the nucleo integration into helix. However, the public API is not yet final and will likely change quite a bit in the next release. The documentation is also not yet complete

The implementation itself should be stable and work well but I am not quite committed tl the API yet and want to do some code cleanup. There is a also a need for a lot more documentation and potentially some slightly higher level API in the nucleo-matcher crate.

There seems to be a lot more interest than I anticipated to use nucleo-matcher instead of the high level API (maybe because it's harder to use, or because of the extra dependencies). The current nucleo-matcher API is pretty barebones and quite low level (on purpose). It's most notably not a drop in replacement for the fuzzy-matcher crate. It doesn't handle smart case and even expects the caller to do their own care foldng for the query (for example the PR you linked will panic in debug mode). I also think that most users will want to match words individually (like the high level API/fzf do).

Ultimately I want to retain this lower level APi because it can still be useful for some use cases but I may potentially move the Pattern API there which handles case folding, unicode normalization and can also handle word segmentation. That API will likely see some changes tough.

I am currently very busy professionally and still have to spend cycels on helix to avoid us getting a huge backlog there (we also have a release coming up) so I had to put this a bit on the backburner. Once I get around to fishing these outstanding items I would ofcourse maintain tags/changelog etc. and announce the crate on reddit/the rust user forum

pascalkuthe commented 1 year ago

Hmm maybe I will try to polish up the nucleo-matcher crate soon. The lower level AP is pretty complete and just needs those convenience functions and a couple extra docs. That would unblock people that want to transition from fuzzy-matchers

pascalkuthe commented 1 year ago

nucleo 0.2.0 has been released and should be ready for general use, I will make an announcement after the helix PR lands