Hi @Ernest0-Production! I’m Dosu and I’m helping the tuist team.
The behavior you’re seeing is expected: Path.relativeToCurrentFile uses the absolute path from #file as callerPath, so when the project folder moves (like on CI), the resolved path changes and the cache invalidates. This isn’t an explicit cache invalidation—it’s a side effect of how the path resolution and hashing work, since the resolved absolute path depends on the file’s location at build time. This design ensures cache integrity but can cause issues in environments where the project directory changes location frequently, like CI jobs docs code.
There aren’t existing tickets or discussions directly about this, but some teams use workarounds like symlinking cache directories or setting a custom XDG_CACHE_HOME to help manage cache reuse across CI runs. Another approach is to store the manifest cache within the project directory so it can be cleaned up with the workspace community thread.
You can reproduce the issue by moving your project directory or running builds in different locations (e.g., on CI), which will cause the resolved paths—and thus the cache keys—to change.
If you want to avoid this, consider whether you can use a different path type (like relative to manifest or root) for resources that shouldn’t be tied to the source file’s location, or adopt one of the cache management workarounds above.
To reply, just mention @dosu.
Docs are dead. Just use Dosu.