clockworklabs / clockworklabs/SpacetimeDB

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

Open
#1,787 0 comments 0 reactions 1 assignee View on GitHub

@bfops is already working on this.

Since Oct 1, 2024.

Dominant language
Rust
Stars
25.2k
Forks
1.1k
Avg merge
2d 7h
Merged PRs (30d)
46

Description

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".

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.