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

ERROR: TypeError: in new, expected DataType, got Type{Tuple{Vararg{Any, N}} where N} #222

Closed
dhanak opened this issue Jul 20, 2021 · 4 comments

Comments

@dhanak
Copy link

dhanak commented Jul 20, 2021

Hello!

I tried running JET on one of our packages, using report_package(), but I got the following output:

[toplevel-info] virtualized the context of Main (took 0.027 sec)
... (files being analyzed here) ...
[toplevel-info] analyzing from top-level definitions ... 115/115
ERROR: TypeError: in new, expected DataType, got Type{Tuple{Vararg{Any, N}} where N}
Stacktrace:
  [1] Base.Fix2(f::typeof(isequal), x::Type{Tuple})
    @ Base ./operators.jl:998
  [2] isequal(x::Type)
    @ Base ./operators.jl:1013
  [3] hash(A::Vector{Any}, h::UInt64)
    @ Base ./abstractarray.jl:2452
  [4] hash(x::JET.VirtualFrame, h::UInt64)
    @ JET ~/.julia/packages/JET/LvnRR/src/JET.jl:365
  [5] hash
    @ ./hashing.jl:18 [inlined]
  [6] print_report(io::IOContext{IOBuffer}, report::JET.NoMethodErrorReport, config::JET.PrintConfig, wrote_linfos::Set{UInt64}, depth::Int64)
    @ JET ~/.julia/packages/JET/LvnRR/src/print.jl:315
  [7] print_report(io::IOContext{IOBuffer}, report::JET.NoMethodErrorReport, config::JET.PrintConfig, wrote_linfos::Set{UInt64}, depth::Int64) (repeats 5 times)
    @ JET ~/.julia/packages/JET/LvnRR/src/print.jl:321
  [8] print_report(io::IOContext{IOBuffer}, report::JET.NoMethodErrorReport, config::JET.PrintConfig, wrote_linfos::Set{UInt64})
    @ JET ~/.julia/packages/JET/LvnRR/src/print.jl:308
  [9] (::JET.var"#116#117"{Vector{JET.InferenceErrorReport}, JET.PrintConfig})(io::IOContext{IOBuffer})
    @ JET ~/.julia/packages/JET/LvnRR/src/print.jl:281
 [10] with_bufferring
    @ ~/.julia/packages/JET/LvnRR/src/print.jl:166 [inlined]
 [11] print_reports(io::Base.TTY, reports::Vector{JET.InferenceErrorReport}, postprocess::Any; jetconfigs::Base.Iterators.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:analyze_from_definitions, :toplevel_logger), Tuple{Bool, IOContext{Base.TTY}}}})
    @ JET ~/.julia/packages/JET/LvnRR/src/print.jl:268
 [12] print_reports(io::Base.TTY, res::JET.VirtualProcessResult; jetconfigs::Base.Iterators.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:analyze_from_definitions, :toplevel_logger), Tuple{Bool, IOContext{Base.TTY}}}})
    @ JET ~/.julia/packages/JET/LvnRR/src/print.jl:113
 [13] #report_result#121
    @ ~/.julia/packages/JET/LvnRR/src/JET.jl:528 [inlined]
 [14] report_file(io::Base.TTY, filename::String; jetconfigs::Base.Iterators.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:analyze_from_definitions,), Tuple{Bool}}})
    @ JET ~/.julia/packages/JET/LvnRR/src/JET.jl:581
 [15] #report_package#127
    @ ~/.julia/packages/JET/LvnRR/src/JET.jl:722 [inlined]
 [16] report_package(io::Base.TTY, package::Module)
    @ JET ~/.julia/packages/JET/LvnRR/src/JET.jl:721
 [17] report_package(args::Module; jetconfigs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ JET ~/.julia/packages/JET/LvnRR/src/JET.jl:724
 [18] report_package(args::Module)
    @ JET ~/.julia/packages/JET/LvnRR/src/JET.jl:724
 [19] top-level scope
    @ REPL[4]:1

Any idea what could have gone wrong?

I'm using Julia v1.6.2, with JET v0.4.3.

@aviatesk
Copy link
Owner

Duplication of #173.
Please use Julia v1.7 or higher to run w/o this issue.

@aviatesk aviatesk changed the title TypeError while running report_package ERROR: TypeError: in new, expected DataType, got Type{Tuple{Vararg{Any, N}} where N} Jul 20, 2021
@aviatesk aviatesk pinned this issue Jul 20, 2021
@dhanak
Copy link
Author

dhanak commented Jul 20, 2021

Ah, thanks for the quick response. Good to know.

@Moelf
Copy link

Moelf commented Jul 24, 2021

can we update the compat if the master branch is no longer compatible with <Julia 1.7?

@aviatesk
Copy link
Owner

aviatesk commented Aug 8, 2021

It's compatible with v1.6, the problem is that v1.6 still has an issue.
I'm happy to remove the usages of Fix2 in JET as a workaround though.

@aviatesk aviatesk unpinned this issue Aug 9, 2021
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

3 participants