JuliaDynamics / JuliaDynamics/ConcurrentSim.jl

backtracing errors (original line)

Open
#139 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
198
Forks
40
Avg merge
21h 40m
Merged PRs (30d)
2

Description

I know it might be a lot to do, but still why not mentioning it in an issue..
Currently there is zero backtrace from the original source code regarding to errors.
This might be more of a ResumambleFunctions.jl issue.
E.g. In the following code, copied from the basic example I substituted event with eventerror in the second line of the resumamble function.

# contained in file called "consimtemp2.jl"
using ResumableFunctions
using ConcurrentSim

@resumable function example(env::Environment)
  event = timeout(env, 1, value=42)
  value = @yield eventerror
  println("now=", now(env), ", value=", value)
end

sim = Simulation()
@process example(sim)
run(sim)

When running it I get the following error code:

Image

Which basically shares zero info on where is the error in the original code that I can interact with..
(line 12 is the run(sim) line)
For small examples like this is it's obvious, but for bigger projects with many events that can be a struggle.
Do you maybe have other ways to debug such situations ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the example from consimtemp2.jl using the @resumable function, eventerror substitution, and run(sim), then inspect the ResumableFunctions.jl and ConcurrentSim.jl boundary where the error is reported. Done means errors expose a useful original source location instead of only pointing to run(sim), with the behavior verified on the documented basic example.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.