AbstractMachinesLab/mix_caramel

src.yrl: no such file or directory when trying to run mix compile

michallepicki opened this issue · 2 comments

Steps to reproduce:

$ mix new sweetness
$ cd sweetness/
$ sed -i 's/deps: deps()/deps: [{:mix_caramel, git: "https:\/\/github.com\/AbstractMachinesLab\/mix_caramel"}], compilers: [:caramel] ++ Mix.compilers(), caramel_paths: ["ml_files"], caramel_release: "v0.1.0"/' mix.exs
$ mkdir ml_files && echo 'let hello () = Io.format "Hello, world!" []' > ml_files/hello.ml
$ mix deps.get
$ mix compile
warning: function deps/0 is unused
  mix.exs:22

==> mix_caramel
Compiling 1 file (.ex)
Generated mix_caramel app
Compiling hello.erl	OK

==> sweetness
Compiling 1 file (.yrl)
src.yrl: no such file or directory

I think the fix would be: detecting if the src directory is missing and potentially creating it?

Good point! This may need to be addressed at the caramel compile level with an --output-dir flag.

For the time being we could do a mkdir -p before moving the files.