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

Cannot run @report_call on Julia 1.8-beta1 #326

Closed
jakobnissen opened this issue Mar 3, 2022 · 2 comments
Closed

Cannot run @report_call on Julia 1.8-beta1 #326

jakobnissen opened this issue Mar 3, 2022 · 2 comments

Comments

@jakobnissen
Copy link
Contributor

This is using Julia 1.8.0-beta1, in an empty environment with JET 0.5.7:

The reproducer (same as #321 ) and top of stacktrace

julia> using JET

julia> function f()
           v = map((2,)) do i
              isodd(i) ? i : ""
           end
           convert(Tuple{Int}, v)
       end
f (generic function with 1 method)

julia> @report_call f()
ERROR: TypeError: in typeassert, expected Pair{Symbol, Core.Compiler.InferenceResult}, got a value of typ
e Nothing
Stacktrace:
  [1] cache_lookup(linfo::Core.MethodInstance, given_argtypes::Vector{Any}, cache::JET.JETLocalCache{JET.
JETAnalyzer{JET.BasicPass{typeof(JET.basic_function_filter)}}})
    @ JET ~/.julia/packages/JET/pV0zf/src/abstractinterpret/typeinfer.jl:497
  [2] abstract_call_method_with_const_args(interp::JET.JETAnalyzer{JET.BasicPass{typeof(JET.basic_functio
n_filter)}}, result::Core.Compiler.MethodCallResult, f::Any, arginfo::Core.Compiler.ArgInfo, match::Core.
MethodMatch, sv::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:757
  [3] abstract_call_gf_by_type(interp::JET.JETAnalyzer{JET.BasicPass{typeof(JET.basic_function_filter)}},
 f::Any, arginfo::Core.Compiler.ArgInfo, atype::Any, sv::Core.Compiler.InferenceState, max_methods::Int64
)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:139
  [4] abstract_call_gf_by_type
    @ ~/.julia/packages/JET/pV0zf/src/analyzers/jetanalyzer.jl:319 [inlined]
  [5] abstract_call_known(interp::JET.JETAnalyzer{JET.BasicPass{typeof(JET.basic_function_filter)}}, f::A
ny, arginfo::Core.Compiler.ArgInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:1633
  [6] abstract_call(interp::JET.JETAnalyzer{JET.BasicPass{typeof(JET.basic_function_filter)}}, arginfo::C
ore.Compiler.ArgInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:1691
@dpinol
Copy link
Contributor

dpinol commented Mar 17, 2022

I can also reproduce it with

using Random

julia> @report_call Random.seed!(42)

Or with report_package

@aviatesk
Copy link
Owner

fixed by efe7aa8 and on v0.5.8

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