jcollard / elm-mode

Elm mode for emacs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

elm-compile-buffer should pass project-relative paths

endgame opened this issue · comments

If I clone an elm project, open a .elm file and run elm-compile-buffer on it, elm make gives me a cryptic "file not found" error. Testing in a shell makes me think that elm make always looks for project-relative files (elm make Foo.elm from src/ doesn't work, but elm make src/Foo.elm does).

This makes me thing you want to stick something like the following where you assemble the command to run:

(file-relative-name file (locate-dominating-file file "elm.json"))

The code already does that, so I suspect that this issue a special case of #141: namely, I think you're using Elm 0.19 and should set elm-package-json to elm.json.

Agreed.