avh4 / elm-upgrade

Upgrade Elm projects
https://www.npmjs.com/package/elm-upgrade
MIT License
122 stars 15 forks source link

Unclear output: WARNING! <X> of your dependencies #79

Open yotamDvir opened 5 years ago

yotamDvir commented 5 years ago

After using elm-upgrade, I tried to install a package and got this cryptic error:

$ elm install elm/file
-- CORRUPT JSON ----------------------------------------------------------------

The elm.json for elm-community/list-extra 1.0.0 got corrupted somehow.

I removed it from my file cache, so if it was some transient error it should be
fixed if you try the same thing again. Please report this if it seems like an
Elm problem though!

Eventually I found out that old incompatible dependencies were not removed, and apparently one of these had elm-community/list-extra 1.0.0 as a dependency. I realize that stated in the output is:

WARNING! <X> of your dependencies have not yet been upgraded to
support Elm 0.19.

However, I think that the message is easy to miss, and it is unclear that the dependencies are kept as is in the elm.json (I thought they were just not copied from the old elm-package.json). Both of these problems can be fixed by adding to the list of manual steps something along the lines of:

"Replace or remove all old dependencies, otherwise Elm may fail to both compile and install other packages."

This line should only be added in case X is not 0 of course.