@@ -227,24 +227,29 @@ register_toolchains("@rules_scala//protoc:all")
227227
228228#### Specifying additional ` protoc ` platforms
229229
230- Use the ` protoc_platforms ` parameter to specify additional required
231- [ platforms] [ ] if the execution or target platforms differ from the host
232- platform. Valid values come from [ protocolbuffers/protobuf releases] [ ] file name
233- suffixes. It's also safe to explicitly include the host platform.
230+ Use the ` protoc_platforms ` parameter to specify additional [ platforms] [ ] if the
231+ execution platform may differ from the host platform, as when building with
232+ remote execution. Valid values come from the file name suffixes of
233+ [ protocolbuffers/protobuf releases] [ ] . It's also safe to explicitly include the
234+ host platform.
234235
235236[ platforms ] : https://bazel.build/extending/platforms
236237[ protocolbuffers/protobuf releases ] : https://github.com/protocolbuffers/protobuf/releases
237238
238- For example, imagine the execution or target platform is Linux running on an x86
239- processor, but the host platform is macOS running on Apple Silicon .
239+ For example, imagine the host platform is macOS running on Apple Silicon, but
240+ the remote execution platform is Linux running on an x86 processor .
240241` rules_scala ` configures the ` "osx-aarch_64" ` platform automatically. Then in
241242` MODULE.bazel ` you would include:
242243
243244``` py
244245# MODULE.bazel
245246
247+ scala_deps = use_extension(
248+ " @rules_scala//scala/extensions:deps.bzl" ,
249+ " scala_deps" ,
250+ )
251+
246252scala_deps.toolchains(
247- # Other settings...
248253 protoc_platforms = [" linux-x86_64" ],
249254)
250255```
@@ -254,8 +259,12 @@ In `WORKSPACE` you would include:
254259``` py
255260# WORKSPACE
256261
262+ load(
263+ " @rules_scala//scala:toolchains.bzl" ,
264+ " scala_toolchains" ,
265+ )
266+
257267scala_toolchains(
258- # Other settings...
259268 protoc_platforms = [" linux-x86_64" ],
260269)
261270```
0 commit comments