elm-make
elm-make copied to clipboard
bad error when bad constraint is added by hand
elm version: 0.17
I added "elm-lang/keyboard": "1.1.0 <= v < 2.0.0"
to my elm-package.json
(should have been 1.0.0
, since that's the latest available version) and ran elm-make
. It failed with
elm-make: elm-stuff/exact-dependencies.json: openBinaryFile: does not exist (No such file or directory)
which is technically correct, but doesn't really explain the problem.
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.
Can you give more information about your setup? What is the content of your elm-package.json
? How did you add this line? How did you set up your project?
From the message, it looks like you got your project into a weird configuration with the steps you took to get there.
I had an existing project that I wanted to add keyboard support to, so I added "elm-lang/keyboard": "1.1.0 <= v < 2.0.0"
to my elm-package.json
, blew away elm-stuff/
, and ran elm-make
. (I added it manually by copy/pasting the line for elm-lang/svg, which is how I ended up with 1.1.0).
Easy way to reproduce: Add this file to a clean directory
{
"version": "1.0.0",
"summary": "let people do a cool thing in a fun way",
"repository": "https://github.com/user/project.git",
"license": "BSD3",
"source-directories": [
"."
],
"exposed-modules": [],
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-lang/html": "1.0.0 <= v < 2.0.0",
"elm-lang/keyboard": "1.1.0 <= v < 2.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}
run elm-make
(which will fail with the error message about elm-stuff/exact-dependencies.json
not existing)
Now edit the last line of the dependencies to read
"elm-lang/keyboard": "1.0.0 <= v < 2.0.0"
and run elm-make
again, which will succeed.
It should fail with a helpful error message when it fails to generate elm-stuff/exact-dependencies.json
, not with a file-not-found when it fails to read it back.
Thanks for the report for when things are added by hand. For now I recommend using commands like elm-package install elm-lang/keyboard
to do this!
ah :) didn't realise that elm-package would do this for me.