nicnilov

nicnilov

Recently I noticed that when I save a source file from my editor while having an IEx session running, the latter automatically recompiles my project. I’m pretty sure this never happened before, even though an LLM states this behavior has been going on since Elixir 1.15. Previously I’d use either an explicit recompile call in IEx, or just ran an HTTP request against an app endpoint which also did trigger recompilation.

This behavior is pretty confusing, since I’m not really sure when and why it started (although it did just some days ago), and I haven’t found a way to disable it. I’m aware about the IEx’s auto_reload feature which is disabled in my setup and is about reloading, and not recompilation anyway.

I’d like my IEx state to be unaffected by whatever intermediary edits I happen to do in the code until I decide to apply those explicitly. Please let me know what I’m missing.

Showing Posts 1 to 5

josevalim

josevalim

Creator of Elixir

We don’t autoreload automatically, unless you opt-in via auto_reload (as you mentioned) or unless you are using iex -S mix phx.server (as the Phoenix server autoreloads).

nicnilov

nicnilov OP

That’s what I was trying to highlight, but didn’t manage, sorry. I’m not asking about the auto_reload, which is, as you point out, opt-in anyway. It is about automatic recompilation. After I save a file in an editor, I see in my IEx:

Compiling 1 file (.ex)
Generated myapp app

I’d like to disable that behavior. When I’m ready to recompile, I’d prefer to explicitly do recompile() in IEx or send a browser request, this is the way it’s been for me for a long time.

josevalim

josevalim

Creator of Elixir

Are you using Phoenix? Once again, we don’t do it by default. But if you are using Phoenix and the browser is open, auto reload will kick in and reload the page, leading to recompilations, and it has worked like this forever. :slight_smile:

nicnilov

nicnilov OP

I really need to bring my question asking together. Sorry for not giving enough information right away. Yes, I am using Phoenix, but only to serve API endpoints, there is no LiveView or anything. There is also no browser when this happens - its just IEx and an editor (either Cursor or a basic vim setup)…

Thank you for making me elaborate all this!

While I don’t have a browser, I recently added Prometheus and Grafana to my setup and they do generate frequent requests. So what I was taking for some unfamiliar IEx activity was just a regular recompilation during an incoming request.

Thanks again and sorry for all the noise :blush:

josevalim

josevalim

Creator of Elixir

No problem, glad you figured it out! :heart:

— All posts loaded —

Where Next? Top

Trending in Questions Top

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
matt-savvy
Anyone here using Honeybadger? My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of Bandit.HTTPError...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews