You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first of quick reminder: im very new to caramel and have only very limited experience with ocaml so maybe this problem is on my part
Bug Description
When trying to build a project, which contains multiple ml files I get errors that there are unbound modules. When building the files standalone with caramel compile everything works.
Project Layout
I have the standard layout provided by mix new
Additionally a new folder "src" in which I have put my .ml files
defmoduleCaramelExternal.MixProjectdouseMix.Projectdefprojectdo[app: :caramel_external,version: "0.1.0",elixir: "~> 1.11",start_permanent: Mix.env()==:prod,deps: deps(),compilers: [:caramel]++Mix.compilers(),caramel_paths: ["src"],caramel_release: "v0.1.1"]end# Run "mix help compile.app" to learn about applications.defapplicationdo[extra_applications: [:logger]]end# Run "mix help deps" to learn about dependencies.defpdepsdo[{:mix_caramel,github: "AbstractMachinesLab/mix_caramel",branch: :main}]endend
if I howerver compile the files directly the compilation succeeds
λ ~/code/local/caramel_external/src/ caramel compile user.ml rand.ml
Compiling user.erl OK
after running caramel compile im also able to use the external function:
Yes I know it tries to recompile and fails but when failing it actually does not overwrite the previously created file...
λ ~/code/local/caramel_external/src/ caramel compile rand.ml user.ml
Compiling user.erl OK
λ ~/code/local/caramel_external/src/ cd ..
λ ~/code/local/caramel_external/ iex -S mix
Erlang/OTP 23 [erts-11.2.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]
🍬 Using Caramel v0.1.1
Unbound module Rand
Compiling 1 file (.erl)
Compiling 1 file (.ex)
Interactive Elixir (1.11.3) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :user.do_rand
0.7062713648102463
iex(2)>
The text was updated successfully, but these errors were encountered:
first of quick reminder: im very new to caramel and have only very limited experience with ocaml so maybe this problem is on my part
Bug Description
When trying to build a project, which contains multiple ml files I get errors that there are unbound modules. When building the files standalone with
caramel compile
everything works.Project Layout
I have the standard layout provided by
mix new
Additionally a new folder "src" in which I have put my .ml files
mix.exs
user.ml
rand.ml
running mix compile:
if I howerver compile the files directly the compilation succeeds
after running
caramel compile
im also able to use the external function:Yes I know it tries to recompile and fails but when failing it actually does not overwrite the previously created file...
The text was updated successfully, but these errors were encountered: