Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MethodError: no method matching length(::DocOpt.Tokens) #14

Closed
jeff-regier opened this issue Jul 21, 2016 · 2 comments
Closed

MethodError: no method matching length(::DocOpt.Tokens) #14

jeff-regier opened this issue Jul 21, 2016 · 2 comments

Comments

@jeff-regier
Copy link

Some of the recent change to Julia 0.5 may have been breaking...I see 5 months ago DocOpt passed on travis-ci with nightly, but it looks like it hasn't been run lately. I'm getting the follow error now, with the latest version of Julia 0.5:

julia> Pkg.test("DocOpt")
INFO: Testing DocOpt
Error During Test
  Test threw an exception of type MethodError
  Expression: parse_argv(ts("-h arg -- -v"),o) == [Option("-h",nothing,0,true),Argument(nothing,"arg"),Argument(nothing,"--"),Argument(nothing,"-v")]
  MethodError: no method matching length(::DocOpt.Tokens)
  Closest candidates are:
    length(::SimpleVector)
    length(::Base.MethodList)
    length(::MethodTable)
    ...
   in _array_for at ./array.jl:255 [inlined]
   in collect(::Base.Generator{DocOpt.Tokens,DocOpt.##25#27}) at ./array.jl:269
   in parse_argv(::DocOpt.Tokens, ::Array{DocOpt.Option,1}, ::Bool) at /global/homes/j/jregier/.julia/v0.5/DocOpt/src/DocOpt.jl:492
   in test_parse_argv() at /global/u2/j/jregier/.julia/v0.5/DocOpt/test/runtests.jl:112
   in include_from_node1(::String) at ./loading.jl:426
   in process_options(::Base.JLOptions) at ./client.jl:262
   in _start() at ./client.jl:318
ERROR: LoadError: There was an error during testing
 in record(::Base.Test.FallbackTestSet, ::Base.Test.Error) at ./test.jl:397
 in do_test(::Base.Test.Threw, ::Expr) at ./test.jl:281
 in test_parse_argv() at /global/u2/j/jregier/.julia/v0.5/DocOpt/test/runtests.jl:112
 in include_from_node1(::String) at ./loading.jl:426
 in process_options(::Base.JLOptions) at ./client.jl:262
 in _start() at ./client.jl:318
while loading /global/u2/j/jregier/.julia/v0.5/DocOpt/test/runtests.jl, in expression starting on line 567
===========================================================[ ERROR: DocOpt ]============================================================

failed process: Process(`/global/u2/j/jregier/julia/bin/julia -Cx86-64 -J/global/u2/j/jregier/julia/lib/julia/sys.so --compile=yes --depwarn=yes --check-bounds=yes --code-coverage=none --color=yes --compilecache=yes /global/u2/j/jregier/.julia/v0.5/DocOpt/test/runtests.jl`, ProcessExited(1)) [1]

========================================================================================================================================
ERROR: DocOpt had test errors
 in #test#61(::Bool, ::Function, ::Array{AbstractString,1}) at ./pkg/entry.jl:736
 in (::Base.Pkg.Entry.#kw##test)(::Array{Any,1}, ::Base.Pkg.Entry.#test, ::Array{AbstractString,1}) at ./<missing>:0
 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#test,Tuple{Array{AbstractString,1}}})() at ./pkg/dir.jl:31
 in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#test,Tuple{Array{AbstractString,1}}}, ::String) at ./file.jl:59
 in #cd#1(::Array{Any,1}, ::Function, ::Function, ::Array{AbstractString,1}, ::Vararg{Array{AbstractString,1},N}) at ./pkg/dir.jl:31
 in (::Base.Pkg.Dir.#kw##cd)(::Array{Any,1}, ::Base.Pkg.Dir.#cd, ::Function, ::Array{AbstractString,1}, ::Vararg{Array{AbstractString,1},N}) at ./<missing>:0
 in #test#3(::Bool, ::Function, ::String, ::Vararg{String,N}) at ./pkg/pkg.jl:258
 in test(::String, ::Vararg{String,N}) at ./pkg/pkg.jl:258
 in eval(::Module, ::Any) at ./boot.jl:234
 in macro expansion at ./REPL.jl:92 [inlined]
 in (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:46
bicycle1885 added a commit that referenced this issue Jul 21, 2016
add the iteratorsize trait (close #14)
@bicycle1885
Copy link
Member

Thank you for reporting!

@jeff-regier
Copy link
Author

Wow, thanks for fixing this issue so quickly!

On Wed, Jul 20, 2016 at 10:10 PM Kenta Sato (佐藤 建太) <
notifications@github.com> wrote:

Thank you for reporting!


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#14 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIieC4oI5yGIiQTb2ZKlrec09eaCwIqnks5qXv86gaJpZM4JRbsc
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants