eeue56 / elm-html-test

Test elm-html in Elm!
http://package.elm-lang.org/packages/eeue56/elm-html-test/latest
BSD 3-Clause "New" or "Revised" License
67 stars 15 forks source link

Wrong version range listed in elm-package.json when installing w/o version #43

Closed didierofrivia closed 6 years ago

didierofrivia commented 6 years ago

Hi!

When installing the package without specifying the version, like elm-package install eeue56/elm-html-test it installs it correctly but in elm-package.json is listed like "eeue56/elm-html-test": "5.1.1 <= v < 6.0.0", (being current version 1.1.0). This generates a hell of dependencies errors when trying to install, for instance, rtfeldman/html-test-runner and/or rtfeldman/node-test-runner. I'm not sure if this is a elm-html-test bug or the package manager itself, but I haven't experienced it with any other packages...

I.E.: 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": {
        "eeue56/elm-html-test": "5.1.1 <= v < 6.0.0",
        "elm-lang/core": "5.1.1 <= v < 6.0.0",
        "elm-lang/html": "2.0.0 <= v < 3.0.0",
        "rtfeldman/html-test-runner": "2.0.0 <= v < 3.0.0"
    },
    "elm-version": "0.18.0 <= v < 0.19.0"
}

and the error:

⇒  elm-package install rtfeldman/html-test-runner
To install rtfeldman/html-test-runner I would like to add the following
dependency to elm-package.json:

    "rtfeldman/html-test-runner": "2.0.0 <= v < 3.0.0"

May I add that to elm-package.json for you? [Y/n]

Error: I cannot find a set of packages that works with your constraints.

One way to rebuild your constraints is to clear everything out of the
"dependencies" field of elm-package.json and add them back one at a time with
`elm-package install`.

I hope to automate this in the future, but at least there is a way to make
progress for now!

Thanks for the brilliant job!

eeue56 commented 6 years ago

I'm not too sure of the problem here. Can you write some steps to reproduce?

didierofrivia commented 6 years ago

Hey! Sure, the way to reproduce it is quite easy:

On a new project:

  1. Run elm-package install eeue56/elm-html-test
  2. Run elm-package install rtfeldman/html-test-runner

That should suffice to see the error about dependencies. Then if you check the elm-package.json you will see the version range installed for eeue56/elm-html-test is 5.1.1 <= v < 6.0.0 which is incorrect and leads to the said error.

Let me know if you need anything else :)

Thanks again, you rock!

eeue56 commented 6 years ago

Ah, I see: actually, I think you're using the wrong package. Try this one instead: http://package.elm-lang.org/packages/elm-community/html-test-runner/latest

didierofrivia commented 6 years ago

With that package works like a charm. Still not sure how the versioning in elm-package.json works, hopefully it will be better in 0.19. Thanks, loads! Closing this.