Skip to content

Commit 8c89f41

Browse files
c42ffredrikekre
authored andcommitted
Fix bug in module deprecation from 0.9.0 release (#527)
With the bug, `using StaticArrays.FixedSizeArrays` did not result in a module name `FixedSizeArrays` in the current namespace, thus breaking explicitly qualified name lookups like `FixedSizeArrays.Vec(1,2)`. Provide a binding for this explicitly.
1 parent 448f9c9 commit 8c89f41

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/FixedSizeArrays.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ module FixedSizeArraysWillBeRemoved
1010

1111
using ..StaticArrays
1212

13+
const FixedSizeArrays = FixedSizeArraysWillBeRemoved
14+
export FixedSizeArrays # Ensure deprecated module name is in scope after import
15+
1316
export FixedArray
1417
export FixedVector
1518
export FixedMatrix
@@ -189,4 +192,4 @@ end
189192
end
190193

191194
Base.@deprecate_binding FixedSizeArrays FixedSizeArraysWillBeRemoved #=
192-
=# false "StaticArrays.FixedSizeArrays is deprecated. Use StaticArrays directly."
195+
=# false ". Use StaticArrays directly."

src/ImmutableArrays.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ module ImmutableArraysWillBeRemoved
22

33
using ..StaticArrays
44

5+
const ImmutableArrays = ImmutableArraysWillBeRemoved
6+
export ImmutableArrays # Ensure deprecated module name is in scope after import
7+
58
Vector1{T} = SVector{1,T}
69
Vector2{T} = SVector{2,T}
710
Vector3{T} = SVector{3,T}
@@ -36,4 +39,4 @@ export Vector1, Vector2, Vector3, Vector4,
3639
end # module
3740

3841
Base.@deprecate_binding ImmutableArrays ImmutableArraysWillBeRemoved #=
39-
=# false "StaticArrays.ImmutableArrays is deprecated. Use StaticArrays directly."
42+
=# false ". Use StaticArrays directly."

0 commit comments

Comments
 (0)