elm-lang / elm-package

Command line tool to share Elm libraries
BSD 3-Clause "New" or "Revised" License
214 stars 66 forks source link

Publishing packages is case sensitive #180

Open dynajoe opened 8 years ago

dynajoe commented 8 years ago

I was able to publish two of the same package with different casing (and in this order):

http://package.elm-lang.org/packages/JOEANDAVERDE/flex-html/1.0.0/

http://package.elm-lang.org/packages/joeandaverde/flex-html/1.0.0/

It detected the second package as being new.

jvoigtlaender commented 8 years ago

This is only possible if you published with a pre-0.16 version of Elm. Don't do that. :smile:

jvoigtlaender commented 8 years ago

I had concluded that you must have been using a pre-0.16 version from the facts that:

  1. You managed to publish with a capitalized name.
  2. https://github.com/joeandaverde/flex-html/blob/1.0.0/elm-package.json, which "Browse source" from http://package.elm-lang.org/packages/joeandaverde/flex-html/1.0.0/ links to, doesn't contain an "elm-version" field, which current elm-package checks for.

But meanwhile I learned/noticed two things:

  1. Over at https://github.com/elm-lang/package.elm-lang.org/issues/141#issuecomment-161460018, @evancz points out that capitalization is rejected for repository names, but accepted for user names. If so, then elm-package should certainly check for duplication, i.e., not allow two packages like above to both be published independently.
  2. There's a difference between the following two files:

    Clearly, there shouldn't be. So this looks like another error, independent from the capitalization issue.

jvoigtlaender commented 8 years ago

The problem from the last point above might be caused by any of: https://github.com/elm-lang/elm-package/issues/106, https://github.com/elm-lang/elm-package/issues/110, https://github.com/elm-lang/elm-package/issues/138.