There is a special schema known as the
all schema, defined in glean/schema/source/schema.angle.
all schema is used to resolve names to particular predicates and
types when the version in omitted. This matters in a few places:
When Thrift types are generated from the schema, the types and predicates from the
allschema determine which names are unversioned in the generated Thrift. For example, if the
src.1, then the predicate
src.File.1will be simply called
Filein the generated Thrift; otherwise it would be called
When an Angle query mentions an unversioned predicate or type, the name is resolved to a particular version of that predicate or type using the current
When deriving a predicate with the CLI tool, like
glean derive python.TargetUses.
all schema is defined like this:
schema all.6 :
Multiple versions of
This is a rather specialised scenario, but it might be necessary to
have multiple versions of the
all schema during a schema
migration. We can code-generate the Thrift types from each version of
all separately, and clients can select at build time which version
they want to use. This enables incremental migration of code from one
schema to another schema.