Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Protobuf v27.0-rc1 #210

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ TMP = .tmp
BIN = .tmp/bin
UNAME_OS := $(shell uname -s)
LICENSE_HEADER_YEAR_RANGE := 2023-2024
GOOGLE_PROTOBUF_VERSION = 26.1
GOOGLE_PROTOBUF_VERSION = 27.0-rc1

ifeq ($(UNAME_OS),Darwin)
PLATFORM := osx-x86_64
Expand All @@ -36,11 +36,11 @@ help: ## Describe useful make targets
.PHONY: test
test: $(BIN)/conformance_test_runner ## Run conformance tests
cd impl/ts-proto; PATH="$(abspath $(BIN)):$(PATH)" ./test.sh
cd impl/protobuf.js; PATH="$(abspath $(BIN)):$(PATH)" ./test.sh
# cd impl/protobuf.js; PATH="$(abspath $(BIN)):$(PATH)" ./test.sh
cd impl/google-protobuf; PATH="$(abspath $(BIN)):$(PATH)" ./test.sh
cd impl/protobuf-es; PATH="$(abspath $(BIN)):$(PATH)" ./test.sh
cd impl/protobuf-ts; PATH="$(abspath $(BIN)):$(PATH)" ./test.sh
cd impl/protoc-gen-ts; PATH="$(abspath $(BIN)):$(PATH)" ./test.sh
# cd impl/protoc-gen-ts; PATH="$(abspath $(BIN)):$(PATH)" ./test.sh
cd impl/protoscript; PATH="$(abspath $(BIN)):$(PATH)" ./test.sh
cd impl/baseline; PATH="$(abspath $(BIN)):$(PATH)" ./test.sh
node report.js
Expand Down
101 changes: 101 additions & 0 deletions impl/baseline/gen/google/protobuf/test_messages_proto2_pb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,11 @@ export class TestAllTypesProto2 extends Message<TestAllTypesProto2> {
*/
data?: TestAllTypesProto2_Data;

/**
* @generated from field: optional protobuf_test_messages.proto2.TestAllTypesProto2.MultiWordGroupField multiwordgroupfield = 204;
*/
multiwordgroupfield?: TestAllTypesProto2_MultiWordGroupField;

/**
* default values
*
Expand Down Expand Up @@ -860,6 +865,7 @@ export class TestAllTypesProto2 extends Message<TestAllTypesProto2> {
{ no: 118, name: "oneof_double", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, oneof: "oneof_field" },
{ no: 119, name: "oneof_enum", kind: "enum", T: proto2.getEnumType(TestAllTypesProto2_NestedEnum), oneof: "oneof_field" },
{ no: 201, name: "data", kind: "message", T: TestAllTypesProto2_Data, delimited: true, opt: true },
{ no: 204, name: "multiwordgroupfield", kind: "message", T: TestAllTypesProto2_MultiWordGroupField, delimited: true, opt: true },
{ no: 241, name: "default_int32", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true, default: -123456789 },
{ no: 242, name: "default_int64", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true, default: protoInt64.parse("-9123456789123456789") },
{ no: 243, name: "default_uint32", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true, default: 2123456789 },
Expand Down Expand Up @@ -1034,6 +1040,49 @@ export class TestAllTypesProto2_Data extends Message<TestAllTypesProto2_Data> {
}
}

/**
* @generated from message protobuf_test_messages.proto2.TestAllTypesProto2.MultiWordGroupField
*/
export class TestAllTypesProto2_MultiWordGroupField extends Message<TestAllTypesProto2_MultiWordGroupField> {
/**
* @generated from field: optional int32 group_int32 = 205;
*/
groupInt32?: number;

/**
* @generated from field: optional uint32 group_uint32 = 206;
*/
groupUint32?: number;

constructor(data?: PartialMessage<TestAllTypesProto2_MultiWordGroupField>) {
super();
proto2.util.initPartial(data, this);
}

static readonly runtime: typeof proto2 = proto2;
static readonly typeName = "protobuf_test_messages.proto2.TestAllTypesProto2.MultiWordGroupField";
static readonly fields: FieldList = proto2.util.newFieldList(() => [
{ no: 205, name: "group_int32", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 206, name: "group_uint32", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TestAllTypesProto2_MultiWordGroupField {
return new TestAllTypesProto2_MultiWordGroupField().fromBinary(bytes, options);
}

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TestAllTypesProto2_MultiWordGroupField {
return new TestAllTypesProto2_MultiWordGroupField().fromJson(jsonValue, options);
}

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TestAllTypesProto2_MultiWordGroupField {
return new TestAllTypesProto2_MultiWordGroupField().fromJsonString(jsonString, options);
}

static equals(a: TestAllTypesProto2_MultiWordGroupField | PlainMessage<TestAllTypesProto2_MultiWordGroupField> | undefined, b: TestAllTypesProto2_MultiWordGroupField | PlainMessage<TestAllTypesProto2_MultiWordGroupField> | undefined): boolean {
return proto2.util.equals(TestAllTypesProto2_MultiWordGroupField, a, b);
}
}

/**
* message_set test case.
*
Expand Down Expand Up @@ -1196,6 +1245,49 @@ export class ForeignMessageProto2 extends Message<ForeignMessageProto2> {
}
}

/**
* @generated from message protobuf_test_messages.proto2.GroupField
*/
export class GroupField extends Message<GroupField> {
/**
* @generated from field: optional int32 group_int32 = 122;
*/
groupInt32?: number;

/**
* @generated from field: optional uint32 group_uint32 = 123;
*/
groupUint32?: number;

constructor(data?: PartialMessage<GroupField>) {
super();
proto2.util.initPartial(data, this);
}

static readonly runtime: typeof proto2 = proto2;
static readonly typeName = "protobuf_test_messages.proto2.GroupField";
static readonly fields: FieldList = proto2.util.newFieldList(() => [
{ no: 122, name: "group_int32", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 123, name: "group_uint32", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GroupField {
return new GroupField().fromBinary(bytes, options);
}

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GroupField {
return new GroupField().fromJson(jsonValue, options);
}

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GroupField {
return new GroupField().fromJsonString(jsonString, options);
}

static equals(a: GroupField | PlainMessage<GroupField> | undefined, b: GroupField | PlainMessage<GroupField> | undefined): boolean {
return proto2.util.equals(GroupField, a, b);
}
}

/**
* @generated from message protobuf_test_messages.proto2.UnknownToTestAllTypes
*/
Expand Down Expand Up @@ -1999,3 +2091,12 @@ export const extension_int32 = proto2.makeExtension<TestAllTypesProto2, number>(
{ no: 120, kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
);

/**
* @generated from extension: optional protobuf_test_messages.proto2.GroupField groupfield = 121;
*/
export const groupfield = proto2.makeExtension<TestAllTypesProto2, GroupField>(
"protobuf_test_messages.proto2.groupfield",
TestAllTypesProto2,
() => ({ no: 121, kind: "message", T: GroupField, delimited: true, opt: true }),
);

6 changes: 6 additions & 0 deletions impl/google-protobuf/failing_tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -870,3 +870,9 @@ Required.Proto3.ProtobufInput.ValidDataScalar.SFIXED64[2].ProtobufOutput
Required.Proto3.ProtobufInput.ValidDataScalar.SINT64[2].ProtobufOutput
Required.Proto3.ProtobufInput.ValidDataScalar.UINT32[8].ProtobufOutput
Required.Proto3.ProtobufInput.ValidDataScalar.UINT64[2].ProtobufOutput
Recommended.Proto2.JsonInput.IgnoreUnknownEnumStringValueInMapPart.ProtobufOutput
Recommended.Proto2.JsonInput.IgnoreUnknownEnumStringValueInRepeatedPart.ProtobufOutput
Recommended.Proto3.JsonInput.IgnoreUnknownEnumStringValueInMapPart.ProtobufOutput
Recommended.Proto3.JsonInput.IgnoreUnknownEnumStringValueInRepeatedPart.ProtobufOutput
Required.Proto2.ProtobufInput.UnknownOrdering.ProtobufOutput
Required.Proto3.ProtobufInput.UnknownOrdering.ProtobufOutput
9 changes: 9 additions & 0 deletions impl/google-protobuf/failing_tests_text_format.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,12 @@ Required.Proto3.TextFormatInput.Uint32FieldTooLarge
Required.Proto3.TextFormatInput.Uint64FieldMaxValue.ProtobufOutput
Required.Proto3.TextFormatInput.Uint64FieldMaxValue.TextFormatOutput
Required.Proto3.TextFormatInput.Uint64FieldTooLarge
Required.Proto2.TextFormatInput.GroupFieldExtension.ProtobufOutput
Required.Proto2.TextFormatInput.GroupFieldExtension.TextFormatOutput
Required.Proto2.TextFormatInput.GroupFieldExtensionGroupName
Required.Proto2.TextFormatInput.GroupFieldLowercased.ProtobufOutput
Required.Proto2.TextFormatInput.GroupFieldLowercased.TextFormatOutput
Required.Proto2.TextFormatInput.GroupFieldLowercasedMultiWord.ProtobufOutput
Required.Proto2.TextFormatInput.GroupFieldLowercasedMultiWord.TextFormatOutput
Required.Proto2.TextFormatInput.GroupFieldMultiWord.ProtobufOutput
Required.Proto2.TextFormatInput.GroupFieldMultiWord.TextFormatOutput
Loading
Loading