elm / compiler

Compiler for Elm, a functional language for reliable webapps.
https://elm-lang.org/
BSD 3-Clause "New" or "Revised" License
7.54k stars 664 forks source link

Newer package version not recognised #2022

Open mschindlerMM opened 4 years ago

mschindlerMM commented 4 years ago

Quick Summary:

SSCCE

I published/updated a package to version 1.0.2 yesterday (https://package.elm-lang.org/packages/mercurymedia/elm-message-toast/latest/). Updated the package today again and wanted to publish it. But when I tried it, the console returned:

-- INVALID VERSION ---------------------------------------------------- elm.json

Your elm.json says the next version should be 1.0.3, but that is not valid based
on the previously published versions.

Change the version back to 1.0.1 which is the most recently published version.
From there, have Elm bump the version by running:

    elm bump

If you want more insight on the API changes Elm detects, you can run `elm diff`
at this point as well.

It seems Elm does not recognise that the current version is 1.0.2 (and not 1.0.1). So I checked out the tag 1.0.2 again and run elm publish. This lead this time to another error:

-- PROBLEM PUBLISHING PACKAGE --------------------------------------------------

I need to send information about your package to the package website, so I tried
to fetch:

    https://package.elm-lang.org/register?name=mercurymedia%2Felm-message-toast&version=1.0.2&commit-hash=3eb15b1ddf73fce3a823f48374b75d43dbf77668

But it came back as 400 Bad Request

This may mean some online endpoint changed in an unexpected way, so if does not
seem like something on your side is causing this (e.g. firewall) please report
this to https://github.com/elm/compiler/issues with your operating system, Elm
version, the command you ran, the terminal output, and any additional
information that can help others reproduce the error!

Additional Details

Also tried to install version 1.0.2 as package, but I could not be found. Even though it is listed on https://package.elm-lang.org/packages/mercurymedia/elm-message-toast/latest/ with that version. Seems like Elm does not recognise the new version?

rlefevre commented 4 years ago

@mschindlerMM Could you try to delete ~/.elm and ./elm-stuff then retry please (both to install 1.0.2 then to publish 1.0.3). I suspect your local cache has become desynchronized because of an unfortunate glitch on the package server the day you published 1.0.2.

mschindlerMM commented 4 years ago

@rlefevre That worked to me. Thank you!

icidasset commented 4 years ago

I'm currently having this issue ☝️

  ● Version number 3.0.0 verified (MAJOR change, 2.0.0 => 3.0.0)
  ● Version 3.0.0 is tagged on GitHub 
  ● No uncommitted changes in local code
  ● Code downloaded successfully from GitHub
  ● Downloaded code compiles successfully

-- PROBLEM PUBLISHING PACKAGE --------------------------------------------------

I need to send information about your package to the package website, so I tried
to fetch:

    https://package.elm-lang.org/register?name=icidasset%2Felm-material-icons&version=3.0.0&commit-hash=b4211a19df72b51284adf5a79bfae2e40409b673

But it came back as 400 Bad Request

I tried removing elm-stuff, ~/.elm and the entire local git repo. But nothing seemed to help. Any ideas? Thanks!

rlefevre commented 4 years ago

@icidasset

This is a different issue. I think that currently, docs.json documentation once built must not be above 512KiB, yours seems to be above 664KiB.

See https://discourse.elm-lang.org/t/publishing-a-package-with-api-documentation-512kb/1562 and https://github.com/elm/package.elm-lang.org/issues/320.

It would be preferable to open a new issue.