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.?
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.
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.
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):
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: