openfl / lime

A foundational Haxe framework for cross-platform development
https://lime.openfl.org/
MIT License
754 stars 370 forks source link

Automatically delete stale assets and dependency files. #1790

Closed player-03 closed 4 months ago

player-03 commented 4 months ago

This is yet another attempt to solve #1546, and has several advantages over the previous attempts.

player-03 commented 4 months ago

@justin-espedal, how does this look?

player-03 commented 4 months ago

It looks like this isn't enough to solve the original issue after all. The example given there is an Android dependency, and since that isn't an asset this PR won't do anything about it. Instead, AndroidPlatform calls System.recursiveCopy() to copy the whole folder, making no attempt to clear out files that weren't touched.

Meanwhile, not all assets and templates use System to copy them, so we can't just go based on System either.

justin-espedal commented 4 months ago

Thanks for considering this issue again after so long.

And thanks for looking into the original problem, too. I suspected that may be the case, but wasn't able to make time to look into it yesterday. This approach does look a lot cleaner though!

player-03 commented 4 months ago

I have a plan to handle dependencies, but I'm still working on it. The final result won't be quite as concise as this, but it should still work without needing to modify HXP.

player-03 commented 4 months ago

And that should do it. Give it a try when you have time.