Optimize caching versioning #3534
Replies: 2 comments 9 replies
-
I don't feel confident about this approach. |
Beta Was this translation helpful? Give feedback.
-
This is an interesting idea. If some teams try to stay on the latest version, it will lead to a lot of rebuilding of the cache that is not necessary. If we're able to confidently determine which parts of our codebase will influence the hashing mechanism, we could have some automation in |
Beta Was this translation helpful? Give feedback.
-
Hello 👋
Right now we are adding the Tuist version as part of the target hash calculation.
While this is the safest possible approach and make sure that the cached framework is “aligned” with the current Tuist version, it invalidates the cache much more often than needed, as a Tuist update should actually invalidate the cache only if it changes how it maps from a
TuistGraph.Target
to a.framework
/.xcframework
(correct me if I’m wrong).This means that either teams rebuild the caches more often than needed or they don’t update
Tuist
too often to avoid that.As an alternative approach, we could just not make the
Tuist
version part of the hash calculation, and instead use an independent version, which changes only if there is a real reason to invalidate the cache (i.e. it actually changes how Tuist maps from aTuistGraph.Target
to a.framework
/.xcframework
).What do you think?
Beta Was this translation helpful? Give feedback.
All reactions