Skip to content

Commit 79437b8

Browse files
Kotlin: fix Bazel formatting and mark kotlin1 integration tests
The six Kotlin integration tests that pass `-language-version 1.9` are marked `@pytest.mark.kotlin1` so CI can run them first on a pinned pre-2.4 kotlinc (which still accepts language version 1.9) and the rest on the default 2.4 compiler. Also add a missing blank line in kotlin-extractor/BUILD.bazel to satisfy the Bazel format check. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent dd9c70e commit 79437b8

7 files changed

Lines changed: 20 additions & 0 deletions

File tree

  • java

java/kotlin-extractor/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ _extractor_name_prefix = "%s-%s" % (
5454
)
5555

5656
_compiler_plugin_registrar_service_source = "src/main/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar"
57+
5758
_compiler_plugin_registrar_service_target = "META-INF/services/org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar"
5859

5960
py_binary(

java/ql/integration-tests/kotlin/all-platforms/enhanced-nullability/test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import pathlib
22

3+
import pytest
34

5+
6+
@pytest.mark.kotlin1
47
def test(codeql, java_full):
58
java_srcs = " ".join([str(s) for s in pathlib.Path().glob("*.java")])
69
codeql.database.create(
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import commands
22

3+
import pytest
34

5+
6+
@pytest.mark.kotlin1
47
def test(codeql, java_full):
58
commands.run("kotlinc -language-version 1.9 test.kt -d lib")
69
codeql.database.create(command="kotlinc -language-version 1.9 user.kt -cp lib")
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
import pytest
2+
3+
4+
@pytest.mark.kotlin1
15
def test(codeql, java_full):
26
codeql.database.create(command="kotlinc -J-Xmx2G -language-version 1.9 SomeClass.kt")
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import commands
22

3+
import pytest
34

5+
6+
@pytest.mark.kotlin1
47
def test(codeql, java_full):
58
commands.run("kotlinc -language-version 1.9 A.kt")
69
codeql.database.create(command="kotlinc -cp . -language-version 1.9 B.kt C.kt")
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import commands
22

3+
import pytest
34

5+
6+
@pytest.mark.kotlin1
47
def test(codeql, java_full):
58
commands.run(["javac", "Test.java", "-d", "bin"])
69
codeql.database.create(command="kotlinc -language-version 1.9 user.kt -cp bin")

java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import commands
22

3+
import pytest
34

5+
6+
@pytest.mark.kotlin1
47
def test(codeql, java_full):
58
# Compile the JavaDefns2 copy outside tracing, to make sure the Kotlin view of it matches the Java view seen by the traced javac compilation of JavaDefns.java below.
69
commands.run(["javac", "JavaDefns2.java"])

0 commit comments

Comments
 (0)