phosphor-elm icon indicating copy to clipboard operation
phosphor-elm copied to clipboard

Corrupt Package Data when downloading

Open jaredramirez opened this issue 2 years ago • 9 comments

Hey there, starting yesterday our local & CI installs started to fail with the following problem:

Starting downloads...

  ✗ phosphor-icons/phosphor-elm 1.0.2

Dependency problem!
-- CORRUPT PACKAGE DATA --------------------------------------------------------

I downloaded the source code for phosphor-icons/phosphor-elm 1.0.2 from:

    https://github.com/phosphor-icons/phosphor-elm/zipball/1.0.2/

But it looks like the hash of the archive has changed since publication:

  Expected: 9dcc8add1bd1b43db686c7c228764e5d03908e62
    Actual: 28db295525e42c116eda1974ce4b7e6fee451b43

This usually means that the package author moved the version tag, so report it
to them and see if that is the issue. Folks on Elm slack can probably help as
well.

Did something change with the 1.0.2 tag in this repo that caused the change?

I did some googling and saw that in the past something like this seems to have been caused by a github issue: https://github.com/dillonkearns/elm-graphql/issues/581#issuecomment-1027274712, so maybe there's nothing that can be done here. I've also asked about this on the Elm community slack

jaredramirez avatar Jan 10 '23 19:01 jaredramirez

Hi @jaredramirez, sorry to hear about that! I recently renamed this repo, it is possible that has something to do with it, now that the name field in elm.json is no longer correct. I guess I made the assumption that Github redirects would hold here too.

Thanks for the issue. Will try to push out a patch today.

rektdeckard avatar Jan 10 '23 19:01 rektdeckard

Ah, yes that's probably it! Thanks for the prompt reply!

jaredramirez avatar Jan 10 '23 19:01 jaredramirez

And I don't think package owners can do anything about it except renaming back maybe (?). Something something github hash is different after renaming

lue-bird avatar Jan 10 '23 20:01 lue-bird

Or republish under a slightly different name?

jaredramirez avatar Jan 10 '23 20:01 jaredramirez

Yeah publishing a new package with the current repo name phosphor-icons/elm has to be done anyway. Best to then also publish another version under the phosphor-icons/elm-phosphor name leaving a note redirecting to the new package with the name phosphor-icons/elm

lue-bird avatar Jan 10 '23 20:01 lue-bird

Or maybe just rename the repo back? I'm not super knowledgeable about the Elm ecosystem, best-practices, etc. Will defer to you all on best approach.

rektdeckard avatar Jan 10 '23 20:01 rektdeckard

Ideally this would be published at @phosphor-icons/elm to match the org namespacing on NPM and planned relocations we have for our other JS packages. Not sure if that's a thing on package.elm-lang.org though.

rektdeckard avatar Jan 10 '23 20:01 rektdeckard

Temporarily reverted the rename, your projects should be building now (just tested on a bare app).

rektdeckard avatar Jan 10 '23 21:01 rektdeckard

I think the best thing is what @lue-bird suggested.

  1. In the current (now with the reverted name) package, update the readme saying this package is deprecated
  2. Rename the repo & package name
  3. Republish a "new" elm package under the new name as v1.0.0 (elm packages auto-namespace based on the github org/owner's name)

Then I, or anyone else, can update our apps to use the newly named version and the repo's naming scheme is consistent with all y'alls other packages/planned changes.

jaredramirez avatar Jan 10 '23 21:01 jaredramirez