A problem that can be quite opaque to the user when using elm-json to upgrade dependencies, is when you don't get the latest version.
For instance, if you're using jfmengels/elm-review v2.9.0 and elm-explorations/test v1, then attempting to upgrade the latest will only yield the v2.9.1 version, because starting from v2.10.0, the package depends on elm-explorations/test v2.
I have seen a lot of confusion as to why people were not getting the most recent version, and I myself get confused in different situations, in which case I resort to this tool (https://www.markuslaire.com/github/elm-dependencies-analyzer/) to figure out the problem.
I think it could be interesting to explain — when upgrading to not the last version — why the upgrade was held back to a prior version.
I think that this could be challenging to explain in a clear way, but it could be worth it. A first stab could look like this:
So one way to implement something like this for a command like elm-json install author/pkg@requirement would be to have the following strategy:
Identify the newest version of author/pkg satisfying the requirement
Try to solve with that specific version
If that fails, record the error message and try again with the actual requirement
If it succeeds with the actual requirement but failed with the newest version satisfying that requirement, add a warning containing the error message for the newest version
A problem that can be quite opaque to the user when using
elm-json
to upgrade dependencies, is when you don't get the latest version.For instance, if you're using
jfmengels/elm-review
v2.9.0 andelm-explorations/test
v1, then attempting to upgrade the latest will only yield the v2.9.1 version, because starting from v2.10.0, the package depends onelm-explorations/test
v2.I have seen a lot of confusion as to why people were not getting the most recent version, and I myself get confused in different situations, in which case I resort to this tool (https://www.markuslaire.com/github/elm-dependencies-analyzer/) to figure out the problem.
I think it could be interesting to explain — when upgrading to not the last version — why the upgrade was held back to a prior version.
I think that this could be challenging to explain in a clear way, but it could be worth it. A first stab could look like this:
(cc @mpizenberg who might also be interested in this kind of issue)