mmport80

mmport80

Clean / Reproducible Builds

This week I upgraded from Phoenix 1.3 to 1.4.

Everything was compiling well on my machine afterwards.

This is the script I use to run a dev server

mix local.rebar --force;
mix local.hex --force;
mix clean;
mix deps.get --all;
mix compile;
iex --name api@127.0.0.1 -S mix phx.server;

I have a similar script which runs tests locally.

But after doing mix deps.clean --all and trying to recompile, I had a problem.

I have a custom Ecto type dependency → GitHub - OvermindDL1/ecto_interval: Interval type for Ecto, currently only implemented for PostgreSQL, other database PR's are welcome. · GitHub Which seems to have dependency problems. I have to figure that out.

(Turns out, just needed to update it to the latest version)

But my question is, what do you do to ensure your builds are reproducible and you catch problems like this?

I am sure I am committing a common mistake, perhaps it would be a good idea to somehow simplify the required mix commands…

Most Liked

easco

easco

In my experience with Docker, it is convenient to add the “deps” and “_build” folders to the .dockerignore file so that they are not mapped into the environment in which the image is built (forcing a recompile while the image is being constructed).

stefanchrobot

stefanchrobot

For Continuous Integration (test, formatter, Credo) and deployment we’re using Dockerized versions of our apps. Looks pretty much the same as your script: we set MIX_ENV and there’s no need for mix clean. For local development, we use the regular flow.

stefanchrobot

stefanchrobot

Can you check to what versions did you deps resolve? Maybe they were not properly pinned?

Where Next?

Popular in Questions Top

nobody
How to bind a phoenix app to a specific ip address? could not find anything about that, nowhere, unfortunately, but for me this is quite...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Other popular topics Top

New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement