-
Notifications
You must be signed in to change notification settings - Fork 696
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
better for cabal list to default to exact match or have an --exact option #4267
Comments
I don't use |
I'd like to work on this one |
@v0d1ch Actually, I have an alternative design for this I've been wanting to implement for the longest time; listing exact matches is something I can already do via The most common search operations I want to perform are simple prefx/suffix matching:
Now the primary bikeshedding thing is what syntax to support here; there's various possibilities; two obvious ones:
I'm not sure which one's better; and it's more than enough to start by implementing only a basic subset which allows the common pre/suffix matches. But this is something we should decide upon before we add an unnecessary flag like |
Open new issue, this feature is fixed. |
I hate when old issues are re-opened with a scope creep. I will continue closing those kind of reopenings in the future too. New stuff is new stuff. |
The problem was that this ticket's original scope was an XY issue and now was in fixed in a suboptimal way. That;s why I don't consider this a new request but rather a refinement of the root concern this ticket was covering. But I'm fine to open a new issue; it doesn't matter as long as the current incomplete "fix" doesn't make it into a release before this hasn't been properly addressed. |
This issue was open for two years. It was simple enough for newcomer to pick up. And it wasn't refined before someone starts to work on it, I consider it's too late. Also Edward thumbed this up. We have to improve on triage of the issues. I suggest that you look through newly opened PRs if you want to veto on them. This one was opened for 13 days, I consider that "not too quickly merged". I do remember a lot of topics there are issues on, so I try my best to triage new issues. I didn't remember any discussions about |
The use-case is |
I think the prefix/suffix approach without a new option looks quite good. |
But I still find the current |
I think it's modelled after So I feel that consensus here is that changing the |
I would like to suggest changing the behaviour of
cabal list PKG
to list only the info for the exact matchPKG
by default and not all packages containing the substringPKG
, and adding a--all
option to get back the current behaviour. Alternatively for better backward compatibility an--exact
option could be added for this effect, leaving the current default behaviour of listing all matches.Looking at https://github.com/haskell/cabal/blob/master/cabal-install/Distribution/Client/List.hs this seems possible though the code will need a little tweaking.
The text was updated successfully, but these errors were encountered: