beyond-all-reason / beyond-all-reason/RecoilEngine
[FR] Expose safe `debug.foo` APIs to synced
- Dominant language
- C++
- Stars
- 679
- Forks
- 290
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
Currently the whole `debug` library is unavailable in synced. Check if at least some of those functions could be exposed safely. Things like `debug.getupvalue` or `debug.getinfo` or `debug.traceback` should be fine since the upvalues should be the same, function names, file paths etc should be the same for everybody in synced, so should give the same results even if you e.g. put the traceback string as a table index. A historical worry was locale differences (eg. a number is printed as `1,23` instead of `1.23`) but that also has since been solved. The main danger is probably related to hooks to garbage collection since it's undefined when GC happens.
Contributor guide
Research direction
Start by locating how the synced environment exposes or blocks the Lua debug library. Review debug.getupvalue, debug.getinfo, debug.traceback, and garbage-collection hooks for deterministic behavior across peers. Done means the safe subset is defined and exposed without allowing nondeterministic results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100