Repository navigation
Description
(updated by @hvr based on previous discussions)
We want to avoid throwing the baby out with the bathwater, as our main concern here is avoiding people (intentionally or not) hijacking other people's packages. But we certainly don't want to forbid legitimate uses, as package names are by design intended to be case-sensitive in nature and efforts are being made to make sure that this works reliably even in the presence of case-folding clashes (and other corner cases that occur even w/o case-folding being involved).
New Specification
Allow uploading the first release of a new package (i.e. whose exact name spelling wasn't allocated yet) if and only if
- the uploader is a member of any maintainer group of the packages in the equivalence class of (allocated) package names modulo case-folding, or
- there don't exist any such maintainers groups (i.e. the package name had no case-folded sibling on Hackage yet)
where "modulo case-folding" is intended to mean the obvious equivalence relation
on (==) (map toLower) :: String -> String -> Bool`(NB: Hackage, by policy, only allows the ASCII subset of code-points for package names)
An additional orthogonal suggestion was voiced, to emit warnings for capitalized package names (or more generally starting with an upper-case letter) in the interest to politely nudge maintainers towards the predominant convention on Hackage to use all lower-case package names.
(origininal description)
This is confusing for users trying to find a package, might cause problems with case insensitive file systems, and it may also be a mistake by authors thinking the package name isn't taken.
I suggest keeping the existing "duplicates" but disallowing new ones from being uploaded.
Current list (ht @int-e):
BerkeleyDB berkeleydb
Buster buster
Checked checked
CLI cli
Command command
Condor condor
Dao dao
Data-Rope data-rope
DBus dbus
Digit digit
DocTest doctest
Eq eq
Extra extra
FileManip filemanip
FilePather filepather
Focus focus
Geodetic geodetic
GiST gist
HDBC-postgresql-hstore hdbc-postgresql-hstore
HLogger hlogger
HMM hmm
Hricket hricket
IndentParser indentparser
Interpolation interpolation
Irc irc
JackMiniMix jackminimix
Javasf javasf
Javav javav
KyotoCabinet kyotocabinet
Lattices lattices
Metrics metrics
Modulo modulo
Moe moe
Noise noise
Numbers numbers
Omega omega
Peano peano
Range range
Ref ref
Safe safe
SDL2-ttf sdl2-ttf
SmtLib smtLib
SVG2Q svg2q
Tables tables
Tensor tensor
Thrift thrift
Validation validation
XAttr xattr
Yocto yocto
Activity
hvr commentedon May 3, 2015
There's also the issue that such packages may cause issues for file-systems that don't allow two filenames in the same folder differing only by case.
However, I think it should be allowed to change the case of a package, if it turns out the originally chosen capitalization was not a good idea... maybe packages with different case should be considered to be the same package
qnikst commentedon Nov 2, 2017
Just another package of that form landed on hackage.. I'll try to make a patch that would reject new packages if they difference only with case, but would not have any other changes in the logic, i.e. packages with different case would not be considered as the same one. Will such patch be accepted?
hvr commentedon Nov 2, 2017
which one?
Not with that logic; there's a more differentiated logic I have in mind implementing. But there's no hurry.
qnikst commentedon Nov 2, 2017
https://hackage.haskell.org/package/Cassava in addition to https://hackage.haskell.org/package/cassava
hvr commentedon Nov 2, 2017
Oh I see; the logic I have in mind would have prevented that questionable act of defiance; but in general we have to trust Hackage users to be reasonable, as there's a lot of opportunities to harm Hackage if you put your mind to it.
gbaz commentedon Jan 28, 2018
I would suggest a new warning/rule as well -- preventing users from uploading new packages that begin with an upper-case letter in general, as the convention is nearly all lower-case. (Existing packages of course have to be grandfathered in).
tfausak commentedon Jan 29, 2018
I would be in favor of something that either warned or prevented uploading packages with uppercase characters in their names. But also, to the issue at hand, I think Hackage should prevent you from uploading packages that only differ in capitalization.
hvr commentedon Jan 29, 2018
@gbaz I wouldn't go as far as preventing but as part of the new candidate workflow, we can certainly add clearly visible warnings that cause some soft gravitational pull towards the desired convention of lower-case names (which I consider merely a
SHOULDas per RFC2119; one may have very good technical reasons to go against the strong recommendation).gbaz commentedon Mar 24, 2018
here's another: https://hackage.haskell.org/package/hlist
we really should fix this.
tom-bop commentedon Jul 6, 2018
For posterity, here's a list of all packages that were added between when @bergmark added their list and when case-clash uploading became disallowed (to be clear: if you want a complete list, add the two lists together):
tom-bop commentedon Jul 9, 2018
Here's a list of all packages with duplicate-modulo-case names, where none of the packages have been deprecated:
Edit: strikethru are ones that have been fixed with deprecation, since publication of this list: