fazibear

fazibear

Adding local elixir dependencies to erlang project

Hey. Long story short trying to add elixir to erlang project. Tried replace rebar3 with mix but with no luck. Now I’m trying add local elixir dependency to project. It kindly works. Problem is that every second run elixir part is not included.

Steps to reproduce:

$ rebar3 new app local_mix
$ cd local_mix
$ mix new ex_app

rebar.config:


{deps, [
    {ex_app, {path, "./ex_app"}}
  ]
}.

{shell, [
  % {config, "config/sys.config"},
    {apps, [local_mix]}
]}.

{plugins, [
    rebar3_path_deps,
    rebar_mix
]}.
  • rebar3 shell
  • 'Elixir.ExApp':hello(). - works
  • crtl-c
  • rebar3 shell
  • 'Elixir.ExApp':hello(). - undefined function

if you run rebar3 shell once again it will work :slight_smile:

Tried to mess with both of the rebar plugins, but can’t figure it out what is happening during building.

Thanks for help!

Most Liked

tristan

tristan

Rebar3 Core Team

Have you verified this is not an issue when using the path_deps plugin with rebar_mix? As in, doing it only with hex elixir dependencies.

Last Post!

fazibear

fazibear

Figured out something:

===> Verifying dependencies...
===> Upgrading ex_app (from {path,"./ex_app",{mtime,<<"2023-09-27T13:09:08Z">>}})
===> Compiling ex_app
Generated ex_app app
===> Analyzing applications...
===> Compiling local_mix
===> Booted local_mix

Now it’s working.

===> Verifying dependencies...
===> Upgrading ex_app (from {path,"./ex_app",{mtime,<<"2023-09-27T13:09:08Z">>}})
===> Analyzing applications...
===> Compiling local_mix

===> Booted local_mix

Now it’s not.
Just thinking but looks like ===> Upgrading ex_app line might remove app. And updating means “copying once again… but there is no compiled files anymore”

Didn’t found anything it those plugins that removes old app
Why It leaves app uncompiled (without ebin)

Any thoughts? Thanks!

Where Next?

Popular in Questions Top

joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a &gt; b) do {:ok, "a"} end if (a &lt; b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

Other popular topics Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

We're in Beta

About us Mission Statement