Skip to content

Commit 133bc92

Browse files
committed
[tmp] skip interfaces
1 parent e1cec20 commit 133bc92

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pkg/crd/v3/parser.go

-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ func (p *Parser) NeedSchemaFor(typ TypeIdent) error {
109109
schemaCtx := newSchemaContext(typ.Package, p)
110110
schema := infoToSchema(schemaCtx.ForInfo(info))
111111

112-
// TODO(directxman12): threadsafe
113112
p.Schemata[typ] = *schema
114113

115114
return nil

pkg/crd/v3/references.go

+4
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ func (r *referenceSet) collectReferences(info *markers.TypeInfo) {
9494
}
9595

9696
if len(info.Fields) == 0 {
97+
if _, isIface := info.RawSpec.Type.(*ast.InterfaceType); isIface {
98+
// skip interfaces, we never care about references in them
99+
return
100+
}
97101
ast.Walk(col, info.RawSpec.Type)
98102
return
99103
}

0 commit comments

Comments
 (0)