Skip to content

v0.8.0

Compare
Choose a tag to compare
@jhump jhump released this 22 Jan 18:36
· 61 commits to main since this release
9913977

This release primarily fixes bugs in the compiler that resulted in differences between the source files that protocompile would accept vs. the source files that the reference compiler, protoc, would accept. But one of these changes resulted in an unused AST node type. So this type has been removed from the exported API, which is why this v0.8.0 instead of v0.7.2.

Fixes:

  1. A protocompile.Compiler would previously accept some sources that would be rejected by protoc. In particular, protocompile allowed for explicitly-signed positive numeric literals -- with a leading plus (+) sign. But this is not allowed by the reference compiler, protoc, nor by implementations of the text format in myriad languages (which is also the format the compiler uses to parse custom option values that are message literals).
    • This change is not backwards compatible. The AST node type ast.PositiveUintLiteralNode has been removed. It was only used to support this invalid construct in the language. Code that refers to this node type (or its associated factory function and Visitor method) must be removed.
  2. A protocompile.Compiler would previously reject some sources that would protoc would accept. In particular, protocompile did not allow -nan as a default field value or custom option value and it also did not accept inf and alternate case spellings (such as upper- or mixed-case) of infinity and nan in message literals, which are all allowed by protoc.