elm-package
elm-package copied to clipboard
dependency solver bug
With these dependencies I was getting elm-html < 4 installed because elm-html-shorthand wanted that. After removing elm-html-shorthand everything worked as expected.
"dependencies": {
"circuithub/elm-html-shorthand": "9.0.0 <= v < 10.0.0",
"circuithub/elm-json-extra": "2.1.1 <= v < 3.0.0",
"elm-lang/core": "2.1.0 <= v < 3.0.0",
"evancz/elm-effects": "1.0.0 <= v < 2.0.0",
"evancz/elm-html": "4.0.1 <= v < 5.0.0",
"evancz/elm-http": "1.0.0 <= v < 2.0.0",
"evancz/start-app": "2.0.0 <= v < 3.0.0",
"evancz/virtual-dom": "2.0.0 <= v < 3.0.0",
"mgold/elm-date-format": "1.0.1 <= v < 2.0.0"
},
"elm-version": "0.15.1 <= v < 0.16.0"
Yep, we just encountered this too.
Steps to reproduce:
- Make an
elm-package.jsonwith the line"evancz/elm-html": "4.0.0 <= v < 5.0.0" - Add a dependency on a package containing the line
"evancz/elm-html": "3.0.0 <= v < 4.0.0" - Run
elm package install
Expected Result: elm package install gives you an error because these constraints cannot be satisfied.
Actual Result: you get elm-html 3.0.0 and everything seems fine until you try to use a 4.0.0 feature and get a compile error.
Is this still possible with 0.17.1?
Sorry, don't have my Elm setup anymore
I still get this in 0.18
My code expects less than v2.0.0 of package-b, and between v5.0.0 and v6.0.0 of package-a
// my elm-package.json
"dependencies": {
“package-a”: “5.0.0 <= v < 6.0.0",
“package-b”: “1.0.0 <= v < 2.0.0"
}
However, package-a just upgraded their package-b version range to v2.0.0 - v3.0.0
// package-a elm-package.json
"dependencies": {
"package-b": "2.0.0 <= v < 3.0.0"
}
When I now run elm-package install, I get this upgrade plan
Some new packages are needed. Here is the upgrade plan.
Install:
package-a 5.2.2
package-b 2.0.1
Do you approve of this plan? [Y/n]
Which, if approved, introduces breaking changes to my code.
Additionally, if I set my version range higher than is specified in package-a (say 3.0.0 <= v < 4.0.0) I immediately get the following (with no upgrade plan message/approval prompt):
Packages configured successfully
Which gives me an almost empty elm-stuff/ dir
elm-stuff/
├ packages/ <-- Empty
└ exact-dependencies.json <-- contains only {}