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 add_control_flow!(::BitVector, ::Core.Compiler.CFG, ::BitSet) #587

Closed
msagarpatel opened this issue Jan 2, 2024 · 2 comments
Labels
top-level analysis a.k.a. virtualprocess

Comments

@msagarpatel
Copy link

This error occurred in our test suite which uses JET. @Drvi notes:

The crux of the issue is that LoweredCodeUtils changed a method signature of add_control_flow! in this PR (the last arg of add_control_flow! used to be a BitSet which is what JET does). It seems that add_control_flow! is an unexported function, so JET is basically touching internals of this package so semver didn’t guard us here.

  MethodError: no method matching add_control_flow!(::BitVector, ::Core.Compiler.CFG, ::BitSet)

  Closest candidates are:
    add_control_flow!(::Any, ::Any, !Matched::AbstractVector{LoweredCodeUtils.Path})
     @ LoweredCodeUtils ~/.julia/packages/LoweredCodeUtils/4GqSU/src/codeedges.jl:762

  Stacktrace:
    [1] select_dependencies!(concretize::BitVector, src::Core.CodeInfo, edges::LoweredCodeUtils.CodeEdges)
      @ JET ~/.julia/packages/JET/wFGWz/src/toplevel/virtualprocess.jl:1195
    [2] select_statements(src::Core.CodeInfo)
      @ JET ~/.julia/packages/JET/wFGWz/src/toplevel/virtualprocess.jl:1066
    [3] partially_interpret!(interp::JET.ConcreteInterpreter{JET.var"#usemodule_with_err_handling#56"{JET.VirtualProcessResult, String, JET.ToplevelConfig, Int64, Set{Symbol}, Base.RefValue{LineNumberNode}, JET.var"#err_handler#49"{JET.VirtualProcessResult, String, Base.RefValue{LineNumberNode}}}, JET.JETAnalyzer{JET.BasicPass}}, mod::Module, src::Core.CodeInfo)
      @ JET ~/.julia/packages/JET/wFGWz/src/toplevel/virtualprocess.jl:1040
    [4] _virtual_process!(res::JET.VirtualProcessResult, toplevelex::Expr, filename::String, analyzer::JET.JETAnalyzer{JET.BasicPass}, config::JET.ToplevelConfig, context::Module, pkg_mod_depth::Int64, force_concretize::Bool)
      @ JET ~/.julia/packages/JET/wFGWz/src/toplevel/virtualprocess.jl:804
    [5] _virtual_process!
      @ ~/.julia/packages/JET/wFGWz/src/toplevel/virtualprocess.jl:611 [inlined]
    [6] _virtual_process!(res::JET.VirtualProcessResult, s::String, filename::String, analyzer::JET.JETAnalyzer{JET.BasicPass}, config::JET.ToplevelConfig, context::Module, pkg_mod_depth::Int64)
      @ JET ~/.julia/packages/JET/wFGWz/src/toplevel/virtualprocess.jl:591
    [7] virtual_process(x::String, filename::String, analyzer::JET.JETAnalyzer{JET.BasicPass}, config::JET.ToplevelConfig)
      @ JET ~/.julia/packages/JET/wFGWz/src/toplevel/virtualprocess.jl:445
    [8] #analyze_and_report_text!#134
      @ ~/.julia/packages/JET/wFGWz/src/JET.jl:992 [inlined]
    [9] analyze_and_report_file!(analyzer::JET.JETAnalyzer{JET.BasicPass}, filename::String, pkgid::Nothing; jetconfigs::Base.Pairs{Symbol, Any, NTuple{7, Symbol}, NamedTuple{(:ignored_modules, :analyze_from_definitions, :concretization_patterns, :context, :target_defined_modules, :toplevel_logger, :mode), Tuple{Nothing, Bool, Vector{Any}, Module, Bool, Nothing, Symbol}}})
      @ JET ~/.julia/packages/JET/wFGWz/src/JET.jl:800
   [10] analyze_and_report_file! (repeats 2 times)
      @ ~/.julia/packages/JET/wFGWz/src/JET.jl:795 [inlined]
   [11] report_file(args::String; jetconfigs::Base.Pairs{Symbol, Any, NTuple{7, Symbol}, NamedTuple{(:ignored_modules, :analyze_from_definitions, :concretization_patterns, :context, :target_defined_modules, :toplevel_logger, :mode), Tuple{Nothing, Bool, Vector{Any}, Module, Bool, Nothing, Symbol}}})
      @ JET ~/.julia/packages/JET/wFGWz/src/analyzers/jetanalyzer.jl:1665
   [12] report_file
      @ ~/.julia/packages/JET/wFGWz/src/analyzers/jetanalyzer.jl:1662 [inlined]
   [13] jet_test_file(file_path::String; ignored_modules::Nothing, jet_frames_to_skip::Tuple{}, analyze_from_definitions::Bool, concretization_patterns::Vector{Any}, context::Module, target_defined_modules::Bool, mode::Symbol)
      @ Main.var"##JET error analysis from package definitions#318" ~/packages/jet_test_utils.jl:197
...truncated...
@aviatesk aviatesk added the top-level analysis a.k.a. virtualprocess label Jan 3, 2024
@aviatesk
Copy link
Owner

aviatesk commented Jan 3, 2024

Yeah, we need to update JET so that it is compatible with the latest version of LoweredCodeUtils.

@aviatesk
Copy link
Owner

Fixed in 0.9.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
top-level analysis a.k.a. virtualprocess
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants