mix format passes the :sigils option to a plugin invoked for a file
extension, but not to a plugin invoked for a sigil, because the sigil
formatter closure captures the options before :sigils is put into them.
A plugin that formats embedded Elixir code therefore cannot dispatch a
sigil nested inside the sigil it is formatting by passing on the options
it received, so the same snippet formats differently in a .heex file and
in an ~H sigil.
The sigil formatters are part of the options they receive, so a private
function rebuilds the list whenever a sigil is formatted.
This partially reverts aad63173 as it caused
massive AST to generate when expanding guards
with `expr in [...]` checks in them, as each
`or` became a full-blown case expression.
Alternative approaches will be explored in
future releases.
A fetched git dependency could report {:ok, vsn} from its
stale .app before Mix checked the stored SCM manifest lock.
If the same dependency then appeared again through a stricter
transitive requirement, the converger would mark it as
:divergedreq instead of :compile.
Validate the SCM manifest while loading the dependency so
fetchable deps with a stale stored lock are marked for
compilation before convergence reuses their status.
Add regression tests for the transitive git case and for
the direct converger case.
Closes#15406.
* Remove compatibility code for OTP26-
* Remove support for application/erlang+html docs v1
* Remove workaround for bug in older OTP versions
* Update OTP version checks
* Remove OTP25- skipping in tests
* More test cleanup
Provides an error message in favor of
```
mix xref graph --format cycles --min-cycle-label 0 --label compile-connected
** (FunctionClauseError) no function clause matching in Enum.count_until/3
The following arguments were given to Enum.count_until/3:
# 1
[{"lib/foo.ex", nil}, {"lib/bar.ex", nil}]
# 2
#Function<4.83728021/1 in Mix.Tasks.Xref.cycle_filter_fn/1>
# 3
0
Attempted function clauses (showing 1 out of 1):
def count_until(enumerable, fun, limit) when is_integer(limit) and limit > 0
(elixir 1.19.4) lib/enum.ex:783: Enum.count_until/3
(mix 1.19.4) lib/mix/tasks/xref.ex:1247: anonymous fn/3 in Mi
```
When GIT_TRACE=1 is set in the env, `mix deps.get` fails with an
unexpected `FunctionClauseError` due to `git --version`'s output
including trace output from git itself:
```
λ GIT_TRACE=1 mix deps.get
* Getting ariel (git@github.com:foo/bar.git - main)
22:17:06.786357 git.c:476 trace: built-in: git init --quiet
22:17:06.798692 git.c:476 trace: built-in: git remote add origin git@github.com:foo/bar.git
22:17:06.804333 git.c:476 trace: built-in: git config remote.origin.url git@github.com:foo/bar.git
** (FunctionClauseError) no function clause matching in Mix.SCM.Git.parse_version/1
The following arguments were given to Mix.SCM.Git.parse_version/1:
# 1
"22:17:06.809548 git.c:476 trace: built-in: git version\ngit version 2.50.1\n"
Attempted function clauses (showing 1 out of 1):
defp parse_version(<<"git version ", version::binary>>)
(mix 1.18.4) lib/mix/scm/git.ex:426: Mix.SCM.Git.parse_version/1
(mix 1.18.4) lib/mix/scm/git.ex:419: Mix.SCM.Git.git_version/0
(mix 1.18.4) lib/mix/scm/git.ex:132: Mix.SCM.Git.checkout/2
(elixir 1.18.4) lib/file.ex:1665: File.cd!/2
(mix 1.18.4) lib/mix/dep/fetcher.ex:68: Mix.Dep.Fetcher.do_fetch/3
(mix 1.18.4) lib/mix/dep/converger.ex:238: Mix.Dep.Converger.all/9
(mix 1.18.4) lib/mix/dep/converger.ex:170: Mix.Dep.Converger.init_all/8
(mix 1.18.4) lib/mix/dep/converger.ex:110: Mix.Dep.Converger.all/4
```
This patch updates `git_version` to handle trace noise by running
parse on the final output line of `git --version`.
New `deps.git_test` added to exercise the `GIT_TRACE` condition.
* Update lib/mix/test/mix/tasks/deps.git_test.exs
---------
Co-authored-by: José Valim <jose.valim@gmail.com>