redo version checks yet again

akkartik
Dec 7, 2023, 6:16 AM
3XQROLSKN5GIROYOSBN2OW2DSG34PKDU4BGYV7DL6F3V5RNSHATQC

Dependencies

  • [2] 7SICLTED check for 'error' mode in a few more places
  • [3] Z2VZTIXY redo version checks
  • [4] PESSMQBJ no, make sure to compute line width after screen dimensions
  • [5] AVTNUQYR basic test-enabled framework
  • [6] UHB4GARJ left/right margin -> left/right coordinates
  • [7] IM6GSGVZ fix some arg names
  • [8] YT5P6TO6 bugfix: save previous file when dropping a new one on
  • [9] APX2PY6G stop tracking wallclock time
  • [10] 5XQ4Y7NU reorg manual tests doc
  • [11] FJIGUGEC bugfix: version check
  • [12] FE25XVZY yet another bugfix to the version check
  • [13] LF7BWEG4 group all editor globals
  • [14] 2CK5QI7W make love event names consistent
  • [15] TXDMRA5J bugfix: alt-tab shouldn't emit keypress events
  • [16] 3QQZ7W4E bring couple more globals back to the app level
  • [17] YGCT2D2O start loading settings as applicable
  • [18] KKMFQDR4 editing source code from within the app
  • [*] OTIBCAUJ love2d scaffold
  • [*] 6VJTQKW7 start supporting LÖVE v12
  • [*] 3QNOKBFM beginnings of a test harness
  • [*] BJ5X5O4A let's prevent the text cursor from ever getting on a drawing

Change contents

  • edit in main.lua at line 92
    [4.414]
    [3.299]
    -- Another weird bit for a class of corner cases. E.g.:
    -- * I press ctrl+e, switch Current_app. I don't want the new app to receive
    -- text_input and key_release events.
    -- If I try to avoid text_input events by switching modes on key_release, I
    -- hit a new problem:
    -- * I press ctrl+e, am running an untested version, Current_app goes to
    -- 'error', and immediately rolls back out of 'error' in the key_release
    -- event.
    -- Skip_rest_of_key_events is ugly, but feels cleaner than creating yet
    -- another possible value for Current_app.
    Skip_rest_of_key_events = nil
    -- Where to go from 'error' app.
    Next_app = nil
  • edit in main.lua at line 111
    [3.401][3.401:432]()
    Unsupported_version = true
  • edit in main.lua at line 113
    [3.596][3.596:602](),[4.414][4.1047:1052](),[3.602][4.1047:1052](),[4.86064][4.1047:1052](),[4.187113][4.1047:1052](),[4.1047][4.1047:1052](),[4.1052][3.603:1005]()
    end
    end
    function App.love_version_check()
    if Unsupported_version then
    Current_app = 'error'
    Error_message = ("This app hasn't been tested with LÖVE version %s; please switch to version %s if you run into issues. Press any key to continue."):format(Version, Supported_versions[1])
    print(Error_message)
    -- continue initializing everything; hopefully we won't have errors during initialization
  • edit in main.lua at line 130
    [4.187329]
    [4.1139]
    check_love_version()
  • edit in main.lua at line 134
    [4.1320]
    [4.187382]
    function check_love_version()
    if array.find(Supported_versions, Version) == nil then
    Next_app = Current_app
    Current_app = 'error'
    Error_message = ("This app hasn't been tested with LÖVE version %s; please switch to version %s if you run into issues. Press any key to continue."):format(Version, Supported_versions[1])
    -- continue initializing everything; hopefully we won't have errors during initialization
    end
    end
  • edit in main.lua at line 144
    [4.187407]
    [4.187407]
    if Current_app == 'error' then return end
  • edit in main.lua at line 149
    [4.187568][2.114:151]()
    elseif Current_app == 'error' then
  • edit in main.lua at line 156
    [4.187701]
    [4.187701]
    if Current_app == 'error' then return end
  • edit in main.lua at line 161
    [4.4536][2.152:189]()
    elseif Current_app == 'error' then
  • edit in main.lua at line 167
    [4.188032]
    [4.188032]
    if Current_app == 'error' then return end
  • edit in main.lua at line 175
    [4.188255][2.190:227]()
    elseif Current_app == 'error' then
  • edit in main.lua at line 197
    [4.521]
    [4.148]
    if Current_app == 'error' then return end
  • edit in main.lua at line 207
    [4.188606][2.368:405]()
    elseif Current_app == 'error' then
  • edit in main.lua at line 218
    [4.188858]
    [21.1044]
    Skip_rest_of_key_events = nil
  • edit in main.lua at line 222
    [21.1154]
    [21.1154]
    else
    Current_app = Next_app
    Next_app = nil
    Skip_rest_of_key_events = true
  • edit in main.lua at line 253
    [4.189585]
    [4.189585]
    Skip_rest_of_key_events = true
  • edit in main.lua at line 272
    [4.189951]
    [4.189951]
    if Skip_rest_of_key_events then return end
  • edit in main.lua at line 283
    [4.57]
    [4.190224]
    if Current_app == 'error' then return end
  • replacement in main.lua at line 289
    [4.190302][4.20:53](),[4.53][4.53:77](),[4.77][4.77:112]()
    if Current_app == 'error' then
    Current_app = 'run'
    elseif Current_app == 'run' then
    [4.190302]
    [4.58]
    if Skip_rest_of_key_events then return end
    if Current_app == 'run' then
  • edit in app.lua at line 15
    [4.209821][3.1064:1197]()
    App.love_version_check() -- hack: we want to run this just the first time and not every time we bounce between 'run' and 'source'
  • replacement in Manual_tests.md at line 33
    [4.211526][3.1779:1971]()
    * run with an untested version. Error message pops up. Press a key. Text editor comes up, and doesn't receive the key. Press ctrl+e. Source editor opens up. Press ctrl+e. Text editor returns.
    [4.211526]
    [3.1971]
    * run with an untested version. Error message pops up. Press a key. Text editor comes up, and doesn't receive the key. Press ctrl+e. Error pops up. Press a key. Source editor opens up. Press ctrl+e. Error pops up. Press a key. Text editor returns.