You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go to any folder with a valid elm.json where elm-json solve elm.json usually succeeds. The one created by elm init is fine for testing.
Either:
Run ELM_HOME=does/not/exist elm-json --offline solve elm.json
Disconnect from the Internet and run ELM_HOME=does/not/exist elm-json solve elm.json
Example result:
-- NO VALID PACKAGE VERSION ----------------------------------------------------
Because elm/core does not appear to exist and this project depends on
elm/core 1.0.2 <= v < 2.0.0, no valid set of package versions could be
found.
When the --offline flag isn’t used this is also printed before the above:
phase: retrieve
Oct 17 11:10:47.817 WARN Failed to fetch versions from package.elm-lang.org
So in that case there’s at least a clue that the failure might be due to connectivity issues.
At least for this --offline case, would it be possible to have the error say something like this?
There’s not enough information locally to solve the dependencies. I need to look at package.elm-lang.org to get more information, but I can’t do that when --offline is used.
That message could work for connectivity issues as well, with some tweaks:
There’s not enough information locally to solve the dependencies. I tried to look at package.elm-lang.org to get more information, but doing so failed with the following message: ...
elm-json version: 0.2.8
Maybe related note: elm-json --offline solve elm.json consistently failed for me at work, even though I had just run elm-json solve elm.json successfully right before. Removing ~/.elm/elm-json and running elm-json solve elm.json once more solved the problem – now --offline succeeds. I still have a backup of the old ~/.elm/elm-json if you feel like taking a look at it.
Point is, I was playing around with elm-json --offline to learn more about how it works and was confused by the output I got. You might have better ideas around this.
Edit: Or maybe this is the expected output, it just takes a little learning to understand why.
The text was updated successfully, but these errors were encountered:
Steps to reproduce:
Go to any folder with a valid
elm.json
whereelm-json solve elm.json
usually succeeds. The one created byelm init
is fine for testing.Either:
ELM_HOME=does/not/exist elm-json --offline solve elm.json
ELM_HOME=does/not/exist elm-json solve elm.json
Example result:
When the
--offline
flag isn’t used this is also printed before the above:So in that case there’s at least a clue that the failure might be due to connectivity issues.
At least for this
--offline
case, would it be possible to have the error say something like this?That message could work for connectivity issues as well, with some tweaks:
elm-json version: 0.2.8
Maybe related note:
elm-json --offline solve elm.json
consistently failed for me at work, even though I had just runelm-json solve elm.json
successfully right before. Removing~/.elm/elm-json
and runningelm-json solve elm.json
once more solved the problem – now--offline
succeeds. I still have a backup of the old~/.elm/elm-json
if you feel like taking a look at it.Point is, I was playing around with
elm-json --offline
to learn more about how it works and was confused by the output I got. You might have better ideas around this.Edit: Or maybe this is the expected output, it just takes a little learning to understand why.
The text was updated successfully, but these errors were encountered: