Repository navigation
frontend: Don't log a failed scene migration on every fresh profile - #419
Merged
Merged
Conversation
Behavior-neutral: move_basic_to_scene_collections keeps the config path lookup and calls migrate_basic_scene_collection, which has no Qt or OBSApp dependency so it can be unit tested. Refs #155
…o migrate (GREEN) A fresh profile has a basic/ directory (MakeUserDirs makes it) but no legacy scenes.json, so the migration made basic/scenes/ and logged a failed rename on every first launch. Closes #155 Local-Gate: v1 tree=32db90988a5f92155c180e20b488c0745cd63346 secs=139 lanes=lint:run,rust-test:run,tier2-linux:run Ci-Attestation: {"at":1791853035,"gate":"rust/all/fmt","host":"linux-x86_64","key":"d0785f93fa1c5efb52d34f63284d0c573fce06ea4d7e037f0905a57e94ac9f89","lane":"lint","parents":["d30d71ba45a6d5d1252215f6882ca2b54ec7da35"],"secs":20,"stamp":"a8ef2bf94ba2630a98e2318908d692ec","tree":"32db90988a5f92155c180e20b488c0745cd63346","v":1,"via":"run"} Ci-Attestation: {"at":1791853035,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"d0785f93fa1c5efb52d34f63284d0c573fce06ea4d7e037f0905a57e94ac9f89","lane":"lint","parents":["d30d71ba45a6d5d1252215f6882ca2b54ec7da35"],"secs":20,"stamp":"1bfd22539c90a1d7a4ab5bde4dfb16c6","tree":"32db90988a5f92155c180e20b488c0745cd63346","v":1,"via":"run"} Ci-Attestation: {"at":1791853035,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"77102f43849fd8edca00027b0fa8a0799dc52c6b66da8a411f071de631973a8a","lane":"rust-test","parents":["d30d71ba45a6d5d1252215f6882ca2b54ec7da35"],"secs":48,"stamp":"b481b2edf77a3faef2fb745014594f08","tree":"32db90988a5f92155c180e20b488c0745cd63346","v":1,"via":"run"} Ci-Attestation: {"at":1791853035,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"14f2ae6e29a94e029caa9ae4c284661e9b14344db9d7303b890051ef9cc999d4","lane":"tier2-linux","parents":["d30d71ba45a6d5d1252215f6882ca2b54ec7da35"],"secs":70,"stamp":"62d4957447c785e48bca875a0578a083","tree":"32db90988a5f92155c180e20b488c0745cd63346","v":1,"via":"run"}
The Windows cmocka.h has no extern "C" guard, so the C++ test looked for mangled _assert_true and failed to link. Refs #155 Local-Gate: v1 tree=6bb2107a6eb8288cf3d2f9d471d0b598a6f150c4 secs=131 lanes=lint:run,rust-test:run,tier2-linux:run Ci-Attestation: {"at":1791854003,"gate":"rust/all/fmt","host":"linux-x86_64","key":"46b44f107c155f93a7fe71b0eaf4a26df271bb30344b6ce0cdf16fbf2eef8685","lane":"lint","parents":["71a5bebcbf7e8deda8e02a7e6feff44bccfbdc63"],"secs":19,"stamp":"28cfb031ffb07ae2e5d1773d5c541e4b","tree":"6bb2107a6eb8288cf3d2f9d471d0b598a6f150c4","v":1,"via":"run"} Ci-Attestation: {"at":1791854003,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"46b44f107c155f93a7fe71b0eaf4a26df271bb30344b6ce0cdf16fbf2eef8685","lane":"lint","parents":["71a5bebcbf7e8deda8e02a7e6feff44bccfbdc63"],"secs":19,"stamp":"8a6dd0b21ae5aa83c7f714b344479a83","tree":"6bb2107a6eb8288cf3d2f9d471d0b598a6f150c4","v":1,"via":"run"} Ci-Attestation: {"at":1791854003,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"587f5c0c64a9eecb1fc83fc7bd668ae04578f91a946dbcfd8e4b955fc1285c36","lane":"rust-test","parents":["71a5bebcbf7e8deda8e02a7e6feff44bccfbdc63"],"secs":45,"stamp":"e358136df02d338236cc863760bd737e","tree":"6bb2107a6eb8288cf3d2f9d471d0b598a6f150c4","v":1,"via":"run"} Ci-Attestation: {"at":1791854003,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"fde8e4a39e719ae0fb7f7d9db7e13f78ae05828622a1e75963041a01eae321db","lane":"tier2-linux","parents":["71a5bebcbf7e8deda8e02a7e6feff44bccfbdc63"],"secs":67,"stamp":"a9a04ce273b2d1cb6f1f42683a2cb2e5","tree":"6bb2107a6eb8288cf3d2f9d471d0b598a6f150c4","v":1,"via":"run"}
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.
Closes #155.
move_basic_to_scene_collections()migrates the legacybasic/scenes.json. It returned early only when thebasic/directory was missing, butMakeUserDirs()always creates that directory. So every fresh profile createdbasic/scenes/and then loggedFailed to rename basic scene collection filefor a file that never existed.frontend/utility/scene-collection-migration.{hpp,cpp}(migrate_basic_scene_collection), with no Qt or OBSApp dependency.OBSApp.cppkeeps the config-path lookup and passes inApp()->userScenesLocationandStr("Untitled").test_scene_collection_migration(cmocka,tests.d/) countsLOG_ERRORs throughbase_set_log_handlerin a temp dir. The fresh-profile case fails. The legacy-file and already-migrated cases pass and pin the existing behavior.scenes.jsondoesn't exist, before creatingbasic/scenes/.Tier 2: 138/138 pass with
ENABLE_RUST_LIBOBSOFF and ON. The local gate passed and is stamped.OBSApp.cppand the new helper's frontend build are checked by this PR's full OBS builds.