funcSignatureKey returns a stable, comparable identifier for a function signature. Uses the metadata Signature string when present; falls back to the definition hash to keep distinct overloads distinguishable even when sync emitted an empty Signature field.
(fn *storepb.FunctionMetadata)
| 115 | // the definition hash to keep distinct overloads distinguishable even when |
| 116 | // sync emitted an empty Signature field. |
| 117 | func funcSignatureKey(fn *storepb.FunctionMetadata) string { |
| 118 | if fn == nil { |
| 119 | return "" |
| 120 | } |
| 121 | if fn.Signature != "" { |
| 122 | return fn.Signature |
| 123 | } |
| 124 | return fn.Definition |
| 125 | } |
| 126 | |
| 127 | func kindLabel(k objectKind) string { |
| 128 | switch k { |