Skip to content

Commit a8485f0

Browse files
andyscottittaiz
authored andcommitted
Inline private variable (#518)
* Inline private variable * Remove public facing use of deprecated FileType
1 parent 703c3cb commit a8485f0

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

scala/private/rule_impls.bzl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ load(
2525
"write_manifest",
2626
)
2727

28-
_jar_filetype = FileType([".jar"])
2928
_java_filetype = FileType([".java"])
3029
_scala_filetype = FileType([".scala"])
3130
_srcjar_filetype = FileType([".srcjar"])

scala/scala.bzl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ load(
1212
"@io_bazel_rules_scala//specs2:specs2_junit.bzl",
1313
_specs2_junit_dependencies = "specs2_junit_dependencies")
1414

15-
_jar_filetype = FileType([".jar"])
16-
1715
_launcher_template = {
1816
"_java_stub_template": attr.label(
1917
default = Label("@java_stub_template//file")),
@@ -101,10 +99,9 @@ _junit_resolve_deps = {
10199

102100
# Common attributes reused across multiple rules.
103101
_common_attrs_for_plugin_bootstrapping = {
104-
"srcs": attr.label_list(
105-
allow_files = FileType([".scala", ".srcjar", ".java"])),
102+
"srcs": attr.label_list(allow_files = [".scala", ".srcjar", ".java"]),
106103
"deps": attr.label_list(),
107-
"plugins": attr.label_list(allow_files = FileType([".jar"])),
104+
"plugins": attr.label_list(allow_files = [".jar"]),
108105
"runtime_deps": attr.label_list(),
109106
"data": attr.label_list(allow_files = True, cfg = "data"),
110107
"resources": attr.label_list(allow_files = True),
@@ -128,7 +125,7 @@ _common_attrs.update({
128125
default = Label(
129126
"@io_bazel_rules_scala//third_party/plugin/src/main:dependency_analyzer"
130127
),
131-
allow_files = _jar_filetype,
128+
allow_files = [".jar"],
132129
mandatory = False),
133130
})
134131

0 commit comments

Comments
 (0)