Commit bea42a2
committed
test: recognise fully qualified Mix.Tasks aliases
`defmodule Elixir.Mix.Tasks.Castle.X` names the same module as
`defmodule Mix.Tasks.Castle.X`, but parses to an alias with an extra
leading segment - `[Elixir, :Mix, :Tasks, ...]` rather than
`[:Mix, :Tasks, ...]` - so the matcher walked straight past it. Guarded
by a `Mix.env()` branch it was invisible to the beam check as well, which
is the state the two checks exist to make impossible between them.
Recognition now strips the leading `Elixir` before testing the segments.
`Module.concat/1` already renders both spellings as `Mix.Tasks.Castle.X`,
so only the recognition needed to know about the prefix, and the reported
name is unchanged.
A case pins the qualified form inside an environment branch, alongside
the parenthesised and literal-atom ones. Verified against a planted
`lib/mix/tasks/qualified.ex`, which the source check now reports and the
test-environment beam check still cannot see.
Claude-Session: https://claude.ai/code/session_01RotroiBdbidiCRX3KqE3Dy1 parent bbd096c commit bea42a2
2 files changed
Lines changed: 38 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1663 | 1663 | | |
1664 | 1664 | | |
1665 | 1665 | | |
1666 | | - | |
1667 | | - | |
1668 | | - | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
1669 | 1671 | | |
1670 | 1672 | | |
1671 | 1673 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
142 | 160 | | |
143 | 161 | | |
144 | 162 | | |
| |||
171 | 189 | | |
172 | 190 | | |
173 | 191 | | |
174 | | - | |
175 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
176 | 195 | | |
177 | 196 | | |
178 | 197 | | |
| |||
200 | 219 | | |
201 | 220 | | |
202 | 221 | | |
203 | | - | |
204 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
205 | 226 | | |
206 | 227 | | |
207 | 228 | | |
| |||
217 | 238 | | |
218 | 239 | | |
219 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
220 | 249 | | |
221 | 250 | | |
0 commit comments