[Hackage] #167: cabal-install should treat package names case insenitively in the UI wherever possible

#167: cabal-install should treat package names case insenitively in the UI wherever possible ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: cabal-install | Version: 1.2.0 Severity: normal | Keywords: Difficulty: normal | Ghcversion: 6.4.2 Platform: Linux | ----------------------------+----------------------------------------------- Currently saying {{{cabal list haxml}}} works fine and returns hits for {{{HaXml}}} which is good. The same does not apply when it comes to {{{cabal list haxml}}}. So what it should do is to look case-insnesitively for haxml. If the match is not exact case-sensitively and there are more than one packages matching case-insensitively then it should abort with a message listing the matches. This should not often happen since within any single HackageDB server, we check that packages names are unique case- insensitively but it's possible to get ambiguities if cabal-install has been configured to use multiple repos. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/167 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#167: cabal-install should treat package names case insenitively in the UI wherever possible ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: cabal-install | Version: 1.2.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.4.2 | Platform: Linux ----------------------------+----------------------------------------------- Old description:
Currently saying {{{cabal list haxml}}} works fine and returns hits for {{{HaXml}}} which is good. The same does not apply when it comes to {{{cabal list haxml}}}. So what it should do is to look case- insnesitively for haxml. If the match is not exact case-sensitively and there are more than one packages matching case-insensitively then it should abort with a message listing the matches. This should not often happen since within any single HackageDB server, we check that packages names are unique case-insensitively but it's possible to get ambiguities if cabal-install has been configured to use multiple repos.
New description: Currently saying {{{cabal list haxml}}} works fine and returns hits for {{{HaXml}}} which is good. The same does not apply when it comes to {{{cabal install haxml}}}. So what it should do is to look case- insnesitively for haxml. If the match is not exact case-sensitively and there are more than one packages matching case-insensitively then it should abort with a message listing the matches. This should not often happen since within any single HackageDB server, we check that packages names are unique case-insensitively but it's possible to get ambiguities if cabal-install has been configured to use multiple repos. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/167#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#167: cabal-install should treat package names case insenitively in the UI wherever possible ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: cabal-install | Version: 1.2.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.4.2 | Platform: Linux ----------------------------+----------------------------------------------- Comment (by guest): I was under the impression we'd agreed that package names are case insensitive, but that doesn't seem to be written in the obvious place in the Cabal docs. Anyway, I think that foo-1.0 in one hackage and FOO-2.0 in another should be taken to be different versions of the same package. -- Ian Lynagh -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/167#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#167: cabal-install should treat package names case insenitively in the UI wherever possible ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: cabal-install | Version: 1.2.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.4.2 | Platform: Linux ----------------------------+----------------------------------------------- Comment (by ross@soi.city.ac.uk): I don't recall a discussion where this was agreed, but I suspect that any partial solution (anything short of normalized names) will just move the problems around. If foo-1.0 and FOO-2.0 and different versions of the same package, is one later than the other? -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/167#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#167: cabal-install should treat package names case insenitively in the UI wherever possible ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: cabal-install | Version: 1.2.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.4.2 | Platform: Linux ----------------------------+----------------------------------------------- Comment (by guest): Hmm, I can't easily find it. It might have been on IRC or in person. It also might have been about names used by ghc-pkg rather than Cabal, but I don't think so. Or maybe I just dreamt it... As I understood it, foo=FOO, so FOO-2.0 is later than foo-1.0 as 2.0 > 1.0. Likewise, FOO-2.0 and foo-2.0 are the same version. -- Ian Lynagh -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/167#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#167: cabal-install should treat package names case insenitively in the UI wherever possible ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: cabal-install | Version: 1.2.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.4.2 | Platform: Linux ----------------------------+----------------------------------------------- Comment (by duncan): As I recall we agreed that hackage should enforce that there be no two packages with names that differ only by case. This was to allow distros to use lower case package names. I do not recall that we agreed to change the Eq instance for packages to make comparison case insensitive (this would have similar implications to redefining version equality in that == does not give the same result as comparing external representations). Currently ghc & ghc-pkg treat package names case sensitively. I don't mind changing it to be case insensitive everywhere, but if we do it we should do it everywhere. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/167#comment:5 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#167: cabal-install should treat package names case insenitively in the UI wherever possible ---------------------------------+------------------------------------------ Reporter: duncan | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.2.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.4.2 | Platform: Linux ---------------------------------+------------------------------------------ Comment (by guest): (from BMeph) One of the relevant issues I see, is that doing a {{{cabal list}}} will not only give any package of that name, upper or lower case, but any package with that character sequence in the package name - e.g., {{{cabal list tv}}} lists both TV and the GuiTV packages. This seems to me to be a reasonable behavio(u)r from the standpoint of searching for a package, of which its precise name one is unsure. Knowing that I can do a {{{cabal list HXT}}} after an unsuccessful "install" to find the proper package name, is a beneficial service to me. Also, knowing that {{{cabal list}}} will give me that name, to be used in a {{{cabal install}}} reassures me that should two packages come along with near-identical names (HTTP, anyone?), that I can identify which one I want and get it with the {{{cabal install}}}. The greater particularity (?) of "cabal install"'s parameter should be documented, but I would rather it not be changed. However, when not finding a package , the error message it gives seems misleading/unhelpful to a worse degree than some of GHCi's ones. The error message should be changed, or somehow re-worked for a more informative response. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/167#comment:6 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#167: cabal-install should treat package names case insenitively in the UI wherever possible ---------------------------------+------------------------------------------ Reporter: duncan | Owner: Type: enhancement | Status: closed Priority: normal | Milestone: Component: cabal-install tool | Version: 1.2.0 Severity: normal | Resolution: fixed Keywords: | Difficulty: normal Ghcversion: 6.4.2 | Platform: Linux ---------------------------------+------------------------------------------ Changes (by duncan): * status: new => closed * resolution: => fixed Comment: Implemented as per the original description. Applies to install, info and fetch commands. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/167#comment:7 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage