jcollard / elm-mode

Elm mode for emacs
GNU General Public License v3.0
373 stars 67 forks source link

elm-compile-buffer should pass project-relative paths #148

Closed endgame closed 5 years ago

endgame commented 5 years ago

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"))
purcell commented 5 years ago

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.

endgame commented 5 years ago

Agreed.