Skip to content

1.16.0 — protogen follows imports

Choose a tag to compare

@freitasjca freitasjca released this 10 Sep 04:47
· 48 commits to main since this release

protogen follows import (IMPORT-1)

protogen previously generated from one .proto and refused anything that
imported another. It now loads the whole import closure and emits one unit per
file, with path-derived unit names and qualified cross-file references.

Generated output moves. Two name-resolution fixes ride along, and both can
rename identifiers in code that compiled before:

  • FLATTEN-1 — nested types are flattened into unit scope, so two nested
    types sharing a leaf name used to collide. They are now disambiguated.
  • SCOPE-1 — type names resolve innermost-outward from the enclosing scope,
    as proto requires. Names that previously resolved to the wrong type, or
    failed to resolve, now resolve correctly.

Where your schemas already generated compiling code, output is unchanged. The
renames land where the old output did not compile or bound the wrong type.

Corpus

7,216 of 7,301 schemas now generate code that compiles — parses, emits,
and survives the compiler — up from 7,204, with emitter defects down 22 → 7.

The denominator changed too, and that is the more useful number: the previous
3019/3019 counted only schemas the generator did not refuse, so it excluded
59% of the corpus and improved every time the generator refused more. FPC
compiler crashes (57) are now counted apart from emitter defects, having once
overstated the defect count by 3.5x.

Tests — the transport is now actually exercised

grep -rl TNghttp2Server tests/ returned nothing before this release. Every
stage was codec or codegen, so a fully green run had never opened a socket —
not hypothetical: this suite passed for years on a machine with no
nghttp2.dll on it.

Nghttp2ServerSmoke drives the library's own client against its own server in
one process (bind, h2c, GET /smoke → 200 + body, unrouted → 404, clean stop).
Wired in as stage 4b on Windows and 3c on FPC. Absent libnghttp2 it exits 3 and
skips loudly — a quiet skip is indistinguishable from a pass, which is what
let the gap survive.

This is a floor, not depth: TLS, mTLS, the epoll loop, streaming and graceful
shutdown remain covered by horse-provider-nghttp2's suite, Linux/FPC only.

Also

  • samples/rest-and-grpc — REST through Horse over HTTP/1.1 on :9000 and
    gRPC through this library on :50051, one binary. Horse providers are
    mutually exclusive; serving gRPC needs no provider at all.
  • Runtime exception messages are ASCII — em-dashes and typographic quotes made
    them unreadable in a Windows console.

Requires libnghttp2 >= 1.59 at run time. The gRPC layer needs FPC trunk; the
transport builds on 3.2.2.