engine: Fix up some send/recv corner cases
Initially I wasn't 100% clear or decided on the send/recv semantics. After some experimenting, I think this is much closer to what we want. Nothing should break or regress here, this only enables more possibilities.
This commit is contained in:
@@ -1373,6 +1373,7 @@ func (obj *FileRes) CheckApply(ctx context.Context, apply bool) (bool, error) {
|
||||
// might not have a new value to copy, and therefore we won't see this
|
||||
// notification of change. Therefore, it is important to process these
|
||||
// promptly, if they must not be lost, such as for cache invalidation.
|
||||
// NOTE: Modern send/recv doesn't really have this limitation anymore.
|
||||
if val, exists := obj.init.Recv()["content"]; exists && val.Changed {
|
||||
// if we received on Content, and it changed, invalidate the cache!
|
||||
obj.init.Logf("contentCheckApply: invalidating sha256sum of `content`")
|
||||
|
||||
Reference in New Issue
Block a user