fix reference transformer comments
GraphNodeSubPath/GraphNodeModuleInstance is not required for references
This commit is contained in:
parent
ab9a2935ce
commit
245296850b
|
@ -293,7 +293,7 @@ func (m *ReferenceMap) mapKey(path addrs.Module, addr addrs.Referenceable) strin
|
||||||
// referenced. This is the path that its results from ReferenceableAddrs
|
// referenced. This is the path that its results from ReferenceableAddrs
|
||||||
// are considered to be relative to.
|
// are considered to be relative to.
|
||||||
//
|
//
|
||||||
// Only GraphNodeModuleInstance implementations can be referenced, so this method will
|
// Only GraphNodeModulePath implementations can be referenced, so this method will
|
||||||
// panic if the given vertex does not implement that interface.
|
// panic if the given vertex does not implement that interface.
|
||||||
func vertexReferenceablePath(v dag.Vertex) addrs.Module {
|
func vertexReferenceablePath(v dag.Vertex) addrs.Module {
|
||||||
sp, ok := v.(GraphNodeModulePath)
|
sp, ok := v.(GraphNodeModulePath)
|
||||||
|
@ -316,7 +316,7 @@ func vertexReferenceablePath(v dag.Vertex) addrs.Module {
|
||||||
// vertexReferencePath returns the path in which references _from_ the given
|
// vertexReferencePath returns the path in which references _from_ the given
|
||||||
// vertex must be interpreted.
|
// vertex must be interpreted.
|
||||||
//
|
//
|
||||||
// Only GraphNodeModuleInstance implementations can have references, so this method
|
// Only GraphNodeModulePath implementations can have references, so this method
|
||||||
// will panic if the given vertex does not implement that interface.
|
// will panic if the given vertex does not implement that interface.
|
||||||
func vertexReferencePath(v dag.Vertex) addrs.Module {
|
func vertexReferencePath(v dag.Vertex) addrs.Module {
|
||||||
sp, ok := v.(GraphNodeModulePath)
|
sp, ok := v.(GraphNodeModulePath)
|
||||||
|
@ -344,7 +344,7 @@ func vertexReferencePath(v dag.Vertex) addrs.Module {
|
||||||
// The result is an opaque string that includes both the address of the given
|
// The result is an opaque string that includes both the address of the given
|
||||||
// object and the address of the module instance that object belongs to.
|
// object and the address of the module instance that object belongs to.
|
||||||
//
|
//
|
||||||
// Only GraphNodeModuleInstance implementations can be referrers, so this method will
|
// Only GraphNodeModulePath implementations can be referrers, so this method will
|
||||||
// panic if the given vertex does not implement that interface.
|
// panic if the given vertex does not implement that interface.
|
||||||
func (m *ReferenceMap) referenceMapKey(referrer dag.Vertex, addr addrs.Referenceable) string {
|
func (m *ReferenceMap) referenceMapKey(referrer dag.Vertex, addr addrs.Referenceable) string {
|
||||||
path := vertexReferencePath(referrer)
|
path := vertexReferencePath(referrer)
|
||||||
|
|
Loading…
Reference in New Issue