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

fails in Julia 1.8 with step_expr!(::Any, ::Any, ::Any, ::Bool) is ambiguous #665

Open
tpapp opened this issue Sep 26, 2024 · 3 comments
Open

Comments

@tpapp
Copy link

tpapp commented Sep 26, 2024

  MethodError: step_expr!(::Any, ::Any, ::Any, ::Bool) is ambiguous. Candidates:
    step_expr!(interp::JET.ConcreteInterpreter, frame::JuliaInterpreter.Frame, node, istoplevel::Bool) in JET at /home/tamas/.julia/packages/JET/ymRji/src/toplevel/virtualprocess.jl:1167
    step_expr!(recurse, frame::JuliaInterpreter.Frame, node, istoplevel::Bool) in JuliaInterpreter at /home/tamas/.julia/packages/JuliaInterpreter/cxlKp/src/interpret.jl:457
  To resolve the ambiguity, try making one of the methods more specific, or adding a new method more specific than any of the existing applicable methods.
  Stacktrace:          
    [1] step_expr!(interp::JET.ConcreteInterpreter{JET.var"#usemodule_with_err_handling#54"{JET.VirtualProcessResult, String, Nothing, Set{Symbol}, Base.RefValue{LineNumberNode}, JET.var"#err
_handler#47"{JET.VirtualProcessResult, String, Base.RefValue{LineNumberNode}}}, JETAnalyzer{JET.BasicPass{typeof(JET.jetanalyzer_function_filter)}}, Expr}, frame::JuliaInterpreter.Frame, node
::Any, istoplevel::Bool)       
      @ JET ~/.julia/packages/JET/ymRji/src/toplevel/virtualprocess.jl:1177
    [2] step_expr!(recurse::Any, frame::JuliaInterpreter.Frame, istoplevel::Bool)
      @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/cxlKp/src/interpret.jl:614
    [3] selective_eval!(recurse::Any, frame::JuliaInterpreter.Frame, isrequired::Vector{Bool}, istoplevel::Bool)
      @ LoweredCodeUtils ~/.julia/packages/LoweredCodeUtils/nrimZ/src/codeedges.jl:844
    [4] selective_eval_fromstart!
      @ ~/.julia/packages/LoweredCodeUtils/nrimZ/src/codeedges.jl:870 [inlined]
    [5] partially_interpret!(interp::JET.ConcreteInterpreter{JET.var"#usemodule_with_err_handling#54"{JET.VirtualProcessResult, String, Nothing, Set{Symbol}, Base.RefValue{LineNumberNode}, JE
T.var"#err_handler#47"{JET.VirtualProcessResult, String, Base.RefValue{LineNumberNode}}}, JETAnalyzer{JET.BasicPass{typeof(JET.jetanalyzer_function_filter)}}, Expr}, mod::Module, src::Core.Co
deInfo)
      @ JET ~/.julia/packages/JET/ymRji/src/toplevel/virtualprocess.jl:1020

Version:

(jl_hnFB0L) pkg> st
Status `/tmp/jl_hnFB0L/Project.toml`
⌅ [c3a54625] JET v0.7.14

I know that Julia 1.8 is rather old, and so is the JET.jl version above, but I am using JET in CI where I test for that version (the minimum supported).

Is there a recommended workaround?

@Jamie-Hilditch
Copy link

I think this issue was introduced in the latest version of JuliaInterpreter (v0.9.36). The signature of JuliaInterpreter.step_expr! was changed in this PR JuliaDebug/JuliaInterpreter.jl#645. In a very non-rigorous test, forcing JET to use JuliaInterpreter v0.9.35 did not trigger this issue.

@aviatesk
Copy link
Owner

aviatesk commented Oct 7, 2024

This issue has been fixed in the latest version of JET, but unfortunately, the latest JET doesn't support Julia 1.8 (its minimum supported version is currently 1.10.0). I apologize for the inconvenience, but if you're using JET with 1.8, please cap the version of JuliaInterpreter.

@Jamie-Hilditch
Copy link

This is rather annoying little issue. As far as I'm aware Julia has no mechanism for restricting dependencies of dependencies. However, like @tpapp I'm only really using Julia 1.8 for CI and so my workaround is to include a job step in my CI workflow that adds JuliaInterpreter v0.9.35 as a test dependency whenever using Julia 1.8. e.g.

- id: hack-for-julia18
  if: matrix.version == '1.8'
  run: julia --project=test -e 'using Pkg; Pkg.add(name="JuliaInterpreter", version="0.9.35"); Pkg.compat("JuliaInterpreter", "< 0.9.36")'

This, at least for now, appears to resolve the issue.

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