Skip to content

rulec v0.22.1

Latest

Choose a tag to compare

@github-actions github-actions released this 01 Oct 14:12
· 3 commits to main since this release

Nothing that passed in 0.22.0 fails in 0.22.1, and no answer changes. What moves is the buf module gen writes beside the Connect service.

Fixed

  • A contract that imports a file from a BSR module now builds. A rule whose .proto contract imports protovalidate's buf/validate/validate.proto, say, got a module that buf generate could not build, and rulec test failed its Connect passes at that import. gen now declares, in proto/buf.yaml, the module the import comes from, and writes proto/buf.lock with the pins of the buf.lock beside the contract — both read from the contract's own buf workspace. It fetches nothing itself: buf fetches the module when it builds.

Added

  • rulec api's connect entry names those modules under deps, so that a caller who builds the stubs with a template of its own knows the module has dependencies.

Changed

  • proto/buf.gen.yaml writes the stubs of the files a contract imports from a BSR module too (include_imports: true on the py plugin), since the contract's stub imports them. Every generated tree's buf.gen.yaml changes with this, so rulec gen --check reports it until it is generated again.
  • When nothing beside the contract can pin the module — no buf.yaml above it, or a buf.lock still in v1's shape, whose shake256 digests a v2 module does not read — gen declares the module, writes no buf.lock, and says to run buf dep update in proto/. Two buf.lock files that pin one module at two commits stop gen.
  • For a rule with such a contract, the Connect passes of rulec test reach the network when buf does not have the module cached yet.

One static binary per platform, no runtime; on Linux also as a .deb and an .rpm. Verify a download against SHA256SUMS before running it; the install page says how.