-
Notifications
You must be signed in to change notification settings - Fork 1k
[2.x] Cache deactivation on task #7658
Copy link
Copy link
Closed
Labels
area/sbt2sbt 2.x issuessbt 2.x issues
Milestone
Description
I imagine it can be very frustrating for the user if the cache does not work as expected (inconsistencies, corrupted output, performance degradation). I think we should always be able to deactivate the cache globally, on a project, at the task level.
Global / cacheStores := Seq.empty
If cacheStores is empty I think the user would expect no cache at all, even not a local cache. We should make sure that sbt still works if there is no cache.
compileIncremental / cachingEnabled := false
At different level, it should be possible to deactivate the cache. This should be clearly documented.
I think the logic can be generated automatically by Def.cachedTask: we add a taskScope parameter, to generate the following automatically:
if (taskScope /cachingEnabled).value then ActionCache.get(...)(doAction) else doAction()Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/sbt2sbt 2.x issuessbt 2.x issues