Skip to content

Commit

Permalink
make only available for tests in older julia versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jw3126 committed Jan 14, 2022
1 parent c6ac02c commit 0c82e52
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Accessors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ using MacroTools
using MacroTools: isstructdef, splitstructdef, postwalk
using Requires: @require

include("setindex.jl")
include("optics.jl")
include("sugar.jl")
include("functionlenses.jl")
include("testing.jl")


if !isdefined(Base, :only)
Expand All @@ -22,4 +17,10 @@ function __init__()
@require StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" include("staticarrays.jl")
end

include("setindex.jl")
include("optics.jl")
include("sugar.jl")
include("functionlenses.jl")
include("testing.jl")

end
3 changes: 3 additions & 0 deletions test/test_core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ using Accessors: test_getset_laws, test_modify_law
using Accessors: compose, get_update_op
using ConstructionBase: ConstructionBase
using StaticNumbers: StaticNumbers, static
if !isdefined(Base, :only)
using Accessors: only
end

struct T
a
Expand Down

0 comments on commit 0c82e52

Please sign in to comment.