Skip to content

Commit b740a3d

Browse files
maxmmitchellcopybara-github
authored andcommitted
Associate versions to features in BrushFamily proto.
Add descriptors to associate ink.proto.Version values with messages, fields, and enum types in BrushFamily proto. This will be used in a future CL to write consistency tests to ensure all features have a minimum compatible version associated with them. `transitive_descriptor_set` and `options_cc_proto` will be used in a future CL. Version `1.0.0` (stable 1) is being used to represent all the features that were available when Ink `1.0.0` was released (TODO: I think I have this right here, but where can I find the last commit on the C++ side that was included to confirm this?). Everything else is being lumped under the (presumed) next release of Ink, Version `1.1.0-alpha01` (if features get cut or pushed off, we can change them). We don't necessarily need this split, as there is no release of Ink which has versioning set with a maximum allowed version of `1.0.0`, so the actual `1.0.0` release will not reject brushes from `1.1.0-alpha01`. But, this distinction in the code now has been useful for testing purposes. PiperOrigin-RevId: 872916637
1 parent 40bfce5 commit b740a3d

File tree

3 files changed

+1974
-220
lines changed

3 files changed

+1974
-220
lines changed

ink/storage/proto/BUILD.bazel

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
load("@protobuf//bazel:cc_proto_library.bzl", "cc_proto_library")
2020
load("@protobuf//bazel:proto_library.bzl", "proto_library")
21+
load("//tools/build_defs/proto:descriptor_set.bzl", "transitive_descriptor_set")
2122

2223
package(
2324
default_visibility = ["//visibility:public"],
@@ -37,6 +38,7 @@ proto_library(
3738
srcs = ["brush_family.proto"],
3839
deps = [
3940
":color_proto",
41+
":options_proto",
4042
],
4143
)
4244

@@ -45,6 +47,14 @@ proto_library(
4547
srcs = ["color.proto"],
4648
)
4749

50+
proto_library(
51+
name = "options_proto",
52+
srcs = ["options.proto"],
53+
deps = [
54+
"//net/proto2/proto:descriptor",
55+
],
56+
)
57+
4858
proto_library(
4959
name = "stroke_input_batch_proto",
5060
srcs = ["stroke_input_batch.proto"],
@@ -94,6 +104,11 @@ cc_proto_library(
94104
deps = [":color_proto"],
95105
)
96106

107+
cc_proto_library(
108+
name = "options_cc_proto",
109+
deps = [":options_proto"],
110+
)
111+
97112
cc_proto_library(
98113
name = "stroke_input_batch_cc_proto",
99114
deps = [":stroke_input_batch_proto"],
@@ -108,3 +123,8 @@ cc_proto_library(
108123
name = "coded_numeric_run_cc_proto",
109124
deps = [":coded_numeric_run_proto"],
110125
)
126+
127+
transitive_descriptor_set(
128+
name = "brush_family_proto_descriptor_set",
129+
deps = [":brush_family_proto"],
130+
)

0 commit comments

Comments
 (0)