Skip to content

Commit 2c95f00

Browse files
authored
Merge pull request #19414 from github/revert-19385-redsun82/update-rules-kotlin
Revert "Bazel: update `rules_kotlin` to 2.1.3"
2 parents 64145ab + 280ce05 commit 2c95f00

File tree

7 files changed

+20
-18
lines changed

7 files changed

+20
-18
lines changed

MODULE.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ bazel_dep(name = "bazel_skylib", version = "1.7.1")
2424
bazel_dep(name = "abseil-cpp", version = "20240116.1", repo_name = "absl")
2525
bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "json")
2626
bazel_dep(name = "fmt", version = "10.0.0")
27-
bazel_dep(name = "rules_kotlin", version = "2.1.3-codeql.1")
27+
bazel_dep(name = "rules_kotlin", version = "2.0.0-codeql.1")
2828
bazel_dep(name = "gazelle", version = "0.40.0")
2929
bazel_dep(name = "rules_dotnet", version = "0.17.4")
3030
bazel_dep(name = "googletest", version = "1.14.0.bcr.1")

misc/bazel/registry/modules/rules_kotlin/2.1.3-codeql.1/MODULE.bazel renamed to misc/bazel/registry/modules/rules_kotlin/2.0.0-codeql.1/MODULE.bazel

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
module(
22
name = "rules_kotlin",
3-
version = "2.1.3-codeql.1",
3+
version = "2.0.0-codeql.1",
44
compatibility_level = 1,
55
repo_name = "rules_kotlin",
66
)
77

8-
bazel_dep(name = "platforms", version = "0.0.11")
8+
bazel_dep(name = "platforms", version = "0.0.10")
99
bazel_dep(name = "bazel_skylib", version = "1.7.1")
1010
bazel_dep(name = "rules_java", version = "7.2.0")
1111
bazel_dep(name = "rules_python", version = "0.23.1")
+7-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
We need to build different extractor variants with different -language-version options, which is not allowed
2+
in current kotlin_rules
13
diff --git a/src/main/starlark/core/options/opts.kotlinc.bzl b/src/main/starlark/core/options/opts.kotlinc.bzl
2-
index 76df826..ef2d6ca 100644
4+
index 5e1461b..b93e6aa 100644
35
--- a/src/main/starlark/core/options/opts.kotlinc.bzl
46
+++ b/src/main/starlark/core/options/opts.kotlinc.bzl
57
@@ -33,6 +33,11 @@ def _map_jdk_release_to_flag(version):
68
return None
79
return ["-Xjdk-release=%s" % version]
8-
10+
911
+def _map_language_version_to_flag(version):
1012
+ if not version:
1113
+ return None
@@ -14,7 +16,7 @@ index 76df826..ef2d6ca 100644
1416
_KOPTS_ALL = {
1517
"warn": struct(
1618
args = dict(
17-
@@ -429,6 +434,15 @@ _KOPTS_ALL = {
19+
@@ -417,6 +422,15 @@ _KOPTS_ALL = {
1820
value_to_flag = None,
1921
map_value_to_flag = _map_jdk_release_to_flag,
2022
),
@@ -28,5 +30,5 @@ index 76df826..ef2d6ca 100644
2830
+ map_value_to_flag = _map_language_version_to_flag,
2931
+ ),
3032
}
31-
32-
def _merge(key, rule_defined):
33+
34+
# Filters out options that are not available in current compiler release
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"integrity": "sha256-2JcjzJ67t72y66yhr30jg+B0YVZDz5ejZrdYp2t9xEM=",
3+
"url": "https://github.com/bazelbuild/rules_kotlin/releases/download/v2.0.0/rules_kotlin-v2.0.0.tar.gz",
4+
"patches": {
5+
"codeql_do_not_emit_jdeps.patch": "sha256-1ir4Aio1SICxnj1wafQ0GefT/m7bwn2n+SQwq19V3A8=",
6+
"codeql_add_language_version_option.patch": "sha256-t8Fm0bYZ4Q4vTqcoXZjyK4WPEoAafjE4whJLNnrnRbg="
7+
},
8+
"patch_strip": 1
9+
}

misc/bazel/registry/modules/rules_kotlin/2.1.3-codeql.1/source.json

-9
This file was deleted.

misc/bazel/registry/modules/rules_kotlin/metadata.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"github:bazelbuild/rules_kotlin"
2222
],
2323
"versions": [
24-
"2.1.3-codeql.1"
24+
"2.0.0-codeql.1"
2525
],
2626
"yanked_versions": {}
2727
}

0 commit comments

Comments
 (0)