Skip to content

Instantly share code, notes, and snippets.

@rschwarz
Created May 16, 2020 06:05
Show Gist options
  • Select an option

  • Save rschwarz/a0368d51ea7d9b458e64e3d7f00a0c5c to your computer and use it in GitHub Desktop.

Select an option

Save rschwarz/a0368d51ea7d9b458e64e3d7f00a0c5c to your computer and use it in GitHub Desktop.
StackOverflowError with Test.detect_ambiguities
[deps]
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.4.0 (2020-03-21)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> JuliaSnail.start(10011);
(@v1.4) pkg> activate .
Activating environment at `~/in/ambig_stackoverflow/Project.toml`
julia> using Test
julia> Test.detect_ambiguities(Base; recursive=false)
0-element Array{Tuple{Method,Method},1}
julia> using SparseArrays
julia> Test.detect_ambiguities(SparseArrays; recursive=false)
0-element Array{Tuple{Method,Method},1}
julia> Test.detect_ambiguities(SparseArrays, Base; recursive=false)
0-element Array{Tuple{Method,Method},1}
julia> using MathOptInterface
julia> Test.detect_ambiguities(SparseArrays, Base; recursive=false)
ERROR: StackOverflowError:
Stacktrace:
[1] _methods_by_ftype at ./reflection.jl:841 [inlined]
[2] _methods_by_ftype(::Any, ::Int64, ::UInt64) at ./reflection.jl:838
[3] isambiguous(::Method, ::Method; ambiguous_bottom::Bool) at ./reflection.jl:1301
[4] detect_ambiguities(::Module, ::Vararg{Module,N} where N; imported::Bool, recursive::Bool, ambiguous_bottom::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Test/src/Test.jl:1440
[5] top-level scope at REPL[9]:1
julia> versioninfo()
Julia Version 1.4.0
Commit b8e9a9ecc6 (2020-03-21 16:36 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-8.0.1 (ORCJIT, haswell)
Environment:
JULIALANG_HOME = /home/rs/opt/julia
JULIA_ERROR_COLOR = red
(ambig_stackoverflow) pkg> st
Status `~/in/ambig_stackoverflow/Project.toml`
[b8f27783] MathOptInterface v0.9.13
julia>
using Test
Test.detect_ambiguities(Base; recursive=false)
# OK
using SparseArrays
Test.detect_ambiguities(SparseArrays; recursive=false)
# OK
Test.detect_ambiguities(SparseArrays, Base; recursive=false)
# OK
using MathOptInterface
Test.detect_ambiguities(SparseArrays, Base; recursive=false)
# now: StackOverflow!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment