Skip to content

v0.22.0

Choose a tag to compare

@trendvidia trendvidia released this 25 Jul 23:27
976cae8

What's Changed

  • Message literals as list elements in annotation arguments (#128) — closes the RFC-001 §8.1 gap from #127: @meta([Item{status: 1}]) previously fell through to opaque expression capture and was rejected with a misleading "must be a literal or a qualified name" error. The element's type path now travels on the dict itself (ast.ExprDict.TypeName(), attached only by the §5.1 annotation classifier), B3 evaluates each element against its explicit type (ir.AnnotationUse.MessageLiteralElem), and fdp lowers elements to LiteralValue.literal.message — a google.protobuf.Any serialized at lowering — flat or nested. Untyped {...} elements under an any-typed context get the same explicit-type-name diagnostic as argument-level literals; message elements join the homogeneity check. Unblocks the deferred @http responses parameter design (protowire#177) and the corpus pairing (protowire#176).
  • Broken and cyclic alias bases diagnosed at the declaration site (#130, closing #129) — type Broken = DoesNotExist; and type A = B; type B = A; compiled with zero diagnostics when no field referenced them, leaking dangling base_type_fqn values into the FileTypeDecls carrier. resolveTypeAliasBases is now the single reporting site: standard cannot-find diagnostics (with import suggestions) at the alias's base expression, plus a local cycle walk reporting each cycle exactly once with a snippet per link. unwrapTypeAlias went fully quiet, so a broken alias reports exactly once whether referenced by twenty fields or none, and imported broken aliases are reported by their declaring file without use-site duplication. The type alias ... is cyclic message text is unchanged.

Behavior notes for downstream: sources that previously compiled while carrying unreferenced broken/cyclic aliases now fail to compile (spec-correct tightening); base_type_fqn consumers no longer see cyclic decl chains in error-free images.

Release gate: ci-local-full verified on this tag — generate/lint/test clean, checkspecdrift matches the protowire checkout, benchmarks pass.

Full Changelog: v0.21.0...v0.22.0