stx-get-scopegraph-data-ext(|a, rel) = ?s
; stx-get-scopegraph-data(|a, rel)
; try(
?[]; !s
// extract the resource identifier from the scope and drop the "/./" prefix
; where(Scope(string-as-chars(drop(|3)) => resource, id))
// attempt to retrieve the analysis state from the external scope
; where(a' := <stx-get-ast-analysis> (){TermIndex(resource, -1)})
// re-execute in the external context
; stx-get-scopegraph-data(|a', rel)
)
Bug description The
stx-get-scopegraph-data
API method returns the empty list if the given scope is not part of the current analysis context.Versions Spoofax version: 2.5.16. Statix setup:
multi-file
, concurrent solver enabled.Steps to reproduce the behavior
Scope/2
instance.stx-get-ast-analysis
, for a term of the second file.<stx-get-scopegraph-data(|a, "identifier/of!relation")> s
.[]
.Observed behavior The result is the empty list.
Expected behavior The result is not necessarily the empty list, but the actual relevant members.
Additional context Original Slack thread: https://slde.slack.com/archives/C7254SF60/p1649660409194699.
Workaround