Releases: trendvidia/protocompile
Release list
v0.23.0
What's Changed
catalogs— the reference loader for locale catalog sources (#131) — companion to trendvidia/protowire#195, which pinned the RFC-001 §7 catalog-library source format: acatalog_librariesfile is a text-formatprotowire.schema.catalog.v1.Catalogmessage, one locale per file, entries keyed by violation code with{param}templates. The new publiccatalogspackage sits besideengineconfig(the shared-surface argument of trendvidia/protolsp#265):Load(baseDir, paths)merges files into one catalog per locale — per-domain files for the same locale merge, a duplicate code across files for one locale is a hard error naming both files, malformed input never partially loads — andFromConfig(cfg)applies the §7 path rule (relative paths resolve against the config file's directory). Output is plain(locale → entries)data; rendering stays in the engine (protocheck'sNewMapCatalogconsumesEntriesdirectly). The vendored spec set gainsproto/schema/catalog/v1/catalog.proto(covered bycheckspecdrift),config.protois re-vendored for its protowire#195 comment update, and the08_engine_configfixture mirror'scatalog_librariesvalues are.textprotopaths now.
Behavior notes for downstream: no compiler-surface change — this release is additive API only (catalogs package, regenerated internal bindings). Unblocks trendvidia/protolsp#267.
Release gate: ci-local-full verified on this tag — generate/lint/test clean, checkspecdrift matches the protowire checkout, benchmarks pass.
Full Changelog: v0.22.0...v0.23.0
v0.22.0
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 toLiteralValue.literal.message— agoogle.protobuf.Anyserialized at lowering — flat or nested. Untyped{...}elements under anany-typed context get the same explicit-type-name diagnostic as argument-level literals; message elements join the homogeneity check. Unblocks the deferred@httpresponsesparameter 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;andtype A = B; type B = A;compiled with zero diagnostics when no field referenced them, leaking danglingbase_type_fqnvalues into theFileTypeDeclscarrier.resolveTypeAliasBasesis 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.unwrapTypeAliaswent 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. Thetype alias ... is cyclicmessage 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
v0.21.0
What's Changed
- Reserved
protowire.prefix rejected in@sensitive(class)values (#125) — RFC-001 §6.7 classification parameter, rule 1 (protowire#111/protowire#163): class names beginning withprotowire.are reserved for future spec-defined classes, mirroring the §7 violation-code reservation. The B3 use-arg validation pass now rejects a string-literalclassargument (named or positional) that is exactly"protowire"or any dotted extension of it, keyed on the resolved FQNprotowire.schema.v1.sensitive— user annotations that happen to be namedsensitiveare unaffected, as are lookalike prefixes (protowirex.pii), bare@sensitive, andclass = "". Closes the v0.19.0/v0.20.0 corpus-ahead-of-toolchain gap: MUST-NOT-COMPILE fixtureinvalid/reserved_sensitive_class.protonow fails with exactly the expected diagnostic (#123). TypeDecl.base_type_fqnnow emitted fully qualified (#126) — the carrier contract pins the field as the FQN of the base type, but the lowering recorded the base as written in source, so bare in-package references stayed bare (type CompanyEmail = Email→"Email"). The IR now resolves each alias's base in a quietresolveTypeAliasBasespass and the newir.TypeAlias.BaseTypeFQN()accessor feeds the FDP carrier; primitives keep their predeclared name, chained aliases record their immediate base fully qualified, and unresolved bases fall back to the as-written text (#121). Corpus fixtures02_composition,06_cross_file_lib, and14_refinement_kindsnow produce exactly the fixture-pinned FQNs (e.g.SettledStatus → fixtures.refine.OrderStatus,DisplayName → google.protobuf.StringValue).
Release gate: ci-local-full verified on this tag — generate/lint/test clean, checkspecdrift matches the protowire checkout, benchmarks pass.
Full Changelog: v0.20.0...v0.21.0
v0.20.0
What's Changed
- report.proto re-vendored at protowire
ad3bf9e— the publicgen/protowire/schema/v1bindings pick up two wire-shape additions toEnrichedViolation(#124):for_key = 8(protowire#125, v1.3.0): marks a violation against a map entry's key rather than its value — a key violation and a value violation on the same entry serialize to identical paths and are disambiguated by this flag. Closes the stale-bindings gap from #116 (v0.19.0 shipped bindings predating the field).source_ref = 9+ the newSourceRefmessage (protowire#161): the §8.3.1 rule join key — originating file plus canonical descriptor path — engines populate whenever the rule resolved through an embedded source map (50404). Wire consumers join violations back to lowered rules by this key instead of fuzzy-matchingsourcepositions.
- Spec-drift gate green: with the #106 type_chain clarification upstreamed (protowire#165, fixing protowire#155),
make checkspecdriftpasses clean on all three vendored spec files;ci-local-full(the release gate added in #119) verified on this tag. - Also since v0.19.0: bracket-form function options lowered into
FunctionDecl.options(#120), in-memory options encoding contract documented on fdp (#115).
Downstream: unblocks trendvidia/protocheck#53 — protocheck can now un-lossy Report.Proto()/ReportFromProto on both fields and pass protowire conformance fixture 15_collections_golden end-to-end.
Full Changelog: v0.19.0...v0.20.0
v0.19.0
What's Changed
- Public report.proto bindings:
Report,Violation, andExecutionModeare now generated intogithub.com/trendvidia/protocompile/gen/protowire/schema/v1(packageschemav1, alongside the descriptor carriers, vendored at protowire2fcc218) — for engines producing wire Reports (RFC-001 goal-5 report equality, §6.6 rule 6 gRPC adapters) and tooling consuming them (#111, fixes #108) - Map per-element carrier: a map field whose value type is a type alias now expands the alias's rules onto the map field's own
AnnotationList— base-to-derived ahead of field-site entries, exactly likerepeatedelement aliases — plus a bare-pathTYPE_REFINEMENTentry whose location points at the value-type name insidemap<K, V>(#112, fixes #109). Descriptor-shape change vs v0.18.0: these rules previously lowered onto the synthetic entry's value field (…Entry.value[…]paths); that emission is gone. Key-type alias rules deliberately remain on the synthetic entry's key field, where they stay distinguishable from per-value rules - Typed
map_entry: synthetic map-entry messages now carryoptions.map_entry = trueas the typed field instead of unknown-field bytes, so in-memory reflection consumers (protodesc.NewFileIsMapclassification, protoreflect map accessors, dynamicpb) see a map without a wire round-trip; wire encoding is unchanged (#113, fixes #110). Other user-written options intentionally remain unknown-bytes-encoded in memory — see #114 for that contract discussion. protocheck can drop its re-add-map_entrypost-processing workaround after bumping
Full Changelog: v0.18.0...v0.19.0
v0.18.0
What's Changed
- Behavior change: alias-expanded
AnnotationListentries now emit in RFC-001 §6.4 evaluation order — base alias rules first, then derived alias rules, then field-level rules. Engines that assumed the previous derived-first order (which violated §6.4) must not reorder; entries are now evaluation-ready as listed (#102, fixes #101) - Descriptor-path re-keying: because §8.3.1 ordinals key off
AnnotationListorder, same-named annotations propagated from a multi-link alias chain resolve to differentelementPath[fqn#ordinal]paths than v0.17.1 — the base-most alias's rule is now ordinal 0. Persisted descriptor paths (report keys, suppression lists, LSP bookmarks) from v0.17.1 must be re-derived.SourceMapentries moved in lockstep, and protocheck's chain reconstruction is order-independent and unaffected (#102) SourceEntry.type_chainonTYPE_REFINEMENTentries is now base-to-derived per the documented contract, and thedescriptor.protocomment now states explicitly that links are the alias chain only — the concrete base type is never a link; recover it from the first link'sTypeDecl.base_type_fqn(#102, #106, fixes #103)- Remove stale same-file-only note on
unwrapTypeAlias— cross-file annotation propagation is fully supported and now documented as such (#107, fixes #105)
Full Changelog: v0.17.1...v0.18.0
v0.17.1
What's Changed
- Populate declaration-site locations on the
protowire.schema.v1file-scope declaration carriers (50401–50403):AnnotationDecl,FunctionDecl, andTypeDeclnow record their declaration-name source location, per RFC-001 §8.2 (#100, fixes #99) - Deflake
TestSpawnBudgetBoundsGoroutines(#98) - CI: build/test on the runner's go-plus (self-hosted macOS, Model B) (#97)
- Bump
github.com/bufbuild/buffrom 1.71.0 to 1.72.0 in/internal/tools(#96)
Full Changelog: v0.17.0...v0.17.1