Skip to content

Commit b15feda

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 b15feda

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

ink/storage/proto/options.proto

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
message Version {
22+
int32 major = 1;
23+
int32 minor = 2;
24+
int32 bug = 3;
25+
26+
enum Cycle {
27+
CYCLE_UNSPECIFIED = 0;
28+
CYCLE_ALPHA = 1;
29+
CYCLE_BETA = 2;
30+
CYCLE_RC = 3;
31+
CYCLE_STABLE = 4;
32+
}
33+
34+
Cycle cycle = 4;
35+
int32 release = 5;
36+
}
37+
38+
// Extend FieldOptions, MessageOptions, EnumOptions, and EnumValueOptions to
39+
// include Version.
40+
extend proto2.FieldOptions {
41+
Version field_min_version = 525000068;
42+
}
43+
extend proto2.MessageOptions {
44+
Version message_min_version = 525000037;
45+
}
46+
extend proto2.EnumValueOptions {
47+
Version enum_value_min_version = 525000143;
48+
}

0 commit comments

Comments
 (0)