SpacetimeDB icon indicating copy to clipboard operation
SpacetimeDB copied to clipboard

CLI - `spacetime generate` should delete stale files from subdirectories

Open bfops opened this issue 1 year ago • 0 comments

Background

spacetime generate will delete stale generated files in the output directory, but not in any subdirectories. However, we have the ability to generate files in subdirectories, so this creates the possibility of leaving stale files around that don't get deleted.

However, @bfops is a bit apprehensive about recursing arbitrarily into subdirectories - Unity projects have a tendency to be big, and filesystem traversal can be slow, especially on NTFS.

Do we actually use the functionality of generating files in subdirectories, or do we just support it?

Definition of Done

Either we remove/clarify the capacity for spacetime generate to generate files in arbitrary subdirectories, or we recurse into subdirectories in order to clear out stale files. It should not be possible to leave around client stale files after changing the module code and regenerating (barring weird user behavior).

Priority

@bfops - Leaving this as a P1 so it gets seen, but I don't think it's a "must-have".

bfops avatar Oct 01 '24 20:10 bfops