Giter Site home page Giter Site logo

Comments (6)

natecraddock avatar natecraddock commented on May 29, 2024 1

Hmm, it looks like it is failing in the ziglyph unicode normalizing.

❯ rg . . | zf
thread 6355044 panic: reached unreachable code
???:?:?: 0x1053e903f in _segmenter.CodePoint.CodePointIterator.next (???)
???:?:?: 0x1053ee72b in _normalizer.Normalizer.nfd (???)
???:?:?: 0x1053e11c1 in _main.main (???)
Unwind error at address `zf:0x1053e11c1` (error.InvalidUnwindInfo), trace may be incomplete

???:?:?: 0x7ff7bab1ff8f in ??? (???)
fish: Process 58497, 'zf' from job 1, 'rg . . | zf' terminated by signal SIGABRT (Abort)

Thank you for reporting, I will look into this more

from zf.

natecraddock avatar natecraddock commented on May 29, 2024 1

I also want to note that rg . . outputs over 6 million lines. At least for me (on a decently fast machine) zf is quite slow for filtering this. I do have plans for making zf faster in the future though

While zf does function as a general purpose fuzzy finder, it is specifically designed for filepath matching. Maybe another tool is better for filtering the output of rg . . (which isn't filepaths)? fzf worked well for me

from zf.

natecraddock avatar natecraddock commented on May 29, 2024 1

I made a new release that contains this fix https://github.com/natecraddock/zf/releases/tag/0.9.1

from zf.

natecraddock avatar natecraddock commented on May 29, 2024

Alright, it seems like part of the rg . . output is not valid unicode and ziglyph is assuming the input is valid

❯ rg . . | isutf8 
(standard input): line 80163, char 101, byte 5832237: Expecting bytes in the following ranges: 00..7F C2..F4.

One problematic file is third_party/test262-harness/LICENSE. There are some other files that contain invalid utf8.

Are you building zf from source? Or do you use it packaged from some repository? I'll make a fix to catch this case. If you are using it from one of the repos I'll make a quick patch release

from zf.

doubledup avatar doubledup commented on May 29, 2024

Are you building zf from source?

@natecraddock I'm using the Homebrew package, looks like it's already got the new release. Just updated and the case above is working! Thanks for the quick fix! 🙏

zf ... is specifically designed for filepath matching

I'll bear this in mind, have used fzf for ages but I was exploring other options.

@natecraddock I've found another crash, this time when search for 262licen. Happy to open another issue if you want, but also happy to leave it if you'd rather stick to using zf for filepath matching only.

from zf.

natecraddock avatar natecraddock commented on May 29, 2024

I've found another crash, this time when search for 262licen. Happy to open another issue if you want, but also happy to leave it if you'd rather stick to using zf for filepath matching only.

@doubledup Yes please report. I haven't personally experienced crashes with zf in over a year, so I'm always interested to know what might be broken. And just because you aren't using zf for a filepath doesn't mean I shouldn't fix it. I do want to support zf as a general-purpose fuzzy finder

from zf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.