Starting a conversation per this pull request:
https://github.com/elixir-lang/elixir/pull/10291
The PR does the following:
--------------------------
Add the mix deps.add task. Supports options such as:
mix deps.add foo --version 1.2.3
mix deps.add foo (pulls latest version from hex)
mix deps.add foo --no-runtime
mix deps.add foo --only test --only dev
mix deps.add foo --path ../foo
---------------------------
José's reply:
----------------------------
I personally worried about going the string matching route. There are just
too many things that can go wrong. For example, someone can even define all
deps inline such as [{:foo, :bar}, {:baz, :bat}]. And this makes me
skeptical about adding such solution to core. Ideally we would do something
that hooks into the code formatter engine but even that has other
complexities.
----------------------------
I definitely agree that the string parsing method is less than ideal,
however I think it could be strengthened to deal with the most common
formatter-legal possibilities, and we could validate mix.exs is formatted
before running. For example the inline example given was a simple
additional case for parsing (already pushed a fix), and we fail gracefully
if a deps function isn't able to be identified. Either way, the current
string parsing or some other parsing method, I would love to see this
feature make it across the finish line sometime soon.
-Mike Binns
GH: TheFirstAvenger
--
You received this message because you are subscribed to the Google Groups
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elixir-lang-core/4540228d-1c7d-4065-b30a-c7f5a70f1b02n%40googlegroups.com.