Skip to content

Commit 89384d2

Browse files
maxmmitchellcopybara-github
authored andcommitted
Add a new type to represent a release of the ink library: ink.proto.Version. Creates new options, so in a future CL we can associate versions with various messages, fields, and enum values in the ink BrushFamily proto.
PiperOrigin-RevId: 872916444
1 parent 87fe423 commit 89384d2

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

ink/storage/proto/options.proto

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// Copyright 2026 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
edition = "2024";
16+
17+
package ink.proto;
18+
19+
import "net/proto2/proto/descriptor.proto";
20+
21+
// enum Version {
22+
// option features.enforce_naming_style = STYLE_LEGACY;
23+
// option features.enum_type = OPEN;
24+
25+
// // LINT.IfChange
26+
// VERSION_UNSPECIFIED = 0;
27+
// VERSION_1_0_0 = 1;
28+
// VERSION_1_1_0_ALPHA_01 = 2;
29+
// // LINT.ThenChange(//depot/google3/third_party/ink/brush/version.h)
30+
// }
31+
32+
message Version {
33+
int32 major = 1;
34+
int32 minor = 2;
35+
int32 bug = 3;
36+
37+
enum Cycle {
38+
CYCLE_UNSPECIFIED = 0;
39+
CYCLE_ALPHA = 1;
40+
CYCLE_BETA = 2;
41+
CYCLE_RC = 3;
42+
CYCLE_STABLE = 4;
43+
}
44+
45+
Cycle cycle = 4;
46+
int32 release = 5;
47+
}
48+
49+
// Extend FieldOptions, MessageOptions, EnumOptions, and EnumValueOptions to
50+
// include Version.
51+
extend proto2.FieldOptions {
52+
Version field_min_version = 525000068;
53+
}
54+
extend proto2.MessageOptions {
55+
Version message_min_version = 525000037;
56+
}
57+
extend proto2.EnumValueOptions {
58+
Version enum_value_min_version = 525000143;
59+
}

0 commit comments

Comments
 (0)