Language record
Protobuf
A `.proto` file is indexed as the declarations it makes and the types they name: a package, messages with their fields, enums, oneofs and services with their rpcs each get an identity, nesting is containment, and a field's declared type — or an rpc's request and response — is a reference to the type it names.
The registry row this page is generated from
Read at render time from the same family row the register reads, so nothing in this block can disagree with it.
- Extensions
- .proto
- Registry names
protobuf- Recorded symbols
- messages · enums · services · fields
Relationship types this analyzer constructs
5 of 14 constructed, read from this analyzer's source and re-derived by the languages gate. Each row below is one of the engine's types, in the engine's own order.
| Relationship type | Constructed |
|---|---|
calls | ruled absent |
extends | ruled absent |
implements | ruled absent |
uses | ruled absent |
imports | constructed by this analyzer |
exports | constructed by this analyzer |
contains | constructed by this analyzer |
references | constructed by this analyzer |
overrides | constructed by this analyzer |
instantiates | ruled absent |
decorates | ruled absent |
renders | ruled absent |
mixes_in | ruled absent |
part_of | ruled absent |
5 constructed, 9 not constructed. All 9 absent types are recorded as ruled absent: the written reason and the corpus measurement behind each are in this family's completeness record. The register explains what each label means.
What this analyzer does not resolve
extendsis deliberately unused, and the reason is the language rather than the analyzer. Proto'sextend Foo { … }does not make the block a subclass ofFoo; it adds FIELDS toFoo. So the extension block publishes no symbol of its own, its members are emitted with the extended type as their owner and markedviaExtension, and nothing in a schema should be read as an inheritance relationship.- Reference resolution is per-file. The specification's own rule is implemented — a leading dot is absolute, anything else resolves from the innermost scope outward, and a forward reference to a message declared later in the file is fine because declarations are collected in a pre-pass — but it resolves against what THIS file declares. A dotted reference whose owner lives in another file falls back to the name as written, which is correct for the fully qualified names real schemas use and is where the 3 unresolved endpoints out of 17,411 relationships across all four pinned corpora come from.
- A scalar type is a keyword, not a reference, so
stringandint32produce no edge; whether a type node names something is decided by whether it holds a message-or-enum type, not by a list of known scalars. And per-field and per-enum-value options are not extracted —option,reservedandextensionsride on the file or the owning message as metadata rather than becoming declarations.
Every line above was written against Protobuf’s own analyzer module and is named against a construct in it, so it can be checked against the source. Nothing here is inherited from a template, or from another language’s page.
Where you meet it in a repository
Recognised by extension — .proto. Everything below is about where those files actually sit in a working repository.
- A schema is a directory of
.protofiles under a versioned package path, soacme.billing.v1.Invoiceis the real address and the leadingv1is a package segment rather than a kind. Against protobuf's own 108-file reference corpus this analyzer publishes 7,744 symbols and 9,073 relationships with 107 of 108 files clean. - A
oneofis a symbol and its fields still belong to the message, because a field number lives in the message's space andmsg.fieldis how every protobuf tool refers to them — so the oneof is a union with containment edges to each member, and each member carries the oneof it belongs to. - The proto2
groupform declares a type AND a field, and both are published under distinct ids:optional group G = 4 { … }gives youpkg.M.Gandpkg.M.G#property. A#cannot occur in a protobuf identifier, so no real name can forge the second one — which accounts for all 39 ownership changes measured when this analyzer replaced the grammar it shipped with.
Questions this index answers
Phrased as retrievals, because that is what an index can honestly do: it holds the symbols and the edges between them, and hands them back with the evidence attached.
- Which messages, enums, services and oneofs does this file declare?
- Which fields does this message have, and which types do they name?
- Which operations does this service expose, and what do they take and return?
- Which field numbers has this message reserved?
What the analyzer sees in code like this
package acme.billing; // bb records: namespace acme.billing
message Invoice { // bb records: class Invoice
string id = 1; // bb records: property id — a scalar, so no edge
repeated Line lines = 2; // bb records: property lines; uses -> Line
}
service Billing { // bb records: interface Billing
rpc Charge (Invoice) returns (Receipt); // bb records: method Charge; uses -> Invoice and Receipt
}Symbols are stored with the file they came from and the bytes they span, so a hit points at a line rather than at a guess. The annotations in the sample are commentary for the reader, not strings the index would store.
Languages that turn up in the same repository
Web, data & config — the count beside each name is how many relationship types that family’s analyzer constructs.
The extensions, registry names, recorded symbols and relationship types above are the parser registry row for Protobuf, read while the page rendered — the same row the register reads, so the two surfaces cannot tell two stories. Every relationship type listed as constructed appears in src/ast/real-*, the analyzer modules bb ships. bb 0.1.0 answers from a local store over 50 languages (53 registry ids, three of them aliases). There is no benchmark on this page: every claim here is one you can go and read in the source.