Skip to content

Commit

Permalink
Mark Compat.InteractiveUtils from #485 for deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed Oct 8, 2019
1 parent 556c767 commit 838ef8b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 34 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ Currently, the `@compat` macro supports the following syntaxes:

## Module Aliases

* `using Compat.InteractiveUtils` is provided on versions older than 0.7, where this library is
not yet part of the standard library ([#25780]).

* `using Compat.LibGit2` is provided on versions older than 0.7, where this library is
not yet part of the standard library ([#25706]).

Expand Down
24 changes: 1 addition & 23 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const IteratorEltype = Base.IteratorEltype
enable_debug(x::Bool) = x
import Distributed
import Pkg
import InteractiveUtils


include("compatmacro.jl")
Expand All @@ -73,29 +74,6 @@ end
end
end

@static if VERSION < v"0.7.0-DEV.3630"
@eval module InteractiveUtils
using Base: @code_llvm, @code_lowered, @code_native, @code_typed,
@code_warntype, @edit, @functionloc, @less, @which,
apropos, code_llvm, code_native, code_warntype, edit,
less, methodswith, subtypes, versioninfo
export @code_llvm, @code_lowered, @code_native, @code_typed,
@code_warntype, @edit, @functionloc, @less, @which,
apropos, code_llvm, code_native, code_warntype, edit,
less, methodswith, subtypes, versioninfo

@static if VERSION >= v"0.7.0-DEV.2582"
using Base: varinfo
export varinfo
else
const varinfo = whos
export varinfo
end
end
else
import InteractiveUtils
end

@static if VERSION < v"0.7.0-DEV.3724"
const LibGit2 = Base.LibGit2
else
Expand Down
8 changes: 8 additions & 0 deletions test/old.jl
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,14 @@ module TestPkg
@test isdefined(Compat.Pkg, :add)
end

module TestInteractiveUtils
using Compat
using Compat.InteractiveUtils
using Compat.Test
@test isdefined(@__MODULE__, :InteractiveUtils)
@test isdefined(@__MODULE__, :varinfo)
end


# tests of removed functionality (i.e. justs tests Base)

Expand Down
8 changes: 0 additions & 8 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@ end

@test codeunit("foo") == codeunit(SubString("fooαβγ",1,3)) == UInt8

module TestInteractiveUtils
using Compat
using Compat.InteractiveUtils
using Compat.Test
@test isdefined(@__MODULE__, :InteractiveUtils)
@test isdefined(@__MODULE__, :varinfo)
end

module TestLibGit2
using Compat
using Compat.LibGit2
Expand Down

0 comments on commit 838ef8b

Please sign in to comment.