This PR removes the requirement to add # uniform:deps comments around your deps in mix.exs.
I think some folks could find that requirement off putting. (Some might consider it hacky.) So I think this removes a slight potential barrier of adoption.
Tradeoffs involved
[Con] The mix.exs pruning code is more complicated.
[Con] Uniform is no longer a zero-dependency package. (Adds Sourceror)
[Pro] Ejected mix.exs will no longer convert all trailing deps without options into keyword format.
"Keyword format" explanation
Regarding the "Pro" about keyword format, here's what an ejected mix.exs would look like before this PR:
We were using Code.string_to_quoted!, which emits a different form of AST that causes Macro.to_string! to convert {:foo, "bar"} into foo: "bar" in certain places. That's not the typical syntax in mix.exs, so it's probably not preferable.
This PR removes the requirement to add
# uniform:deps
comments around your deps inmix.exs
.I think some folks could find that requirement off putting. (Some might consider it hacky.) So I think this removes a slight potential barrier of adoption.
Tradeoffs involved
mix.exs
pruning code is more complicated.mix.exs
will no longer convert all trailing deps without options into keyword format."Keyword format" explanation
Regarding the "Pro" about keyword format, here's what an ejected
mix.exs
would look like before this PR:We were using
Code.string_to_quoted!
, which emits a different form of AST that causesMacro.to_string!
to convert{:foo, "bar"}
intofoo: "bar"
in certain places. That's not the typical syntax inmix.exs
, so it's probably not preferable.With this PR, we'll now emit: