elm-package icon indicating copy to clipboard operation
elm-package copied to clipboard

install succeeds when depending on not existing packages

Open stil4m opened this issue 8 years ago • 6 comments

When you have a package that has a version constraint that can not be resolved (it is higher than the existing version), the package install just succeeds.

I've used the following elm-package.json:

{
    "version": "1.0.0",
    "summary": "helpful summary of your project, less than 80 characters",
    "repository": "https://github.com/user/project.git",
    "license": "BSD3",
    "source-directories": [
        "."
    ],
    "exposed-modules": [],
    "dependencies": {
        "elm-lang/core": "5.0.0 <= v < 6.0.0",
        "elm-lang/html": "2.0.1 <= v < 3.0.0"
    },
    "elm-version": "0.18.0 <= v < 0.19.0"
}

| Note that at creation of the issue, elm-lang/html was at version 2.0.0.

When executing elm package install, the only output returned is:

Packages configured successfully!

The find command shows that nothing is downloaded:

$ find elm-stuff
elm-stuff
elm-stuff/exact-dependencies.json
elm-stuff/packages

The content of exact-dependencies.json is {}.

I would expect the package manager to fail with an error that explains I depend on a version that does not exist.

I am using OS X 10.11.5 and Elm 0.18

stil4m avatar Nov 21 '16 10:11 stil4m

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.

process-bot avatar Nov 21 '16 10:11 process-bot

Was just bitten by this as well.

I had the following elm-package.json:

{
    "version": "1.0.0",
    "summary": "helpful summary of your project, less than 80 characters",
    "repository": "https://github.com/user/project.git",
    "license": "BSD3",
    "source-directories": [
        "."
    ],
    "exposed-modules": [],
    "dependencies": {
        "elm-lang/core": "5.0.0 <= v < 6.0.0",
        "elm-lang/html": "2.0.0 <= v < 3.0.0",
        "elm-lang/http": "3.0.0 <= v < 4.0.0"
    },
    "elm-version": "0.18.0 <= v < 0.19.0"
}

jacobat avatar Dec 09 '16 08:12 jacobat

FWIW, I got the same issue with completely wrong bounds:

    "dependencies": {
        "elm-lang/core": "5.0.0 <= v < 4.0.0",

abailly avatar Dec 14 '16 10:12 abailly

Same issue here. Funny thing is that when one of the dependencies is wrong elm package install will actually try to remove all the dependencies.

For example by using the wrong version of url-parser (2.1.0 instead or 2.0.1):

    "dependencies": {                                                               
        "elm-lang/core": "5.1.1 <= v < 6.0.0",                                      
        "elm-lang/html": "2.0.0 <= v < 3.0.0",                                      
        "elm-lang/svg": "2.0.0 <= v < 3.0.0",                                       
        "elm-lang/http": "1.0.0 <= v < 3.0.0",                                      
        "elm-lang/navigation": "2.1.0 <= v < 3.0.0",                                
        "terezka/elm-plot": "4.1.0 <= v < 5.0.0",                                   
        "debois/elm-mdl": "8.1.0 <= v < 10.0.0",                                    
        "evancz/url-parser": "2.1.0 <= v < 3.0.0"                                   
    }

I get:

$ elm package install 
Some new packages are needed. Here is the upgrade plan.

  Remove:
    debois/elm-dom
    debois/elm-mdl
    elm-lang/core
    elm-lang/dom
    elm-lang/html
    elm-lang/http
    elm-lang/mouse
    elm-lang/navigation
    elm-lang/svg
    elm-lang/virtual-dom
    elm-lang/window
    myrho/elm-round
    terezka/elm-plot

Do you approve of this plan? [Y/n] 
Packages configured successfully!

It would be very nice to have an error with the name of the invalid package instead.

benjamin-bergia avatar Feb 22 '17 06:02 benjamin-bergia

I'm having this same trouble (or something that looks very much the same).

sjfloat avatar Mar 25 '17 18:03 sjfloat

This one is really annoying, mistyping a dependency (in my case elm-json-extra was renamed to json-extra for Elm 0.19) results into seemingly successful installation.

domenkozar avatar Nov 18 '17 21:11 domenkozar