BioJulia/Automa.jl

Automa fails tests for julia v0.7

TransGirlCodes opened this issue · 1 comments

The recent release does not actually test successfully for me, and it looks like travis did not test it properly:

Executing the default test script
ERROR: UndefVarError: STDIN not defined
Stacktrace:
 [1] top-level scope at none:0
Package name determined from repository url to be 
`src/.jl` not found, repository is not a valid Julia package so the default test script is empty

On machine:

(v0.7) pkg> test Automa
   Testing Automa
    Status `/var/folders/h0/fmczc7390c7f_ddk7yxc47h801tjlx/T/tmp5dZb3J/Manifest.toml`
  [67c07d97] Automa v0.6.2
  [34da2185] Compat v1.0.1
  [864edb3b] DataStructures v0.10.0
  [3bb67fe8] TranscodingStreams v0.5.4
  [2a0f44e3] Base64  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/Base64`]
  [ade2ca70] Dates  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/Dates`]
  [8bb1440f] DelimitedFiles  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/DelimitedFiles`]
  [8ba89e20] Distributed  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/Distributed`]
  [b77e0a4c] InteractiveUtils  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/InteractiveUtils`]
  [76f85450] LibGit2  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/LibGit2`]
  [8f399da3] Libdl  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/Libdl`]
  [37e2e46d] LinearAlgebra  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/LinearAlgebra`]
  [56ddb016] Logging  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/Logging`]
  [d6f4376e] Markdown  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/Markdown`]
  [a63ad114] Mmap  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/Mmap`]
  [44cfe95a] Pkg  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/Pkg`]
  [de0858da] Printf  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/Printf`]
  [3fa0cd96] REPL  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/REPL`]
  [9a3f8284] Random  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/Random`]
  [ea8e919c] SHA  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/SHA`]
  [9e88b42a] Serialization  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/Serialization`]
  [1a1011a3] SharedArrays  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/SharedArrays`]
  [6462fe0b] Sockets  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/Sockets`]
  [2f01184e] SparseArrays  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/SparseArrays`]
  [10745b16] Statistics  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/Statistics`]
  [8dfed614] Test  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/Test`]
  [cf7118a7] UUIDs  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/UUIDs`]
  [4ec0a83e] Unicode  [`~/github/julia_nightly/usr/bin/../share/julia/stdlib/v0.7/Unicode`]
Test Summary: | Pass  Total
SizedMemory   |   18     18
┌ Warning: `start(s::AbstractString)` is deprecated, use `firstindex(s)` instead.
│   caller = escape_re_string(::Base.GenericIOBuffer{Array{UInt8,1}}, ::String) at re.jl:120
└ @ Automa.RegExp ~/.julia/packages/Automa/4aEV/src/re.jl:120
┌ Warning: `done(s::AbstractString, i::Integer)` is deprecated, use `i > ncodeunits(s)` instead.
│   caller = escape_re_string(::Base.GenericIOBuffer{Array{UInt8,1}}, ::String) at re.jl:121
└ @ Automa.RegExp ~/.julia/packages/Automa/4aEV/src/re.jl:121
┌ Warning: `next(s::AbstractString, i::Integer)` is deprecated, use `iterate(s, i)` instead.
│   caller = escape_re_string(::Base.GenericIOBuffer{Array{UInt8,1}}, ::String) at re.jl:122
└ @ Automa.RegExp ~/.julia/packages/Automa/4aEV/src/re.jl:122
┌ Warning: `start(s::AbstractString)` is deprecated, use `firstindex(s)` instead.
│   caller = parse(::String) at re.jl:162
└ @ Automa.RegExp ~/.julia/packages/Automa/4aEV/src/re.jl:162
┌ Warning: `done(s::AbstractString, i::Integer)` is deprecated, use `i > ncodeunits(s)` instead.
│   caller = parse(::String) at re.jl:164
└ @ Automa.RegExp ~/.julia/packages/Automa/4aEV/src/re.jl:164
┌ Warning: `next(s::AbstractString, i::Integer)` is deprecated, use `iterate(s, i)` instead.
│   caller = parse(::String) at re.jl:165
└ @ Automa.RegExp ~/.julia/packages/Automa/4aEV/src/re.jl:165
┌ Warning: `done(s::AbstractString, i::Integer)` is deprecated, use `i > ncodeunits(s)` instead.
│   caller = parse_class(::String, ::Int64) at re.jl:241
└ @ Automa.RegExp ~/.julia/packages/Automa/4aEV/src/re.jl:241
┌ Warning: `next(s::AbstractString, i::Integer)` is deprecated, use `iterate(s, i)` instead.
│   caller = parse_class(::String, ::Int64) at re.jl:242
└ @ Automa.RegExp ~/.julia/packages/Automa/4aEV/src/re.jl:242
┌ Warning: `foldl(op, v0, itr)` is deprecated, use `foldl(op, itr; init=v0)` instead.
│   caller = shallow_desugar(::Automa.RegExp.RE) at re.jl:293
└ @ Automa.RegExp ~/.julia/packages/Automa/4aEV/src/re.jl:293
ERROR: LoadError: MethodError: convert(::Type{Automa.StableDict{Automa.NFANode,Nothing}}, ::Automa.StableDict{Automa.NFANode,Nothing}) is ambiguous. Candidates:
  convert(::Type{Automa.StableDict{K,V}}, dict::AbstractDict) where {K, V} in Automa at /Users/bward/.julia/packages/Automa/4aEV/src/sdict.jl:53
  convert(::Type{T}, x::T) where T<:AbstractDict in Base at abstractdict.jl:513
Possible fix, define
  convert(::Type{Automa.StableDict{K,V}}, ::Automa.StableDict{K,V})
Stacktrace:
 [1] Type at ./pair.jl:12 [inlined]
 [2] Pair(::Symbol, ::Automa.StableDict{Automa.NFANode,Nothing}) at ./pair.jl:15
 [3] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Automa.StableDict{Automa.NFANode,Nothing}) at ./dict.jl:25
 [4] show_delim_array(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Tuple{DataType,Automa.StableDict{Automa.NFANode,Nothing}}, ::Char, ::Char, ::Char, ::Bool, ::Int64, ::Int64) at ./show.jl:695
 [5] show_delim_array at ./show.jl:680 [inlined]
 [6] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Tuple{DataType,Automa.StableDict{Automa.NFANode,Nothing}}) at ./show.jl:714
 [7] show_default(::Base.GenericIOBuffer{Array{UInt8,1}}, ::Any) at ./show.jl:333
 [8] show(::Base.GenericIOBuffer{Array{UInt8,1}}, ::Any) at ./show.jl:316
 [9] #sprint#329(::Nothing, ::Int64, ::Function, ::Function, ::MethodError, ::Vararg{Any,N} where N) at ./strings/io.jl:101
 [10] #sprint at ./none:0 [inlined]
 [11] #repr#331 at ./strings/io.jl:195 [inlined]
 [12] repr at ./strings/io.jl:195 [inlined]
 [13] Test.Error(::Symbol, ::Expr, ::MethodError, ::Array{Union{Ptr{Nothing}, InterpreterIP},1}, ::LineNumberNode) at /Users/bward/github/julia_nightly/usr/share/julia/stdlib/v0.7/Test/src/Test.jl:144
 [14] macro expansion at /Users/bward/.julia/packages/Automa/4aEV/test/runtests.jl:43 [inlined]
 [15] macro expansion at /Users/bward/github/julia_nightly/usr/share/julia/stdlib/v0.7/Test/src/Test.jl:1079 [inlined]
 [16] top-level scope at /Users/bward/.julia/packages/Automa/4aEV/test/runtests.jl:42
 [17] include at ./boot.jl:317 [inlined]
 [18] include_relative(::Module, ::String) at ./loading.jl:1040
 [19] include(::Module, ::String) at ./sysimg.jl:29
 [20] include(::String) at ./client.jl:398
 [21] top-level scope at none:0
in expression starting at /Users/bward/.julia/packages/Automa/4aEV/test/runtests.jl:41
ERROR: Package Automa errored during testing

I've tried a little bit to support Julia 0.6 and 0.7 in the same source code and found it difficult due to the iteration protocol change. So, I'm going to drop 0.6 support and rewrite things for Julia 0.7/1.0.