mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
Bazel/Kotlin: patch jdep emission
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
module(
|
||||
name = "rules_kotlin",
|
||||
version = "1.9.4-patched",
|
||||
version = "1.9.4-codeql.1",
|
||||
repo_name = "rules_kotlin",
|
||||
)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
We need to build different extractor variants with different -language-version options, which is not allowed
|
||||
in current kotlin_rules
|
||||
diff --git a/src/main/starlark/core/options/opts.kotlinc.bzl b/src/main/starlark/core/options/opts.kotlinc.bzl
|
||||
index 9b15fb8..c0ac2cd 100644
|
||||
--- a/src/main/starlark/core/options/opts.kotlinc.bzl
|
||||
@@ -0,0 +1,14 @@
|
||||
Emitting jdeps is broken for the 2.0.0 kotlin extractor, and we don't need those files.
|
||||
Patching it here rather than passing `--@rules_kotlin//kotlin/settings:jvm_emit_jdeps=false`
|
||||
allows us to not have to specify that option (and therefore pull in `rules_kotlin`) in `semmle-code`.
|
||||
--- a/kotlin/settings/BUILD.bazel 2000-01-01 01:00:00.000000000 +0100
|
||||
+++ b/kotlin/settings/BUILD.bazel 2024-04-10 14:51:16.060085986 +0200
|
||||
@@ -16,7 +16,7 @@
|
||||
# Flag that controls the emission of jdeps files during kotlin jvm compilation.
|
||||
bool_flag(
|
||||
name = "jvm_emit_jdeps",
|
||||
- build_setting_default = True, # Upstream default behavior
|
||||
+ build_setting_default = False,
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
"url": "https://github.com/bazelbuild/rules_kotlin/releases/download/v1.9.4/rules_kotlin-v1.9.4.tar.gz",
|
||||
"patches": {
|
||||
"module_dot_bazel_version.patch": "sha256-0GnFHOv9wuuv3jFcHBSXrdo7JMFP7y66O5C4rccy5wg=",
|
||||
"codeql_add_language_version_option.patch": "sha256-uF6LFpkqe9ye7+avviY1NE5ZhxJ3WMLenS+mbg4XFTM="
|
||||
"codeql_do_not_emit_jdeps.patch": "sha256-x/HsujFlR1FGrgmbAbRZag9V4vKZZinBcs73tgRS478=",
|
||||
"codeql_add_language_version_option.patch": "sha256-qFpP/hIvqGzjJi0h8LAQK0UuWqwlj/oCecZYGqlMVP8="
|
||||
},
|
||||
"patch_strip": 1
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"versions": [
|
||||
"1.9.4-patched"
|
||||
"1.9.4-codeql.1"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user