@@ -1275,10 +1275,28 @@ func (c *compiler) _compileEdges(refctx *RefContext) {
1275
1275
1276
1276
if refctx .Key .Primary .Suspension != nil || refctx .Key .Value .Suspension != nil {
1277
1277
if ! c .lazyGlobBeingApplied {
1278
+ var suspensionValue bool
1278
1279
if refctx .Key .Primary .Suspension != nil {
1279
- e . suspended = refctx .Key .Primary .Suspension .Value
1280
+ suspensionValue = refctx .Key .Primary .Suspension .Value
1280
1281
} else {
1281
- e .suspended = refctx .Key .Value .Suspension .Value
1282
+ suspensionValue = refctx .Key .Value .Suspension .Value
1283
+ }
1284
+ e .suspended = suspensionValue
1285
+
1286
+ // If we're unsuspending an edge, we should also unsuspend its src and dst objects
1287
+ if ! suspensionValue {
1288
+ // Find the source and destination objects
1289
+ srcPath , dstPath := e .ID .SrcPath , e .ID .DstPath
1290
+ srcObj := refctx .ScopeMap .GetField (srcPath ... )
1291
+ dstObj := refctx .ScopeMap .GetField (dstPath ... )
1292
+
1293
+ // Unsuspend the objects
1294
+ if srcObj != nil {
1295
+ srcObj .suspended = false
1296
+ }
1297
+ if dstObj != nil {
1298
+ dstObj .suspended = false
1299
+ }
1282
1300
}
1283
1301
}
1284
1302
}
@@ -1309,7 +1327,7 @@ func (c *compiler) _compileEdges(refctx *RefContext) {
1309
1327
}
1310
1328
c .compileField (e .Map_ , refctx .Key .EdgeKey , refctx )
1311
1329
} else {
1312
- if refctx .Key .Primary .Unbox () != nil {
1330
+ if refctx .Key .Primary .Unbox () != nil && refctx . Key . Primary . Suspension == nil {
1313
1331
if c .ignoreLazyGlob (e ) {
1314
1332
return
1315
1333
}
@@ -1330,7 +1348,7 @@ func (c *compiler) _compileEdges(refctx *RefContext) {
1330
1348
c .mapRefContextStack = append (c .mapRefContextStack , refctx )
1331
1349
c .compileMap (e .Map_ , refctx .Key .Value .Map , refctx .ScopeAST )
1332
1350
c .mapRefContextStack = c .mapRefContextStack [:len (c .mapRefContextStack )- 1 ]
1333
- } else if refctx .Key .Value .ScalarBox ().Unbox () != nil {
1351
+ } else if refctx .Key .Value .ScalarBox ().Unbox () != nil && refctx . Key . Value . Suspension == nil {
1334
1352
if c .ignoreLazyGlob (e ) {
1335
1353
return
1336
1354
}
0 commit comments