Ribasim icon indicating copy to clipboard operation
Ribasim copied to clipboard

Fix trace code for JuliaInterpreter 0.10

Open visr opened this issue 6 months ago • 1 comments

          @SouthEndMusic An update of JuliaInterpreter (I assume) has killed our beautiful trace code:

graph, verts = tracecall((Ribasim,), Ribasim.Parameters, (db, config))
------------------


MethodError: no method matching finish_and_return!(::typeof(log_far!), ::Frame, ::Bool)
The function `finish_and_return!` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  finish_and_return!(::JuliaInterpreter.BreakOnCall, ::Frame, ::Bool)
   @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/K6bgZ/src/commands.jl:46
  finish_and_return!(::Interpreter, ::Frame, ::Bool)
   @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/K6bgZ/src/commands.jl:29
  finish_and_return!(::JuliaInterpreter.BreakOnCall, ::Frame)
   @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/K6bgZ/src/commands.jl:46
  ...


Stacktrace:
 [1] log_far!(recurse::Any, frame::Frame, istoplevel::Bool)
   @ Main ~/work/Ribasim/Ribasim/docs/dev/scripts/trace_call.jl:22
 [2] tracecall(mods::Tuple{Module}, call::Type, args::Tuple{SQLite.DB, Ribasim.config.Config})
   @ Main ~/work/Ribasim/Ribasim/docs/dev/scripts/trace_call.jl:96
 [3] top-level scope
   @ In[3]:7

Could you take a look whether you can quickly fix (timebox it to half day or so) this? Otherwise we downgrade JuliaInterpreter.

Originally posted by @evetion in https://github.com/Deltares/Ribasim/issues/2268#issuecomment-2871666026

visr avatar May 19 '25 13:05 visr

Pinned it to 0.9 in https://github.com/Deltares/Ribasim/pull/2268/commits/a018c8e6ff14ca0b39cc8b1f5c82102559b3f7a2#diff-72ed386c2a0cd1d23c0968297e70023ed98c22490d146dd89fc91f48369bad4d

visr avatar May 19 '25 13:05 visr