dimitarvp

dimitarvp

Hey everyone,
I am interested in making a tree diff of freshly generated Phoenix projects and projects that have been in development for a while. I’d just like to have it at quick glance what’s the difference from the bare-bones app that would be generated with the Phoenix generator versus the actual app.

To that end, I was unable to find a way to use several different versions of the same Mix archive and be able to specify which version of the archive to use.

In general, Mix archives seems rather awkward to manage and something that regularly catches me with my pants down. I keep forgetting to check for Phoenix’s Mix archive version, but others have bitten me in the past as well. Is there anything we as a community can do to help there, by the way?

And, is there a way to do what I am after? Except for installing a particular version, using it, then deleting it, then installing another etc.?

Showing Posts 1 to 6

NobbZ

NobbZ

You could install each in a different MIX_HOME. And switch to those when using different versions.

dimitarvp

dimitarvp OP

Oh, so this is like Ruby’s gemsets and OCaml’s OPAM’s switches? Cool, at least there’s a good workaround, thank you.

LostKobrakai

LostKobrakai

There‘s https://www.phoenixdiff.org/ for that as well.

dimitarvp

dimitarvp OP

But that’s just comparing different Phoenix versions?

EDIT: I am after comparing a project freshly generated by Phoenix’s generator, and an in-progress project that was earlier generated by the same version of the generator.

dimitarvp

dimitarvp OP

It seems that a little better granularity (and I suppose less file waste) can be achieved by utilizing the MIX_ARCHIVES env var, I’ll experiment and report back.

dimitarvp

dimitarvp OP

Confirmed that using the following commands yields slightly different projects and thus it can be used to “sandbox” using various mix archive-related commands (like phx.new and many others):

MIX_ARCHIVES="$HOME/.mix_phoenix-1.5.5" mix archive.install hex phx_new 1.5.5
mkdir ~/demo155
cd ~/demo155
MIX_ARCHIVES="$HOME/.mix_phoenix-1.5.5" mix phx.new demo

MIX_ARCHIVES="$HOME/.mix_phoenix-1.5.6" mix archive.install hex phx_new 1.5.6
mkdir ~/demo156
cd ~/demo156
MIX_ARCHIVES="$HOME/.mix_phoenix-1.5.6" mix phx.new demo

Doing diff -ur ~/demo155/demo ~/demo156/demo only shows differences between the secret_key_base and signing_salt variables (both irrelevant here) and – voila! – there are differences in mix.exs:

-      {:phoenix, "~> 1.5.5"},
+      {:phoenix, "~> 1.5.6"},

and:

-      {:phoenix_live_dashboard, "~> 0.2"},
+      {:phoenix_live_dashboard, "~> 0.3 or ~> 0.2.9"},

TL;DR: Using the MIX_ARCHIVES env var works perfectly for my goal.

Many thanks to @NobbZ for pointing me in the right direction.

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
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
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
apz
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
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
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews