Skip to content

Asset cleanup drops deleted packages whole: no "marked as deleted in editor" warnings - #149

Merged
GhzGarage merged 2 commits into
mainfrom
fix/deleted-package-warnings
Nov 9, 2026
Merged

GhzGarage merged 2 commits into
mainfrom
fix/deleted-package-warnings

Conversation

@GhzGarage

Copy link
Copy Markdown
Contributor

Removes the ~98 LogAssetRegistry: Warning: ... package was marked as deleted in editor, but has been modified on disk lines 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

AssetDeleted puts 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 calls IAssetRegistry::PackageDeleted on each package after its file is gone, instead of AssetDeleted on each asset. That removes the registry data without the empty-package mark, so the late change has nothing 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 hand-written "AssetDeleted, then delete the file" cleanups in six tests now go through 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:

  • Build: MantleEditor Win64 succeeded with 0 warnings.
  • Tests: Mantle.Editor + Mantle.WeaponPublish.Parts + Mantle.Vehicle, 824/824 passed.
  • Warning counts: "marked as deleted" lines went from 92 (in the earlier subset) and 6 (in tests outside it) to 0. Total LogAssetRegistry warnings: 0.
  • The rebase onto main only added Copies from mantle #320 at 9da9c046b: copyright line on LuauWarnings.h #148, a comment line in LuauWarnings.h.

🤖 Generated with Claude Code

GhzGarage and others added 2 commits November 8, 2026 23:29
…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>
@GhzGarage
GhzGarage merged commit 33232c9 into main Nov 9, 2026
1 check passed
@GhzGarage
GhzGarage deleted the fix/deleted-package-warnings branch November 9, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant