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.?
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #ai
- #genstage
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










Showing Posts 1 to 6- Show Best Posts
- Show All Posts (oldest first)
- Show All Posts (newest first)
NobbZ
You could install each in a different
MIX_HOME. And switch to those when using different versions.dimitarvp
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
There‘s https://www.phoenixdiff.org/ for that as well.
dimitarvp
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
It seems that a little better granularity (and I suppose less file waste) can be achieved by utilizing the
MIX_ARCHIVESenv var, I’ll experiment and report back.dimitarvp
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.newand many others):Doing
diff -ur ~/demo155/demo ~/demo156/demoonly shows differences between thesecret_key_baseandsigning_saltvariables (both irrelevant here) and – voila! – there are differences inmix.exs:and:
TL;DR: Using the
MIX_ARCHIVESenv var works perfectly for my goal.Many thanks to @NobbZ for pointing me in the right direction.