resolve conflicts

akkartik
Dec 12, 2024, 7:21 AM
3CMM7CXD3QIQCCR3SXXFC4G3O73MDDQKB3G5MUFHQ5EOJLAZWD5AC

Dependencies

  • [2] 442XD5KJ merge bugfix
  • [3] OD3WUB5B resolve conflicts
  • [4] 5UNXE4KM on error, switch to a whole other event loop
  • [5] MYEOA76O keep the version check in one place
  • [6] Z2XCPTSM initialize Error_message with everything else
  • [7] 2CTN2IEF Merge lines.love
  • [8] LRDM35CE app running again
  • [9] QRUFNFPP Merge text0
  • [10] BYG5CEMV support for naming points
  • [11] QMSYY47G Merge text0
  • [12] LHG2QWSO resolve conflicts
  • [13] MX7YD2WC resolve conflicts
  • [14] 6VJTQKW7 start supporting LÖVE v12
  • [15] 2L5MEZV3 experiment: new edit namespace
  • [16] 5FW7YOFT highlight selection while dragging
  • [17] OLX2RRDI Merge text0
  • [18] VMV4LBR4 resolve conflicts
  • [19] YONFBSVB don't hide errors when driver.love connects
  • [20] TXDMRA5J bugfix: alt-tab shouldn't emit keypress events
  • [21] YT5P6TO6 bugfix: save previous file when dropping a new one on
  • [22] PP2IIHL6 stop putting button state in a global
  • [23] 2RWR3GM4 another missed rename
  • [24] LNUHQOGH start passing in Editor_state explicitly
  • [25] F2P336NO resolve conflicts
  • [26] KVHUFUFV reorg
  • [27] IM6GSGVZ fix some arg names
  • [28] 45BU7IRV remove a local
  • [29] PJ5PQAQE record support for multiple versions
  • [30] RHARLLIQ Merge text0
  • [31] AVLAYODP much simpler
  • [32] ZNLTRNNK highlight another global
  • [33] OTIBCAUJ love2d scaffold
  • [34] JCSLDGAH beginnings of support for multiple shapes
  • [35] AVTNUQYR basic test-enabled framework
  • [36] 7SICLTED check for 'error' mode in a few more places
  • [37] KKMFQDR4 editing source code from within the app
  • [38] WZZGVKSG a few more renames
  • [39] UH4YWHW5 button framework is at the app level
  • [40] ORKN6EOB Merge lines.love
  • [41] XJEVMWTS remove a no-op regex munging on callstacks
  • [42] 36Z442IV back to commit 8123959e52f without code editing
  • [43] ULKNZUZK resolve conflicts
  • [44] 5WHW3IDO fix initialization errors using driver.love
  • [45] 4LSZFSOQ resolve conflicts
  • [46] 3QQZ7W4E bring couple more globals back to the app level
  • [47] AFDLKNAP resolve conflicts
  • [48] JZTUZQ35 resolve conflicts
  • [49] Z4XRNDTR find text
  • [50] JOPVPUSA editing source code from within the app
  • [51] 6HDECB5Y fix a regression 2 commits ago
  • [52] BSDXVB3H backport some doc updates and renames
  • [53] 6VXO3ZL3 just keep the cursor visible after any input events
  • [54] 3XQROLSK redo version checks yet again
  • [55] VPRGENLA hide some details within the 'warning' state
  • [56] JYAEYMKZ get rid of a special case
  • [57] XGHCLIKB Merge lines.love
  • [58] ZM6AON3A resolve conflicts
  • [59] FJIGUGEC bugfix: version check
  • [60] YF2ATH2Q Merge lines.love
  • [61] T7QIIGQ6 attempt at better error recovery
  • [62] CYGNFOA5 Merge text0
  • [63] TVSDIF6D resolve conflicts
  • [64] TUTDZZOO resolve conflicts
  • [65] LXFHXL2N Merge text.love
  • [66] BQH7ANWM resolve conflicts
  • [67] D2TYFYG2 Merge text.love
  • [68] TBWAE64A app is now live, can communicate with driver
  • [*] BJ5X5O4A let's prevent the text cursor from ever getting on a drawing

Change contents

  • edit in main.lua at line 18
    [6.195][2.0:128]()
    -- Available modes: run, error
    if Mode == nil then -- might have already been initialized elsewhere
    Mode = 'run'
    end
  • edit in main.lua at line 67
    [6.289][6.341:360](),[6.289][6.341:360](),[6.416][6.416:653](),[6.416][6.416:653]()
    Mode = 'error'
    Error_message = ("This app hasn't been tested with LÖVE version %s; please use version %s if you run into errors. Press a key to try recovering.\n\n%s"):format(Version, Supported_versions[1], Error_message)
    print(Error_message)
  • replacement in main.lua at line 69
    [5.47][5.47:235]()
    love.graphics.clear(love.graphics.getBackgroundColor())
    love.graphics.setColor(1,1,0)
    love.graphics.rectangle('fill', 30,30, 400,400)
    love.graphics.setColor(0,0,0)
    [5.47]
    [5.235]
    love.graphics.clear(0,0,1)
    love.graphics.setColor(1,1,1)
  • edit in main.lua at line 170
    [6.1373][6.531:755](),[6.1373][6.531:755](),[6.755][6.655:655](),[6.755][6.655:655](),[6.622][6.664:681](),[6.655][6.664:681](),[6.755][6.664:681](),[6.664][6.664:681](),[6.622][6.664:681](),[6.664][6.664:681]()
    if Mode == 'error' then
    love.graphics.setColor(0,0,1)
    love.graphics.rectangle('fill', 0,0, App.screen.width, App.screen.height)
    love.graphics.setColor(1,1,1)
    love.graphics.printf(Error_message, 40,40, 600)
    return
    end
  • resurrect zombie in main.lua at line 170
    [6.681][6.8:40](),[6.681][6.8:40]()
    if on.draw then on.draw() end
  • edit in main.lua at line 180
    [6.6105][6.794:851]()
    -- listen for commands in both 'error' and 'run' modes
  • replacement in main.lua at line 181
    [6.25][6.852:922]()
    if Mode == 'run' then
    if on.update then on.update(dt) end
    end
    [6.25]
    [6.6137]
    if on.update then on.update(dt) end
  • edit in main.lua at line 185
    [6.6820][6.923:960]()
    if Mode == 'error' then return end
  • edit in main.lua at line 190
    [6.7006][6.961:998]()
    if Mode == 'error' then return end
  • edit in main.lua at line 199
    [6.39][6.999:1036]()
    if Mode == 'error' then return end
  • edit in main.lua at line 204
    [3.309][3.309:346]()
    if Mode == 'error' then return end
  • edit in main.lua at line 209
    [6.7176][6.1037:1074]()
    if Mode == 'error' then return end
  • edit in main.lua at line 223
    [6.8173][6.1075:1203]()
    if Mode == 'error' then
    if chord == 'C-c' then
    love.system.setClipboardText(Error_message)
    end
    return
    end
  • edit in main.lua at line 232
    [6.1512][6.250:287]()
    if Mode == 'error' then return end
  • edit in main.lua at line 241
    [6.57][6.1242:1268](),[6.1268][6.0:239](),[6.1268][6.0:239]()
    if Mode == 'error' then
    if Redo_initialization then
    Redo_initialization = nil
    love.run() -- won't actually replace the event loop;
    -- we're just running it for its initialization side-effects
    else
    Mode = 'run'
    end
  • replacement in live.lua at line 82
    [6.4993][6.0:97](),[6.97][6.426:657](),[6.657][6.97:107](),[6.97][6.97:107]()
    local possibly_mutated = live.run(buf)
    if possibly_mutated then
    Mode = 'run'
    if Redo_initialization then
    Redo_initialization = nil
    love.run() -- won't actually replace the event loop;
    -- we're just running it for its initialization side-effects
    end
    end
    [6.4993]
    [6.183]
    live.run(buf)
  • edit in live.lua at line 418
    [6.9940][6.1270:1287]()
    Mode = 'error'
  • edit in live.lua at line 432
    [6.2212]
    [4.1226]
    error_frame_keys_down = {}
  • edit in live.lua at line 434
    [4.1260]
    [6.10774]
    end
    -- one iteration of the event loop when showing an error
    -- return nil to continue the event loop, non-nil to quit
    -- We don't run this within handle_error because a second error in
    -- handle_error will crash.
    function initialization_error_run_frame()
    if love.event then
    love.event.pump()
    for name, a,b,c,d,e,f in love.event.poll() do
    if name == 'quit' then
    return a or 0
    elseif name == 'keypressed' then
    error_frame_keys_down[a] = true
    -- C-c
    if a == 'c' and (error_frame_keys_down.lctrl or error_frame_keys_down.rctrl) then
    love.system.setClipboardText(Error_message)
    end
    elseif name == 'keyreleased' then
    -- don't try to recover from initialization errors
    error_frame_keys_down[a] = nil
    end
    end
    end
    local dt = love.timer.step()
    Current_time = Current_time + dt
    if Current_time - Live.previous_read > 0.1 then
    local buf = live.receive_from_driver()
    if buf then
    local maybe_modified = live.run(buf)
    if maybe_modified then
    -- retry
    local success = xpcall(function() App.initialize(love.arg.parseGameArguments(arg), arg) end, live.handle_initialization_error)
    if success then
    App.run_frame = main_run_frame
    return
    end
    end
    end
    Live.previous_read = Current_time
    end
    love.graphics.origin()
    love.graphics.clear(0,0,1)
    love.graphics.setColor(1,1,1)
    love.graphics.printf(Error_message, 40,40, 600)
    love.graphics.present()
    love.timer.sleep(0.001)
    -- returning nil continues the loop
  • edit in live.lua at line 489
    [6.705][6.705:734]()
    Redo_initialization = true
  • edit in live.lua at line 490
    [6.759]
    [6.759]
    App.run_frame = initialization_error_run_frame
  • replacement in Manual_tests.md at line 13
    [6.1386][6.169:312]()
    - create a couple of spuriously failing tests. Run with an untested version of LÖVE. Error message includes message about untested version.
    [6.1386]
    [6.169]
    - create a failing test. Start app. See test failure. Fix using driver.love
    - include an error in on.initialize. Start app. See error message. Fix on.initialize using driver.love.