Skip to content

Conversation

@alexeagle
Copy link
Collaborator

No description provided.

@alexisherdz45-lgtm
Copy link

message MyOptions {
string file_only_option = 1 [targets = TARGET_TYPE_FILE];
int32 message_and_enum_option = 2 [targets = TARGET_TYPE_MESSAGE,
targets = TARGET_TYPE_ENUM];
}

extend google.protobuf.FileOptions {
optional MyOptions file_options = 50000;
}

extend google.protobuf.MessageOptions {
optional MyOptions message_options = 50000;
}

extend google.protobuf.EnumOptions {
optional MyOptions enum_options = 50000;
}

// OK: this field is allowed on file options
option (file_options).file_only_option = "abc";

message MyMessage {
// OK: this field is allowed on both message and enum options
option (message_options).message_and_enum_option = 42;
}

enum MyEnum {
MY_ENUM_UNSPECIFIED = 0;
// Error: file_only_option cannot be set on an enum.
option (enum_options).file_only_option = "xyz";
}

@alexisherdz45-lgtm
Copy link

message MyOptions {
string file_only_option = 1 [targets = TARGET_TYPE_FILE];
int32 message_and_enum_option = 2 [targets = TARGET_TYPE_MESSAGE,
targets = TARGET_TYPE_ENUM];
}

extend google.protobuf.FileOptions {
optional MyOptions file_options = 50000;
}

extend google.protobuf.MessageOptions {
optional MyOptions message_options = 50000;
}

extend google.protobuf.EnumOptions {
optional MyOptions enum_options = 50000;
}

// OK: this field is allowed on file options
option (file_options).file_only_option = "abc";

message MyMessage {
// OK: this field is allowed on both message and enum options
option (message_options).message_and_enum_option = 42;
}

enum MyEnum {
MY_ENUM_UNSPECIFIED = 0;
// Error: file_only_option cannot be set on an enum.
option (enum_options).file_only_option = "xyz";
}
Questions_and_Answers_-_Data_protection_reform.pdf

@alexisherdz45-lgtm
Copy link

Fhotos

@alexisherdz45-lgtm
Copy link

Me urge este archivo

@karenwuz karenwuz added the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Jan 29, 2026
@mkruskal-google
Copy link
Member

This is failing tests

@mkruskal-google
Copy link
Member

Already fixed*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🅰️ safe for tests Mark a commit as safe to run presubmits over

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants