File tree 2 files changed +12
-9
lines changed
2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 1
- load ("//scala/scalafmt/toolchain:toolchain.bzl" , "scalafmt_toolchain" )
1
+ load (
2
+ "//scala/scalafmt/toolchain:toolchain.bzl" ,
3
+ "SCALAFMT_TOOLCHAIN_TYPE" ,
4
+ "scalafmt_toolchain" ,
5
+ )
2
6
load ("//scala/scalafmt:scalafmt_repositories.bzl" , "scalafmt_artifact_ids" )
3
7
load ("//scala:providers.bzl" , "declare_deps_provider" )
4
8
load ("//scala:scala_cross_version.bzl" , "version_suffix" )
@@ -28,9 +32,7 @@ def setup_scalafmt_toolchain(
28
32
version_suffix (scala_version ),
29
33
],
30
34
toolchain = ":%s_impl" % name ,
31
- toolchain_type = Label (
32
- "//scala/scalafmt/toolchain:scalafmt_toolchain_type" ,
33
- ),
35
+ toolchain_type = SCALAFMT_TOOLCHAIN_TYPE ,
34
36
visibility = visibility ,
35
37
)
36
38
Original file line number Diff line number Diff line change 1
1
load ("@io_bazel_rules_scala//scala:providers.bzl" , _DepsInfo = "DepsInfo" )
2
2
load ("//scala/private/toolchain_deps:toolchain_deps.bzl" , "expose_toolchain_deps" )
3
3
4
+ SCALAFMT_TOOLCHAIN_TYPE = Label (
5
+ "//scala/scalafmt/toolchain:scalafmt_toolchain_type" ,
6
+ )
7
+
4
8
def _scalafmt_toolchain_impl (ctx ):
5
9
toolchain = platform_common .ToolchainInfo (
6
10
dep_providers = ctx .attr .dep_providers ,
@@ -20,10 +24,7 @@ scalafmt_toolchain = rule(
20
24
)
21
25
22
26
def _export_scalafmt_deps_impl (ctx ):
23
- return expose_toolchain_deps (
24
- ctx ,
25
- "@io_bazel_rules_scala//scala/scalafmt/toolchain:scalafmt_toolchain_type" ,
26
- )
27
+ return expose_toolchain_deps (ctx , SCALAFMT_TOOLCHAIN_TYPE )
27
28
28
29
export_scalafmt_deps = rule (
29
30
_export_scalafmt_deps_impl ,
@@ -32,6 +33,6 @@ export_scalafmt_deps = rule(
32
33
mandatory = True ,
33
34
),
34
35
},
35
- toolchains = ["@io_bazel_rules_scala//scala/scalafmt/toolchain:scalafmt_toolchain_type" ],
36
+ toolchains = [SCALAFMT_TOOLCHAIN_TYPE ],
36
37
incompatible_use_toolchain_transition = True ,
37
38
)
You can’t perform that action at this time.
0 commit comments