Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On top of #102. Since #102, device settings read the game database once per run, at start, without waiting for a rebuild, and a database update takes effect at the next start. That holds up after a weekly update, but not on a fresh install.
The problem. On a fresh install there is no downloaded catalogue yet at the first start, so the database read is the one built into the app. None of its 50,910 games has a settings entry (no
cfield inembedded/ludusavi-index.json.gz). So device settings stay off for the whole first run. Graphics and other settings files sync between devices until OpenSave happens to be restarted, which on a PC that sleeps rather than shuts down can be days.Seen by hand. Two fresh scratch devices built from
dev-public, both of which had played Balatro, each with its ownsettings.jkr. Balatro was tracked right after install, as people do, and the devices were paired once both downloads were indexed (plus a minute). The first sync was "both sides modified": the Deck opened on a save conflict whose only difference was its graphics file, and the save itself never arrived. Balatro's Configuration tab lists no device settings. With this change, the same steps sync the save, each device keeps its ownsettings.jkr, and Configuration lists it.The change:
presets.CatalogueGeneration()moves each time a new index is put in place: by a rebuild, or by the index built with the weekly download.ResyncWatchers) compares it with the generation it last read. When it has moved, the ticker:adoptExclusionViewover the games, as at start, so the watcher doesn't take the new view for a change.This sits in its own file,
daemon/devicesettings_refresh.go, plus one line in the ticker and a field next todevMu, so that it doesn't touch the lines #118/#127/#128 rewrite. The reset setsloaded,dbandpatternsand leaves any other field zero, which works with today'sdevSettingsCacheand with theirs (theirverdictsmap is created lazily).Tests:
daemon/devicesettings_refresh_test.go: a game's settings file is synced before the catalogue is indexed, and left out after one tick once it is, with the last snapshot's hash carried over. It fails without the refresh, without the generation bump on rebuild, and without the carry-over.presets/catalogue_generation_test.go: a downloaded index moves the generation. It fails without the bump.Checks:
dev-public(951cee6), the full Windows unit and e2e suites pass, with one exception:TestBuildManifest_SurvivesFilesVanishingDuringTheWalk(delta), which fails in over half of runs on this PC ondev-publicanddevalike and isn't touched here. After Games from your other devices set themselves up again; trust your own devices to choose folders #132's last commit (a fix to how the catalogue check reads the index after a rebuild),presets,p2p,daemonandapiand the folder, offer and rollback e2e tests were run again, and pass.-raceon Linux (WSL Ubuntu) passes forpresets,daemon,p2p/...,api,store,cliapp,fsx,watcherandsnapshot, and for the folder, offer and rollback e2e tests.TestSignIn_AnOldAttemptsTimerLeavesTheNewListeneronce reported a data race in its cleanup; it does the same on plaindev-public.dev-publictoday, and no new file in the conflicts of those that don't (sync: batch small files, skip unchanged manifests, probe presence on its own #26, sync: closest devices first, by measured link speed #27, and the four againstmain).daemonandpresetstests pass, including this test.Changelog: left to your batch. Suggested wording: