Skip to content

Commit

Permalink
Extensions using indexes reserved for Buf (#38)
Browse files Browse the repository at this point in the history
updates bsr dependency to resolve extensions using indexes reserved for
internal organization use
  • Loading branch information
elliotmjackson authored Jul 13, 2023
1 parent fc72ac4 commit 25dda3f
Show file tree
Hide file tree
Showing 22 changed files with 1,291 additions and 1,290 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ LICENSE_HEADER := $(BIN)/license-header \
--license-type apache \
--copyright-holder "Buf Technologies, Inc." \
--year-range "$(COPYRIGHT_YEARS)"
PROTOVALIDATE_VERSION ?= v0.2.2

.PHONY: help
help: ## Describe useful make targets
Expand All @@ -35,8 +36,8 @@ clean: ## Delete intermediate build artifacts
.PHONY: generate
generate: $(BIN)/buf $(BIN)/license-header ## Regenerate code and license headers
rm -rf gen
$(BIN)/buf generate buf.build/bufbuild/protovalidate
$(BIN)/buf generate buf.build/bufbuild/protovalidate-testing
$(BIN)/buf generate buf.build/bufbuild/protovalidate:$(PROTOVALIDATE_VERSION)
$(BIN)/buf generate buf.build/bufbuild/protovalidate-testing:$(PROTOVALIDATE_VERSION)
$(LICENSE_HEADER) --ignore __init__.py

.PHONY: format
Expand Down Expand Up @@ -82,4 +83,4 @@ $(BIN)/license-header: $(BIN) Makefile

$(BIN)/protovalidate-conformance: $(BIN) Makefile
GOBIN=$(abspath $(BIN)) $(GO) install \
github.com/bufbuild/protovalidate/tools/protovalidate-conformance@latest
github.com/bufbuild/protovalidate/tools/protovalidate-conformance@$(PROTOVALIDATE_VERSION)
12 changes: 6 additions & 6 deletions gen/buf/validate/conformance/cases/bool_pb2.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2


DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)buf/validate/conformance/cases/bool.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"\x1c\n\x08\x42oolNone\x12\x10\n\x03val\x18\x01 \x01(\x08R\x03val\"+\n\rBoolConstTrue\x12\x1a\n\x03val\x18\x01 \x01(\x08\x42\x08\xfa\xf7\x18\x04j\x02\x08\x01R\x03val\",\n\x0e\x42oolConstFalse\x12\x1a\n\x03val\x18\x01 \x01(\x08\x42\x08\xfa\xf7\x18\x04j\x02\x08\x00R\x03valb\x06proto3')
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)buf/validate/conformance/cases/bool.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"\x1c\n\x08\x42oolNone\x12\x10\n\x03val\x18\x01 \x01(\x08R\x03val\"*\n\rBoolConstTrue\x12\x19\n\x03val\x18\x01 \x01(\x08\x42\x07\xbaH\x04j\x02\x08\x01R\x03val\"+\n\x0e\x42oolConstFalse\x12\x19\n\x03val\x18\x01 \x01(\x08\x42\x07\xbaH\x04j\x02\x08\x00R\x03valb\x06proto3')

_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
Expand All @@ -37,13 +37,13 @@

DESCRIPTOR._options = None
_BOOLCONSTTRUE.fields_by_name['val']._options = None
_BOOLCONSTTRUE.fields_by_name['val']._serialized_options = b'\372\367\030\004j\002\010\001'
_BOOLCONSTTRUE.fields_by_name['val']._serialized_options = b'\272H\004j\002\010\001'
_BOOLCONSTFALSE.fields_by_name['val']._options = None
_BOOLCONSTFALSE.fields_by_name['val']._serialized_options = b'\372\367\030\004j\002\010\000'
_BOOLCONSTFALSE.fields_by_name['val']._serialized_options = b'\272H\004j\002\010\000'
_globals['_BOOLNONE']._serialized_start=106
_globals['_BOOLNONE']._serialized_end=134
_globals['_BOOLCONSTTRUE']._serialized_start=136
_globals['_BOOLCONSTTRUE']._serialized_end=179
_globals['_BOOLCONSTFALSE']._serialized_start=181
_globals['_BOOLCONSTFALSE']._serialized_end=225
_globals['_BOOLCONSTTRUE']._serialized_end=178
_globals['_BOOLCONSTFALSE']._serialized_start=180
_globals['_BOOLCONSTFALSE']._serialized_end=223
# @@protoc_insertion_point(module_scope)
96 changes: 48 additions & 48 deletions gen/buf/validate/conformance/cases/bytes_pb2.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2


DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*buf/validate/conformance/cases/bytes.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"\x1d\n\tBytesNone\x12\x10\n\x03val\x18\x01 \x01(\x0cR\x03val\"+\n\nBytesConst\x12\x1d\n\x03val\x18\x01 \x01(\x0c\x42\x0b\xfa\xf7\x18\x07z\x05\n\x03\x66ooR\x03val\"-\n\x07\x42ytesIn\x12\"\n\x03val\x18\x01 \x01(\x0c\x42\x10\xfa\xf7\x18\x0cz\nB\x03\x62\x61rB\x03\x62\x61zR\x03val\"2\n\nBytesNotIn\x12$\n\x03val\x18\x01 \x01(\x0c\x42\x12\xfa\xf7\x18\x0ez\x0cJ\x04\x66izzJ\x04\x62uzzR\x03val\"&\n\x08\x42ytesLen\x12\x1a\n\x03val\x18\x01 \x01(\x0c\x42\x08\xfa\xf7\x18\x04z\x02h\x03R\x03val\")\n\x0b\x42ytesMinLen\x12\x1a\n\x03val\x18\x01 \x01(\x0c\x42\x08\xfa\xf7\x18\x04z\x02\x10\x03R\x03val\")\n\x0b\x42ytesMaxLen\x12\x1a\n\x03val\x18\x01 \x01(\x0c\x42\x08\xfa\xf7\x18\x04z\x02\x18\x05R\x03val\".\n\x0e\x42ytesMinMaxLen\x12\x1c\n\x03val\x18\x01 \x01(\x0c\x42\n\xfa\xf7\x18\x06z\x04\x10\x03\x18\x05R\x03val\"3\n\x13\x42ytesEqualMinMaxLen\x12\x1c\n\x03val\x18\x01 \x01(\x0c\x42\n\xfa\xf7\x18\x06z\x04\x10\x05\x18\x05R\x03val\"8\n\x0c\x42ytesPattern\x12(\n\x03val\x18\x01 \x01(\x0c\x42\x16\xfa\xf7\x18\x12z\x10\"\x0e^[\\x00-\\x7F]+$R\x03val\"*\n\x0b\x42ytesPrefix\x12\x1b\n\x03val\x18\x01 \x01(\x0c\x42\t\xfa\xf7\x18\x05z\x03*\x01\x99R\x03val\".\n\rBytesContains\x12\x1d\n\x03val\x18\x01 \x01(\x0c\x42\x0b\xfa\xf7\x18\x07z\x05:\x03\x62\x61rR\x03val\"-\n\x0b\x42ytesSuffix\x12\x1e\n\x03val\x18\x01 \x01(\x0c\x42\x0c\xfa\xf7\x18\x08z\x06\x32\x04\x62uzzR\x03val\"%\n\x07\x42ytesIP\x12\x1a\n\x03val\x18\x01 \x01(\x0c\x42\x08\xfa\xf7\x18\x04z\x02P\x01R\x03val\"\'\n\tBytesIPv4\x12\x1a\n\x03val\x18\x01 \x01(\x0c\x42\x08\xfa\xf7\x18\x04z\x02X\x01R\x03val\"\'\n\tBytesIPv6\x12\x1a\n\x03val\x18\x01 \x01(\x0c\x42\x08\xfa\xf7\x18\x04z\x02`\x01R\x03val\"0\n\x0f\x42ytesIPv6Ignore\x12\x1d\n\x03val\x18\x01 \x01(\x0c\x42\x0b\xfa\xf7\x18\x07z\x02`\x01\xd0\x01\x01R\x03valb\x06proto3')
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*buf/validate/conformance/cases/bytes.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"\x1d\n\tBytesNone\x12\x10\n\x03val\x18\x01 \x01(\x0cR\x03val\"*\n\nBytesConst\x12\x1c\n\x03val\x18\x01 \x01(\x0c\x42\n\xbaH\x07z\x05\n\x03\x66ooR\x03val\",\n\x07\x42ytesIn\x12!\n\x03val\x18\x01 \x01(\x0c\x42\x0f\xbaH\x0cz\nB\x03\x62\x61rB\x03\x62\x61zR\x03val\"1\n\nBytesNotIn\x12#\n\x03val\x18\x01 \x01(\x0c\x42\x11\xbaH\x0ez\x0cJ\x04\x66izzJ\x04\x62uzzR\x03val\"%\n\x08\x42ytesLen\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02h\x03R\x03val\"(\n\x0b\x42ytesMinLen\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02\x10\x03R\x03val\"(\n\x0b\x42ytesMaxLen\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02\x18\x05R\x03val\"-\n\x0e\x42ytesMinMaxLen\x12\x1b\n\x03val\x18\x01 \x01(\x0c\x42\t\xbaH\x06z\x04\x10\x03\x18\x05R\x03val\"2\n\x13\x42ytesEqualMinMaxLen\x12\x1b\n\x03val\x18\x01 \x01(\x0c\x42\t\xbaH\x06z\x04\x10\x05\x18\x05R\x03val\"7\n\x0c\x42ytesPattern\x12\'\n\x03val\x18\x01 \x01(\x0c\x42\x15\xbaH\x12z\x10\"\x0e^[\\x00-\\x7F]+$R\x03val\")\n\x0b\x42ytesPrefix\x12\x1a\n\x03val\x18\x01 \x01(\x0c\x42\x08\xbaH\x05z\x03*\x01\x99R\x03val\"-\n\rBytesContains\x12\x1c\n\x03val\x18\x01 \x01(\x0c\x42\n\xbaH\x07z\x05:\x03\x62\x61rR\x03val\",\n\x0b\x42ytesSuffix\x12\x1d\n\x03val\x18\x01 \x01(\x0c\x42\x0b\xbaH\x08z\x06\x32\x04\x62uzzR\x03val\"$\n\x07\x42ytesIP\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02P\x01R\x03val\"&\n\tBytesIPv4\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02X\x01R\x03val\"&\n\tBytesIPv6\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02`\x01R\x03val\"/\n\x0f\x42ytesIPv6Ignore\x12\x1c\n\x03val\x18\x01 \x01(\x0c\x42\n\xbaH\x07z\x02`\x01\xd0\x01\x01R\x03valb\x06proto3')

_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
Expand All @@ -37,69 +37,69 @@

DESCRIPTOR._options = None
_BYTESCONST.fields_by_name['val']._options = None
_BYTESCONST.fields_by_name['val']._serialized_options = b'\372\367\030\007z\005\n\003foo'
_BYTESCONST.fields_by_name['val']._serialized_options = b'\272H\007z\005\n\003foo'
_BYTESIN.fields_by_name['val']._options = None
_BYTESIN.fields_by_name['val']._serialized_options = b'\372\367\030\014z\nB\003barB\003baz'
_BYTESIN.fields_by_name['val']._serialized_options = b'\272H\014z\nB\003barB\003baz'
_BYTESNOTIN.fields_by_name['val']._options = None
_BYTESNOTIN.fields_by_name['val']._serialized_options = b'\372\367\030\016z\014J\004fizzJ\004buzz'
_BYTESNOTIN.fields_by_name['val']._serialized_options = b'\272H\016z\014J\004fizzJ\004buzz'
_BYTESLEN.fields_by_name['val']._options = None
_BYTESLEN.fields_by_name['val']._serialized_options = b'\372\367\030\004z\002h\003'
_BYTESLEN.fields_by_name['val']._serialized_options = b'\272H\004z\002h\003'
_BYTESMINLEN.fields_by_name['val']._options = None
_BYTESMINLEN.fields_by_name['val']._serialized_options = b'\372\367\030\004z\002\020\003'
_BYTESMINLEN.fields_by_name['val']._serialized_options = b'\272H\004z\002\020\003'
_BYTESMAXLEN.fields_by_name['val']._options = None
_BYTESMAXLEN.fields_by_name['val']._serialized_options = b'\372\367\030\004z\002\030\005'
_BYTESMAXLEN.fields_by_name['val']._serialized_options = b'\272H\004z\002\030\005'
_BYTESMINMAXLEN.fields_by_name['val']._options = None
_BYTESMINMAXLEN.fields_by_name['val']._serialized_options = b'\372\367\030\006z\004\020\003\030\005'
_BYTESMINMAXLEN.fields_by_name['val']._serialized_options = b'\272H\006z\004\020\003\030\005'
_BYTESEQUALMINMAXLEN.fields_by_name['val']._options = None
_BYTESEQUALMINMAXLEN.fields_by_name['val']._serialized_options = b'\372\367\030\006z\004\020\005\030\005'
_BYTESEQUALMINMAXLEN.fields_by_name['val']._serialized_options = b'\272H\006z\004\020\005\030\005'
_BYTESPATTERN.fields_by_name['val']._options = None
_BYTESPATTERN.fields_by_name['val']._serialized_options = b'\372\367\030\022z\020\"\016^[\\x00-\\x7F]+$'
_BYTESPATTERN.fields_by_name['val']._serialized_options = b'\272H\022z\020\"\016^[\\x00-\\x7F]+$'
_BYTESPREFIX.fields_by_name['val']._options = None
_BYTESPREFIX.fields_by_name['val']._serialized_options = b'\372\367\030\005z\003*\001\231'
_BYTESPREFIX.fields_by_name['val']._serialized_options = b'\272H\005z\003*\001\231'
_BYTESCONTAINS.fields_by_name['val']._options = None
_BYTESCONTAINS.fields_by_name['val']._serialized_options = b'\372\367\030\007z\005:\003bar'
_BYTESCONTAINS.fields_by_name['val']._serialized_options = b'\272H\007z\005:\003bar'
_BYTESSUFFIX.fields_by_name['val']._options = None
_BYTESSUFFIX.fields_by_name['val']._serialized_options = b'\372\367\030\010z\0062\004buzz'
_BYTESSUFFIX.fields_by_name['val']._serialized_options = b'\272H\010z\0062\004buzz'
_BYTESIP.fields_by_name['val']._options = None
_BYTESIP.fields_by_name['val']._serialized_options = b'\372\367\030\004z\002P\001'
_BYTESIP.fields_by_name['val']._serialized_options = b'\272H\004z\002P\001'
_BYTESIPV4.fields_by_name['val']._options = None
_BYTESIPV4.fields_by_name['val']._serialized_options = b'\372\367\030\004z\002X\001'
_BYTESIPV4.fields_by_name['val']._serialized_options = b'\272H\004z\002X\001'
_BYTESIPV6.fields_by_name['val']._options = None
_BYTESIPV6.fields_by_name['val']._serialized_options = b'\372\367\030\004z\002`\001'
_BYTESIPV6.fields_by_name['val']._serialized_options = b'\272H\004z\002`\001'
_BYTESIPV6IGNORE.fields_by_name['val']._options = None
_BYTESIPV6IGNORE.fields_by_name['val']._serialized_options = b'\372\367\030\007z\002`\001\320\001\001'
_BYTESIPV6IGNORE.fields_by_name['val']._serialized_options = b'\272H\007z\002`\001\320\001\001'
_globals['_BYTESNONE']._serialized_start=107
_globals['_BYTESNONE']._serialized_end=136
_globals['_BYTESCONST']._serialized_start=138
_globals['_BYTESCONST']._serialized_end=181
_globals['_BYTESIN']._serialized_start=183
_globals['_BYTESIN']._serialized_end=228
_globals['_BYTESNOTIN']._serialized_start=230
_globals['_BYTESNOTIN']._serialized_end=280
_globals['_BYTESLEN']._serialized_start=282
_globals['_BYTESLEN']._serialized_end=320
_globals['_BYTESMINLEN']._serialized_start=322
_globals['_BYTESMINLEN']._serialized_end=363
_globals['_BYTESMAXLEN']._serialized_start=365
_globals['_BYTESMAXLEN']._serialized_end=406
_globals['_BYTESMINMAXLEN']._serialized_start=408
_globals['_BYTESMINMAXLEN']._serialized_end=454
_globals['_BYTESEQUALMINMAXLEN']._serialized_start=456
_globals['_BYTESEQUALMINMAXLEN']._serialized_end=507
_globals['_BYTESPATTERN']._serialized_start=509
_globals['_BYTESPATTERN']._serialized_end=565
_globals['_BYTESPREFIX']._serialized_start=567
_globals['_BYTESPREFIX']._serialized_end=609
_globals['_BYTESCONTAINS']._serialized_start=611
_globals['_BYTESCONTAINS']._serialized_end=657
_globals['_BYTESSUFFIX']._serialized_start=659
_globals['_BYTESSUFFIX']._serialized_end=704
_globals['_BYTESIP']._serialized_start=706
_globals['_BYTESIP']._serialized_end=743
_globals['_BYTESIPV4']._serialized_start=745
_globals['_BYTESIPV4']._serialized_end=784
_globals['_BYTESIPV6']._serialized_start=786
_globals['_BYTESIPV6']._serialized_end=825
_globals['_BYTESIPV6IGNORE']._serialized_start=827
_globals['_BYTESIPV6IGNORE']._serialized_end=875
_globals['_BYTESCONST']._serialized_end=180
_globals['_BYTESIN']._serialized_start=182
_globals['_BYTESIN']._serialized_end=226
_globals['_BYTESNOTIN']._serialized_start=228
_globals['_BYTESNOTIN']._serialized_end=277
_globals['_BYTESLEN']._serialized_start=279
_globals['_BYTESLEN']._serialized_end=316
_globals['_BYTESMINLEN']._serialized_start=318
_globals['_BYTESMINLEN']._serialized_end=358
_globals['_BYTESMAXLEN']._serialized_start=360
_globals['_BYTESMAXLEN']._serialized_end=400
_globals['_BYTESMINMAXLEN']._serialized_start=402
_globals['_BYTESMINMAXLEN']._serialized_end=447
_globals['_BYTESEQUALMINMAXLEN']._serialized_start=449
_globals['_BYTESEQUALMINMAXLEN']._serialized_end=499
_globals['_BYTESPATTERN']._serialized_start=501
_globals['_BYTESPATTERN']._serialized_end=556
_globals['_BYTESPREFIX']._serialized_start=558
_globals['_BYTESPREFIX']._serialized_end=599
_globals['_BYTESCONTAINS']._serialized_start=601
_globals['_BYTESCONTAINS']._serialized_end=646
_globals['_BYTESSUFFIX']._serialized_start=648
_globals['_BYTESSUFFIX']._serialized_end=692
_globals['_BYTESIP']._serialized_start=694
_globals['_BYTESIP']._serialized_end=730
_globals['_BYTESIPV4']._serialized_start=732
_globals['_BYTESIPV4']._serialized_end=770
_globals['_BYTESIPV6']._serialized_start=772
_globals['_BYTESIPV6']._serialized_end=810
_globals['_BYTESIPV6IGNORE']._serialized_start=812
_globals['_BYTESIPV6IGNORE']._serialized_end=859
# @@protoc_insertion_point(module_scope)
Loading

0 comments on commit 25dda3f

Please sign in to comment.