fix(transport): stop scanning DataSourceReference for blocker references
DetectBlockersAsync was feeding TemplateAttribute.DataSourceReference
into the identifier scanner alongside script bodies, but that field is
an OPC UA node-address path (e.g. "ns=3;s=Tank.Level") owned by the
device, not script source. The dot delimiter inside the path tripped
the heuristic into flagging the address segment ("Tank", "Sensor",
"TestChildObject", "DevAppEngine") as a missing SharedScript or
ExternalSystem reference -- a 100% false-positive class on any
template catalog with OPC-UA-mapped attributes.
Drop the DataSourceReference scan entirely. Attribute.Value is still
scanned because it can carry a design-time default expression that
calls into runtime APIs. Add a regression test pinning the new behavior.
This commit is contained in:
@@ -374,8 +374,13 @@ public sealed class BundleImporter : IBundleImporter
|
||||
foreach (var s in t.Scripts) CollectCallIdentifiers(s.Code, referencedFromBundle);
|
||||
foreach (var a in t.Attributes)
|
||||
{
|
||||
// Attribute.Value carries the design-time default expression, which
|
||||
// can be script-callable. DataSourceReference is an OPC UA node
|
||||
// address path (e.g. "ns=3;s=Tank.Level") owned by the device --
|
||||
// it's never script source and must NOT be scanned, or the dot
|
||||
// delimiter trips the heuristic into flagging the address segments
|
||||
// as missing SharedScript/ExternalSystem references.
|
||||
CollectCallIdentifiers(a.Value, referencedFromBundle);
|
||||
CollectCallIdentifiers(a.DataSourceReference, referencedFromBundle);
|
||||
}
|
||||
}
|
||||
foreach (var m in content.ApiMethods)
|
||||
|
||||
Reference in New Issue
Block a user