Repository navigation
v0.71.0 — namespace hierarchy + client SDK feature wave
Feature release covering the v0.70.1 → v0.71.0 window. All changes are additive; no breaking changes.
Added — server
- Namespace hierarchy (#8): namespaces can declare a parent via
SetNamespaceParent, forming a chain that schema resolution walks at publish, compile, and read time. Includes new RPCsSetNamespaceParent/GetNamespaceChain, aninternal/authzpackage for capability-based parent-chain access checks (WithAuthorizerinjects production policy; the defaultauthz.AllowAllis dev-only and logs a warning), rebase machinery (Rebase/GetRebaseStatus) for replaying descendants when an ancestor changes, and FQN-collision detection across the chain at publish time.
Added — client
client.WithServerChain()(#9): construct a Resolver that consultsGetNamespaceChainand automatically wires ancestor Resolvers, so a singleclient.New(..., namespace)resolves types declared anywhere in the namespace's chain.Resolver.RangeMessages(f)(#10): iterate every message type currently visible to the resolver — bound namespace plus chain ancestors. Used by editor tooling building completion lists for the@typedirective.Resolver.FindMessageByNameWithOrigin/Resolver.FindFileByPathWithOrigin(#11): like their non-Origin counterparts but also return the namespace ID that contributed the type / file — useful for editor integrations rendering provenance.Resolver.GetSource(ctx, filePath)(#12): fetch the original.protosource bytes for a file the resolver knows. Locates the owning schema across the chain, calls the gRPCGetSourceRPC, returns the requested file's bytes. Editor integrations render registry-only files as virtual documents in go-to-definition.client.WithDiskCache(path)(#13): opt-in on-disk descriptor cache. Successful refreshes are persisted; whenDialcannot reach the server, the resolver falls back to the cached snapshot and reportsIsStale() == true.Refresh()on a stale Resolver returns the newErrStaleResolver. Atomic writes; ancestor namespaces persist into sibling subdirectories; top-level manifest records the chain so the offline loader can reconstruct it without server access.
Changed
client.Dialnow follows a try-online-then-fallback flow whenWithDiskCacheis configured. Without that option, dial-failure behavior is unchanged.client/snapshot.go:fetchSchemadefers to a newcompileSchema(schemaID, version, fdset, raw)helper so the offline cache loader compiles disk bytes through the same path;schemaSnapshotgainsrawDescriptorSet []bytefor the persister.
Dependencies
google.golang.org/grpcminor + patch bumps (#2, #6)github.com/jackc/pgx/v55.9.1 → 5.9.2 (#5)github.com/pressly/goose/v33.27.0 → 3.27.1 (#6)testcontainersgroup bump (#3)github.com/trendvidia/protowire-go→ v1.0.0 (#7) — pxf v1 grammar
See CHANGELOG.md for the full entry.