Repository navigation
Asset cleanup drops deleted packages whole: no "marked as deleted in editor" warnings - #149
Merged
Merged
Conversation
…editor" warnings AssetDeleted puts a package whose last asset goes into the asset registry's empty-package set. The change a save just before made reaches the registry a frame later, through the directory watcher, and finds the package in that set: AssetRegistry.cpp then warns "package was marked as deleted in editor, but has been modified on disk" and returns the package from queries again. Weapon builder, publish-parts, rigid-mesh and builder-export tests saved and then removed their packages this way: 92 such lines per run. - FMantleAssetCleanup::MoveAside with bDeleteFiles now removes each package with PackageDeleted after its file goes, instead of AssetDeleted per asset, so there is no empty-package mark for a late change to trip. - UnloadPackagesClean keeps the file, so it no longer tells the registry the assets were deleted; the registry keeps what it found on disk. - The four tests' own copies of AssetDeleted plus a file delete now use MoveAside. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ces through the shared cleanup Both told the registry the asset was deleted, then unloaded and deleted the folder: the same "marked as deleted in editor" warning, 6 lines per run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Removes the ~98
LogAssetRegistry: Warning: ... package was marked as deleted in editor, but has been modified on disklines from MantleCore test runs. Item 4 of the build-warnings pass. No waits, and no expected-message hiding.Mantle-PR: mantleplatform/mantle#320
(This PR changes no copied files. The line is only there because MantleCore main already carries #320's copies, and #320 hasn't merged into mantle main yet.)
Cause
AssetDeletedputs a package whose last asset goes into the asset registry's empty-package set. The change from the save just before reaches the registry a frame later, through the directory watcher, and finds the package in that set. AssetRegistry.cpp:8501 then warns and returns the package from queries again. Tests that save and then remove their assets hit this every run. Flushing the watcher first doesn't help: Windows hasn't delivered the save's change yet in that same frame.Fix
FMantleAssetCleanup::MoveAside(..., bDeleteFiles = true)now callsIAssetRegistry::PackageDeletedon each package after its file is gone, instead ofAssetDeletedon each asset. That removes the registry data without the empty-package mark, so the late change has nothing to trip.UnloadPackagesCleankeeps the file, so it no longer tells the registry the assets were deleted. The registry keeps what it found on disk.MoveAside: WeaponBuilderV2, WeaponPublishParts, WeaponRigidMesh, WeaponBuilderExport, WeaponBuilderPanel and VehicleExportScale.Testing
Run with D:\Mantle\mantle at #320's head (9da9c046b) plus this branch, headless with
-nullrhi:Mantle.Editor+Mantle.WeaponPublish.Parts+Mantle.Vehicle, 824/824 passed.LogAssetRegistrywarnings: 0.🤖 Generated with Claude Code