You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With an upcoming change, inline structs can be shared
and reappropriated as regular structs in some cases.
This means that the current algorithm, which assumes
that inline structs are always local to the current
field, is no longer correct.
We modify the algorithm to prepare for this change.
One aspect of this is isLocal, which checks whether
the field references resolve to within the current
scope of dependency analysis (by comparing to empty).
Another change is that we now need to be more
precise when it comes to checking whether a Vertex
is rooted or not. We use IsDetached and MayAttach
instead of Rooted for V3 in some cases.
Finally, we are now more aggressive with taking
the top reference, instead of an interstitial
reference, as the representative reference.
This results in better output even for V2
Changes:
issue2247.txtar: appropriate simplication
import.txtar: fixes an issue in v2
let2.txtar: the v3 output seems more correct, as
the original reference is more important than
the interstitial one.
Issue #2854
Signed-off-by: Marcel van Lohuizen <[email protected]>
Change-Id: I618bb38bc6cfe0200f6950a30063bc2fcfa31b34
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1202268
Unity-Result: CUE porcuepine <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Matthew Sackman <[email protected]>
0 commit comments