Skip to content
This repository has been archived by the owner on Aug 23, 2018. It is now read-only.

no error thrown on inexistent version but block normal usage of elm make #275

Open
Grummfy opened this issue Jun 24, 2017 · 2 comments
Open
Labels

Comments

@Grummfy
Copy link

Grummfy commented Jun 24, 2017

Hello,
I see a package and try to install it through some change in elm-package.json but I add a version that doesn't exist.

So because of no error are displayed when you make a "elm make" or "elm package install", I just got error on elm make but like if the elm-stuff directory was corrupted. It take me a long time to understand it.

So I propose when a version doesn't exist, the issue should be a clear message and not something that create confusion.

@process-bot
Copy link

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

@evancz evancz added the problem label Jul 10, 2017
jerith666 added a commit to jerith666/elbum that referenced this issue May 7, 2018
@jerith666
Copy link

I just hit this as well. A bit more detail:

I had "rtfeldman/elm-css": "13.0.1 <= v < 14.0.0" in my elm-package.json. I wanted to update to 14.x, so I did:

$ elm-package install rtfeldman/elm-css
Error: This change is too tricky for me. Your elm-package.json already lists the
following dependency:

    "rtfeldman/elm-css": "13.0.1 <= v < 14.0.0"

So I am not sure how to make that include version 14.0.0 as well. Maybe you want
one of the following constraints?

    13.0.1 <= v < 14.0.0
    14.0.0 <= v < 15.0.0

Modify elm-package.json by hand to be exactly what you want.

Not paying close attention -- in particular, not noticing that my lower bound was at 13.0.1 instead of 13.0.0 -- I just went in and changed the 13 to a 14 (as in jerith666/elbum@7b8e325). This left elm-package.json referring to a non-existent version of elm-css, 14.0.1. Then elm-make wouldn't work, it got into an infinite loop of telling me to delete elm-stuff:

$ elm-make --output elbum.js Main.elm 
Packages configured successfully!
Could not find package elm-lang/dom.

Maybe your elm-stuff/ directory has been corrupted? You can usually fix stuff
like this by deleting elm-stuff/ and rebuilding your project.

$ rm -rf elm-stuff

$ elm-make --output elbum.js Main.elm 
Packages configured successfully!
Could not find package elm-lang/dom.

Maybe your elm-stuff/ directory has been corrupted? You can usually fix stuff
like this by deleting elm-stuff/ and rebuilding your project.

$ ls -lR elm-stuff
elm-stuff:
total 8
-rw-r--r-- 1 matt users    2 May  6 21:43 exact-dependencies.json
drwxr-xr-x 2 matt users 4096 May  6 21:43 packages

elm-stuff/packages:
total 0

$ cat elm-stuff/exact-dependencies.json 
{}

The above was with:

$ elm-make --version
Invalid option `--version'

elm-make 0.18 (Elm Platform 0.18.0)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants