Unfortunately this repo isn't a real fork.
R4PMTRF75RCAYGFCEPWKF6YE73YCHW5S36F76O3FWIQVNBKTTNSAC app.Manifest[PARENT] = app.Headlocal manifest_filename = app.versioned_manifest(app.Next_version)love.filesystem.write(manifest_filename, json.encode(app.Manifest))app.Head = app.Next_versionlove.filesystem.write('head', tostring(app.Head))app.Next_version = app.Next_version + 1
app.roll_forward()
app.Manifest[PARENT] = app.Headlocal manifest_filename = app.versioned_manifest(app.Next_version)love.filesystem.write(manifest_filename, json.encode(app.Manifest))app.Head = app.Next_versionlove.filesystem.write('head', tostring(app.Head))app.Next_version = app.Next_version + 1
app.roll_forward()
-- roll backapp.Head = app.Manifest[PARENT]local previous_manifest_filename = app.versioned_manifest(app.Head)app.Manifest = json.decode(love.filesystem.read(previous_manifest_filename))
app.roll_back()
-- update app.Head and record the new app.Manifest (which caller has already modified)function app.roll_forward()app.Manifest[PARENT] = app.Headlocal manifest_filename = app.versioned_manifest(app.Next_version)love.filesystem.write(manifest_filename, json.encode(app.Manifest))app.Head = app.Next_versionlove.filesystem.write('head', tostring(app.Head))app.Next_version = app.Next_version + 1end-- update app.Head and reload app.Manifest appropriatelyfunction app.roll_back()app.Head = app.Manifest[PARENT]love.filesystem.write('head', tostring(app.Head))local previous_manifest_filename = app.versioned_manifest(app.Head)app.Manifest = json.decode(love.filesystem.read(previous_manifest_filename))end
I care a lot about being able to automatically check _any_ property about myprogram before it ever runs. However, some things don't have tests yet, eitherbecause I don't know how to test them or because I've been lazy. I'll at leastrecord those here.* clone this repo to a new client app, clear its save dir[1], run it, run thedriver, add a definition:```on.draw = function()end```Hit F4. No error.Quit driver, quit client app. Restart client app. No error.* clone this repo to a new client app, clear its save dir, run it, run thedriver, add a definition that draws to screen:```on.draw = function()love.graphics.print('hello!', 50,50)end```Hit F4. Client app shows 'hello!'Quit driver, quit client app. Restart client app. No error. Client app shows 'hello!'* clone this repo to a new client app, clear its save dir, run it, run thedriver, add a definition containing invalid Lua:```on.draw = function(```Hit F4. Driver shows an error under the definition.* clone this repo to a new client app, clear its save dir, run it, run thedriver, add a definition containing invalid Lua:```on.draw = function(```Hit F4. Driver shows an error under the definition as before.Quit the client app. The invalid code is saved in file 0002-on.draw in thesave dir. However, the file 'head' in the save dir contains '1'.Restart the client app. It loads up without error.Switch back to the driver. Fix the definition.```on.draw = function()end```Hit F4. The error disappears.* clone this repo to a new client app, clear its save dir, run it, run thedriver, add a definition containing invalid Lua:```on.draw = function(```Hit F4. Driver shows an error under the definition as before.Quit the client app. The invalid code is saved in file 0002-on.draw in thesave dir. However, the file 'head' in the save dir contains '1'.[Don't restart the client app.]Switch back to the driver. Hit F4. The driver hangs and needs to beforce-quit. [This is not ideal, but how things are today.][1] We never clear the app from the driver's config. driver.love needs to berobust to apps changing out from under it.