Replace generic resolution recording with intent methods
This commit is contained in:
17
lifecycle.go
17
lifecycle.go
@@ -259,10 +259,19 @@ func (r *Resolution) Source(id string) (SourceInfo, bool) {
|
||||
return fromEngineSourceInfo(value), ok
|
||||
}
|
||||
|
||||
// Record declares the intent for a resolver mutation. A container path covers
|
||||
// mutations to its descendants.
|
||||
func (r *Resolution) Record(path Path, kind ChangeKind, reason string, dependencies ...Path) {
|
||||
r.engineContext().Record(toEnginePath(path), engine.ChangeKind(kind), reason, toEnginePaths(dependencies)...)
|
||||
// RecordDerivedDefault records a derived-default intent for a resolver mutation
|
||||
// already performed by application code. A container path covers mutations to
|
||||
// its descendants. This does not assign a value or suppress work for explicit
|
||||
// input.
|
||||
func (r *Resolution) RecordDerivedDefault(path Path, reason string, dependencies ...Path) {
|
||||
r.engineContext().RecordDerivedDefault(toEnginePath(path), reason, toEnginePaths(dependencies)...)
|
||||
}
|
||||
|
||||
// RecordNormalization records a normalization intent for a resolver mutation
|
||||
// already performed by application code. A container path covers mutations to
|
||||
// its descendants. This does not assign a value.
|
||||
func (r *Resolution) RecordNormalization(path Path, reason string, dependencies ...Path) {
|
||||
r.engineContext().RecordNormalization(toEnginePath(path), reason, toEnginePaths(dependencies)...)
|
||||
}
|
||||
|
||||
// Error reports a safe, value-free resolution error at path.
|
||||
|
||||
Reference in New Issue
Block a user