cuelang.org/go@v0.13.0/tools/trim/testdata/42.txtar (about)

     1  issue 1309
     2  
     3  NB: because of #NamespacedResource: #ClusterResource, it seems like it
     4  would be possible to remove line 4. But we can't because that would
     5  make line 5 an error - the use of the X_Platform field. So I think
     6  this is the best we can do.
     7  
     8  #skip-v2
     9  -- a.cue --
    10  #ClusterResource: X_Platform: string
    11  #NamespacedResource: {
    12  	#ClusterResource
    13  	X_Platform: string
    14  	metadata: namespace: X_Platform
    15  }
    16  
    17  Resources: [Platform=string]: {
    18  	#NamespacedResource
    19  	X_Platform: Platform
    20  }
    21  
    22  Resources: myplatform: {}
    23  -- out/trim-v3 --
    24  == a.cue
    25  #ClusterResource: X_Platform: string
    26  #NamespacedResource: {
    27  	#ClusterResource
    28  	X_Platform: string
    29  	metadata: namespace: X_Platform
    30  }
    31  
    32  Resources: [Platform=string]: {
    33  	#NamespacedResource
    34  	X_Platform: Platform
    35  }
    36  
    37  Resources: myplatform: {}
    38  -- out/trim-v3-noshare --
    39  == a.cue
    40  #ClusterResource: X_Platform: string
    41  #NamespacedResource: {
    42  	#ClusterResource
    43  	X_Platform: string
    44  	metadata: namespace: X_Platform
    45  }
    46  
    47  Resources: [Platform=string]: {
    48  	#NamespacedResource
    49  	X_Platform: Platform
    50  }
    51  
    52  Resources: myplatform: {}