Commit 3819238
authored
replace
Changes `MethodInfoKey` from a `Pair` type alias to a proper struct,
avoiding type piracy that would be introduced by defining
`Pair{...}(::Method)` conversion methods. The struct implements
`Base.iterate` to maintain compatibility with destructuring patterns.
This is a breaking change as it changes the representation of method
info keys, which packages like LCU and Revise depend heavily on. So we
unfotunately need to bump the major version from 2 to 3.
As an alternative, removing `Pair{...}(::Method)` would also be
possible, but that would also break LCU and Revise, so I'm taking this
approach which appears to be a better and moer complete fix.MethodInfoKey Pair alias with struct to avoid type piracy (#149)1 parent c5463b6 commit 3819238
2 files changed
+17
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
39 | 53 | | |
40 | 54 | | |
41 | 55 | | |
| |||
0 commit comments