AbstractMachinesLab / mix_caramel

:candy: A Mix plugin to use Caramel
Apache License 2.0
17 stars 4 forks source link

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

Open michallepicki opened 3 years ago

michallepicki commented 3 years ago

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
michallepicki commented 3 years ago

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

leostera commented 3 years ago

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.