pascalkuthe / regex-cursor

Port of the regex crate for use with ropes
Apache License 2.0
35 stars 5 forks source link

Fix Doctests #3

Closed ratmice closed 6 months ago

ratmice commented 7 months ago

This fixes a typo, and some compilation failures when doc tests are run,

Since the ropey stuff now looked to be feature gated, I just removed the 'into()' call, so it's an Input<&str>. Perhaps that is not the right thing, but seemed easiest way?

ratmice commented 6 months ago

@pascalkuthe Curious if this one got overlooked, or if I should just close it if you have other plans for how to fix the tests.

pascalkuthe commented 6 months ago

Sorry I forgot about this one.

I think I had some reservations about spending too much effort on the document tests since the docs are mostly copied from upstream and I hope this crates get upstreamed eventually at which point most of the document changes would need to be reverted.

Reading trough the diff again these are mostly typo fixes and some very small doc fixes so I am happy to mrte this as is. Thanks and sorry for the delay.

ratmice commented 6 months ago

I see, yeah indeed that hesitation there makes sense. The change here was just one test in the ropey part of the code, so shouldn't touch upstream.

I had tried some other changes like overlapping matches which I abandoned, because I didn't think it would be maintainable and make a merging difficult as you mention, so I completely understand.

pascalkuthe commented 6 months ago

if you want to contribute non-doc fixes that is generally appreciated and there are many places where it definitely is worth doing. The backtracking and onepass engines for example would be great to port and likely a requirement for upstreaming. The reverse suffix optimizations are another good candidate. This crate is also in "production" use (merged into helix master branch so thousands of people use it daily) so the speedup these engines provide would be great.

Overlapping matches likely are too much of a rabbit hole since they need lots of API so I can definitely see that being too much work. Altough I would deniftly be open to that too. I have copied so much code anyway (just getting this far was really a ton of work) :D