resolve conflicts

akkartik
Nov 10, 2023, 5:10 PM
AFZEVZOUY7ECADAHNU3C6OGJCA2MJQCK3JQZOFDVKXMBILBAH2JAC

Dependencies

  • [2] R6MB3UPB Merge text.love
  • [3] NLU6BXIR clean up some cruft from error callstacks
  • [4] AGJXIDOF hardcode some assumptions about how this app uses love
  • [5] 3QNOKBFM beginnings of a test harness
  • [6] AVTNUQYR basic test-enabled framework
  • [7] DJSIRUMD a more radical attempt at ignoring nil y's
  • [8] CUFW4EJL reorganize app.lua and its comments
  • [9] IZGZEWFG switch to source editor on error
  • [10] 6JKFAHNL remove a no-op regex munging on callstacks

Change contents

  • edit in app.lua at line 49
    [4.391][4.915:925](),[4.915][4.915:925](),[4.925][4.2550:2551](),[4.299][3.0:142](),[4.299][3.0:142](),[4.709][3.143:920](),[4.709][3.143:920]()
    end
    end
    local callstack = debug.traceback('', --[[stack frame]]2)
    Error_message = 'Error: ' .. tostring(err)..'\n'..clean_up_callstack(callstack)
    -- I tend to read code from files myself (say using love.filesystem calls)
    -- rather than offload that to load().
    -- Functions compiled in this manner have ugly filenames of the form [string "filename"]
    -- This function cleans out this cruft from error callstacks.
    function clean_up_callstack(callstack)
    local frames = {}
    print(callstack)
    for frame in string.gmatch(callstack, '[^\n]+\n*') do
    local line = frame:gsub('^%s*(.-)\n?$', '%1')
    local filename, rest = line:match('([^:]*):(.*)')
    local core_filename = filename:match('^%[string "(.*)"%]$')
    -- pass through frames that don't match this format
    -- this includes the initial line "stack traceback:"
    local new_frame = (core_filename or filename)..':'..rest
    table.insert(frames, new_frame)
  • resurrect zombie in app.lua at line 49
    [3.920][3.920:926](),[3.920][3.920:926]()
    end
  • edit in app.lua at line 50
    [3.926][3.926:1035](),[3.926][3.926:1035]()
    -- the initial "stack traceback:" line was unindented and remains so
    return table.concat(frames, '\n\t')