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

solver: demanding future versions removes everything #116

Open
@rtfeldman

Description

@rtfeldman

To reproduce, start a new project with these dependencies:

    "dependencies": {
        "elm-lang/core": "2.1.0 <= v <= 2.1.0",
        "evancz/elm-html": "4.0.0 <= v <= 4.0.0"
    },

If you run elm package install, you get a fairly standard output:

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

  Install:
    elm-lang/core 2.1.0
    evancz/elm-html 4.0.0
    evancz/virtual-dom 2.0.0

Do you approve of this plan? (y/n) y
Downloading elm-lang/core
Downloading evancz/elm-html
Downloading evancz/virtual-dom
Packages configured successfully!

Now change the core version to a version that does not exist yet:

    "dependencies": {
        "elm-lang/core": "9.0.0 <= v <= 9.0.0",
        "evancz/elm-html": "4.0.0 <= v <= 4.0.0"
    },

Now it tries to remove everything:

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

  Remove:
    elm-lang/core
    evancz/elm-html
    evancz/virtual-dom

Do you approve of this plan? (y/n) y
Packages configured successfully!

...however, in practice it does not actually remove them:

$ ls -al elm-stuff/packages
total 0
drwxr-xr-x  4 rtfeldman  staff  136 Aug  4 14:43 .
drwxr-xr-x  4 rtfeldman  staff  136 Aug  4 14:42 ..
drwxr-xr-x  3 rtfeldman  staff  102 Aug  4 14:43 elm-lang
drwxr-xr-x  4 rtfeldman  staff  136 Aug  4 14:43 evancz

...but it does empty them out!

$ ls -al elm-stuff/packages/elm-lang/core/
total 0
drwxr-xr-x  2 rtfeldman  staff   68 Aug  4 14:45 .
drwxr-xr-x  3 rtfeldman  staff  102 Aug  4 14:43 ..

Expected behavior would be some sort of error explaining "there's no such version as 9.0.0" and aborting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions