beyond-all-reason / beyond-all-reason/RecoilEngine

[FR] Expose safe `debug.foo` APIs to synced

Open
#867 5 comments 1 reaction 0 assignees View on GitHub
area: Lua API enhancement
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.