Skip to content

Commit 423a025

Browse files
authored
Don't export axes (#442)
1 parent 95f9474 commit 423a025

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ Currently, the `@compat` macro supports the following syntaxes:
259259

260260
* `Associative` is now `AbstractDict` ([#25012]).
261261

262-
* `indices` is now `axes` ([#25057]).
262+
* `indices` is now `axes` ([#25057]). This function is not exported from Compat to avoid
263+
conflicts with AxisArrays and other such packages.
263264

264265
* `Void` is now `Nothing` with an alias `Cvoid` for C interop ([#25162]).
265266

src/Compat.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,8 @@ end
999999
# 0.7.0-DEV.2978
10001000
@static if !isdefined(Base, :axes)
10011001
const axes = Base.indices
1002-
export axes
1002+
# NOTE: Intentionally not exported to avoid conflicts with AxisArrays
1003+
#export axes
10031004
end
10041005

10051006
# 0.7.0-DEV.3137

test/runtests.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -1043,9 +1043,9 @@ end
10431043
@test AbstractDict === (isdefined(Base, :AbstractDict) ? Base.AbstractDict : Base.Associative)
10441044

10451045
# 0.7.0-DEV.2978
1046-
@test axes === (isdefined(Base, :axes) ? Base.axes : Base.indices)
1047-
@test axes(1) == ()
1048-
@test axes(1,1) == 1:1
1046+
@test Compat.axes === (isdefined(Base, :axes) ? Base.axes : Base.indices)
1047+
@test Compat.axes(1) == ()
1048+
@test Compat.axes(1,1) == 1:1
10491049

10501050
# 0.7.0-DEV.3137
10511051
@test Nothing === (isdefined(Base, :Nothing) ? Base.Nothing : Base.Void)

0 commit comments

Comments
 (0)