A location object MAY contain a property named id whose value is a non-negative integer that is unique among all location objects belonging to theResult. The value does not need to be unique across all result objects (§3.27) in theRun.
If id is absent, it SHALL default to -1, which indicates that the value is unknown (not set).
NOTE: Negative values are forbidden because their use would suggest some non-obvious semantic difference between positive and negative values.
EXAMPLE: Within a result object, the following property values (among others) are location objects, and no two of them can have the same value for id:
result.relatedLocations[0]
result.codeFlows[0].threadFlows[0].locations[0].location
result.stacks[0].frames[0].location
The id property has two purposes: to enable an embedded link (§3.11.6) within a message object (§3.11) to refer to thisObject, and to identify thisObject as the target of a locationRelationship (§3.34). If no message object within theResult refers to thisObject via an embedded link and no locationRelationship object within theResult specifies thisObject as its target, the id property does not need to appear.
i.e. there's a "namespace" of numeric ids for locations within each result object.
In #643 we're adding a "relatedLocations" property to notification objects.
Should this be generalized so that for any locations within a notification, any with ids must have unique ids within that notification?
"3.28.2 id property" (of location) states:
i.e. there's a "namespace" of numeric ids for locations within each result object.
In #643 we're adding a "relatedLocations" property to notification objects.
Should this be generalized so that for any locations within a notification, any with ids must have unique ids within that notification?