-
Notifications
You must be signed in to change notification settings - Fork 76
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
Considering a roadmap for 1.0, or alternatively considering deprecating in favor of the "globset" crate #59
Comments
OK, I'm just going throw a bunch of stuff against the wall and see what sticks. The primary motivation behind For that reason alone, you might consider With that said, it turns out that if you're implementing glob matching for a set of globs, it's also pretty easy to implement straight-forward single-glob matching as well. So Tangentially, the I personally don't have the bandwidth to fix the
4 and 5 seem like things that can be fixed. 1 and 2 are things that are probably just facts of life for the So I think there's a key trade off here... The |
@BurntSushi, Thanks for the feedback!
Indeed, I absolutely did not want to give the impression that I wanted to saddle you with any more work. :P Ideally I'd like our crate-elevation process to distribute the work among interested contributors by promising long-term relevance and the chance to contribute to a strategic dependency of the Rust ecosystem. It's just that to bootstrap that process we need somebody who gives a care, and I don't know that we have any such person for glob (and no document arguing why this might be strategically important to begin with, to inspire someone to step up). |
I would personally be on board transitioning community mindshare to If we'd like to retain the name Overall I don't have too many opinions, unfortunately. There's been very little activity on this repo over time, although I don't know if that's an indicator of "it's good enough" or "it's not used". |
I was just looking for how to do I think the |
Any update on that? Should a post be created on the internals/users forum? |
@Keats I think everything I said above is still true. Notably, the |
There's been some activity in the last few months, BurntSushi/ripgrep#765 has lead to the emergence of the Perhaps once that's had time to bake we could look at deprecating cc @Gilnaa |
It looks like Unfortunately, by It'd be nice to have a full featured, portable, well-tested library for globbing. I'm currently using So anyway, my current vote would be to move forward in the If someone starts pushing forward in a single direction, I'm happy to help with Windows testing (my coding skills in the |
@rivy The ignore crate supports case insensitive globbing: https://docs.rs/ignore/0.4.3/ignore/overrides/struct.OverrideBuilder.html#method.case_insensitive |
I'll make sure this option is available through the GlobWalk API. Is it reasonable for this to be on by default on windows, or is it too surprising. |
@Gilnaa I'm not sure about the default on Windows. I think you'll probably want to look at what other glob walkers do. Worst case, start conservative (case sensitive with opt-in case insensitive), and move to case insensitive by default if you get a lot of feedback asking for it. |
@Gilnaa , from what I've seen / used, most libraries default to case sensitive matching. However, when compiling applications for Windows targets, to minimize surprise for Windows users, those applications should default to utilizing So, IMO, as long as there's an easy way to include/use the library with case-sensitivity set OFF, and an easy way to toggle case-sensitivity, I'd leave the basic/normal default to case-sensitivity being ON. Thanks for working on it! |
@rivy Sorry for keeping quiet, I've added support a few weeks ago |
That would mean every person using |
As one example, I believe .NET's In my opinion, the current always case insensitive by default everywhere is totally fine. Different usecases can call for different case sensitivity irrespective of the platform, so I usually find myself explicitly needing one way or the other anyway. |
OK, so my plan at the moment---assuming all goes according to plan---is to rewrite
One possible alternative to the above approach that I'd be willing to do is to take over cc'ing some of the library team for their thoughts @alexcrichton @KodrAus @dtolnay @SimonSapin @sfackler |
That all sounds fantastic to me, and I think it's fine to move |
I'd probably do a |
Personally, I like the idea of making the most of the |
I think that sounds reasonableish. My plan is to just do what I said above, and then dump it on to master in this repo and put out a release shortly thereafter. At that point, we can create a branch for the old
Sounds good, but hopefully we shouldn't need too much here. It's going to be a complete break from the current API, so folks will probably just want to treat it as if it's a new crate and re-familiarize themselves with the new API. We can of course provide some common examples of how to translate old code. Although I mostly expect the top-level |
Hey @BurntSushi, thanks a lot for the I wonder if you had time work on the rewrite of For Vector, we would like to add a glob-based file walker and contribute to upstream projects where suitable/necessary. Since the situation seems to be spread out between the Judging from BurntSushi/ripgrep#765 (comment), Gilnaa/globwalk#28 (comment) and this very issue it seems like converging all functionality into |
Per the original rust-lang-nursery RFC ( https://github.com/rust-lang/rfcs/blob/master/text/1242-rust-lang-crates.md ):
I'm not sure who the "original crate author" of glob is, as I'm guessing this crate was split out from the stdlib during the great pre-1.0 purge, but it doesn't appear that there's any real champion trying to advance this crate through the stabilization process.
I'm interested in starting a discussion as to the future of this crate. Sadly I can't find the original petition arguing why this crate belongs in the nursery in the first place, so I'm not even sure how to begin evaluating the aspirations of this crate that keep it from being 1.0 today.
Let's focus on answering three concrete questions:
I don't consider myself an expert in either crate, but the biggest potential pitfall that I see when comparing glob to globset is that the latter relies on the complete regex crate, and transitively all of regex's dependencies. In contrast, glob is small self-contained, but appears to be less featureful than globset, and I'm unsure if it handles both Unicode and non-Unicode as well as the regex crate. Some microbenchmarks would be interesting to see as well.
Tagging @BurntSushi, as the author of globset and who's familiar with the rust-lang-nursery process. And tagging @alexcrichton, who I'm guessing doesn't particularly care about this crate but who's the only active point of contact listed for this crate on crates.io. :P
The text was updated successfully, but these errors were encountered: