Commit Graph

228 Commits

Author SHA1 Message Date
Dmitriy Novozhilov acf2296590 [Test] Regenerate tests after two previous commits 2024-02-16 12:48:24 +00:00
Stanislav Ruban 8c2293ddcd Use JDK 21 in AdditionalBuiltInsMembersSignatureListsTest
^KT-58765
2024-01-09 18:45:59 +00:00
Dmitrii Gridin b6d373d8e5 Update copyright to 2024 2024-01-05 13:43:17 +00:00
Marco Pennekamp 24a2f72a6b [Test] ReplCompilerJava8Test: Fix lifetime of setUp environment
- For each test, `ReplCompilerJava8Test` effectively created two
  environments: one in `setUp` for pre-compilation and one in `runTest`
  managed by `GenericReplCompiler`. The `setUp` environment is unshared,
  so it wasn't the same as the one managed by `GenericReplCompiler`.
  Because the `setUp` environment was registered with
  `testRootDisposable`, its application and project were effectively
  disposed at the end of the test, together with the other environment.
- Adding a call to `resetApplicationManager` to
  `KotlinCoreEnvironment.disposeApplicationEnvironment` in a previous
  commit caused `ReplCompilerJava8Test` to fail with the following
  sequence:
  1. At the end of a test, `testRootDisposable` is disposed.
  2. The project count disposable registered in
     `getOrCreateApplicationEnvironment` is disposed first. This causes
     the shared application's project count to go to 0 and triggers its
     disposal via `disposeApplicationEnvironment`.
  3. In `disposeApplicationEnvironment`, the application manager's
     application is reset to `null`.
  4. The disposer continues with disposables which were registered for
     the `setUp` environment initially. One of these is
     `PsiManagerImpl`, which disposes `FileManagerImpl`, during whose
     disposal `ApplicationManager.getApplication()` is called. Since the
     application was reset, it is now `null` and an NPE occurs.
- The solution disposes the `setUp` environment early so that it cannot
  clash with the shared environment from `GenericReplCompiler`.

^KT-64099
2023-12-19 11:12:23 +00:00
Alexander.Likhachev 6f96be0b76 [Build] Get rid of the testApiJUnit5 method
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander Udalov c66bc36382 Build: fix some warnings in buildSrc and build.gradle.kts 2023-06-26 15:42:21 +00:00
Denis.Zharkov 67d51eb7ee Add a separate test configurations for JDK 21 dependent test
After it's released, there would be no need in them, but right now
they are unavailable through the toolchain, so we can't require it.
See KT-58765 for tracking

But there should be a dedicated Build configuration with JDK_21_0 env
properly set.

^KT-58716 Fixed
2023-05-22 09:19:52 +00:00
Alexander Udalov fb900d2e2a JVM: remove most usages of JvmTarget.JVM_1_6 2023-05-19 13:24:00 +00:00
Denis.Zharkov d7559b8972 Update JDK in AdditionalBuiltInsMembersSignatureListsTest to 17
So, we're slowly getting rid of the hack with LATE_JDK_SIGNATURES
which is necessary because there's no freshest JDK available at
build agents.

But hope, it would be removed once JDK 21 is there (see KT-58716).
2023-05-17 06:42:52 +00:00
Denis.Zharkov b0c5d26d92 Add new JDK-21 List methods to HIDDEN_METHOD_SIGNATURES
Tests are on the way waiting for Build agents with EA version
(KT-58716 for tracking)

^KT-58371 Fixed
2023-05-17 06:42:52 +00:00
Roman Golyshev d4cffb8a5a [213] Switch to 213 platform
KTI-1114
2023-04-21 13:19:04 +00:00
Alexander Udalov 3c4b5529af Update year to 2023 in COPYRIGHT_HEADER.txt
This commit is the result of changing the year to 2023 in
COPYRIGHT_HEADER.txt and running all `generate*` tasks in
`generators/build.gradle.kts`.
2023-01-02 22:52:15 +01:00
Vladimir Sukharev c8864369fd Use main class as test generator name
Merge-request: KT-MR-7031
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-09-09 12:51:18 +00:00
Nikita Bobko 8f79e833a8 Drop all redundant kotlin-reflect, kotlin-reflect-api dependencies
Review: https://jetbrains.team/p/kt/reviews/6753

All redundant I managed to find, of course.

Why: I'm going to process all reflect dependencies in the next commits.
Cleanup reflect dependency before processing.

They are redundant because:
1. if `compileOnly` then compilation didn't break after dropping the
   dependency
2. if `test*` then tests didn't break after dropping the dependency.
3. `analysis/analysis-api-fir/analysis-api-fir-generator/build.gradle.kts`
   `compiler/fir/checkers/checkers-component-generator/build.gradle.kts`
   Drop `implementation(project(":kotlin-reflect-api"))` because the
   module already depends on
   `implementation(project(":kotlin-reflect"))`
4. `compiler/daemon/daemon-client/build.gradle.kts`. Drop `runtimeOnly`
   because after dropping `compileOnly` compilation didn't break (so
   `runtimeOnly` looks suspicious). Less safe than 1-3
2022-08-22 15:42:57 +02:00
Dmitry Gridin 4ceb170917 regenerate tests 2022-08-05 14:12:41 +02:00
Vyacheslav Gerasimov 944c7990a1 Build: Use fake ideaHome for tests with intellij build number only
#KTI-82
2021-12-16 21:48:24 +03:00
Vyacheslav Gerasimov f7a9065b75 Build: Use intellij maven repo instead of downloaded IDEA
#KTI-82
2021-12-16 21:48:23 +03:00
Vyacheslav Gerasimov 156ecce961 Build: Fix unconditional adding kotlin-reflect.jar for JPS build
Should be added only when JPS build enabled to avoid kotlin-reflect
reindexing after each build
2021-12-16 21:48:18 +03:00
Alexander Udalov 1b5e3f5d51 Deserialize repeated annotations inside implicit container
#KT-49651 Fixed
2021-11-18 15:33:34 +01:00
Dmitriy Novozhilov e933c7b6d9 [Build] Remove testApi(intellijDep()) dependencies from all modules
Since IDEA moved most of it's jars to java 11 it's illegal to use them
  in our dependencies, so all modules which use `intellijDep()` should
  carefully specify which jars they use
2021-09-30 14:41:31 +03:00
Vyacheslav Gerasimov ab146bd6d4 Build: Fix deprecated Gradle configurations usages
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Yahor Berdnikau 7789054547 Migrate repo to use JVM toolchains Gradle feature.
^KT-46972 Fixed
2021-07-05 14:11:12 +00:00
Alexander Likhachev cc183e96a4 [Build] Fix configuration cache undeclared system property read issues
#KT-44611 In Progress
2021-05-18 16:37:29 +03:00
Victor Petukhov 6065f0e2d0 [Jspecify] Move diagnostic tests against compiled java under the new tests infrastructure 2021-04-30 14:43:26 +03:00
Victor Petukhov 8f097b14cc [Jspecify] Move jspecify test runner under the new tests infrastructure 2021-04-30 14:43:26 +03:00
Victor Petukhov 57bd4d3a98 [Jspecify] Remove Kotlin use sites generator: consider manually picking changes from the jspecify repo 2021-04-30 14:43:25 +03:00
Alexander Udalov ed9a0e514d Regenerate tests and fir-tree 2021-01-03 14:53:41 +01:00
Dmitriy Novozhilov 660c438ebe [Test] Migrate tests of foreign annotations to new infrastructure
This commit includes:
- test runners for foreign annotation tests
- minor changes testdata related to changed directives syntax
- dropping tests with javac integration: old javac tests actually ran
    compiler without javac because of bug in configuration, so some
    nullability annotations features are not supported in javac mode.
    It's fine to drop it since javac mode is not fully supported
    by compiler
2020-12-24 14:58:05 +03:00
Victor Petukhov 48d9812d9e Review fixes around type enhancement and loading type use annotations 2020-12-18 19:32:05 +03:00
Victor Petukhov 9693ea19fb Add tests for type enhancement uncluding with compiled java 2020-12-18 19:32:05 +03:00
Victor Petukhov 71ca18e937 Support diagnostic tests with Kotlin against compiled Java 2020-12-18 19:32:05 +03:00
Victor Petukhov 69f31afecc Exclude tests for loading type use annotations and type enhancement based on them to pass using javac and psi class files reading 2020-12-18 19:32:04 +03:00
Victor Petukhov 8777d28228 Use new jetbrains annotations with type use target for "load java 8" tests 2020-12-18 19:32:04 +03:00
Victor Petukhov a89329e077 Support reading from class files of the type use annotations on type parameters and type arguments
^KT-11454 Fixed
2020-12-18 19:32:03 +03:00
Dmitriy Novozhilov 1fe5148f0d [TEST] Extract compiler-specific test utils from :tests-common to new module 2020-12-16 19:52:29 +03:00
Dmitriy Novozhilov d15c7861b2 [TEST] Invert dependency between :test-generator and :tests-common modules
This is needed to provide ability for declaring new implementations of
  test generators, based on existing infrastructure, which won't add
  dependency on :compiler:tests-common

Also this commit removes implicit dependency on :compiler:tests-common
  from :compiler:tests-common-new
2020-12-16 19:52:29 +03:00
Dmitriy Novozhilov bc7e18fb8a [TEST] Regenerate tests after previous commit 2020-12-16 19:52:28 +03:00
Dmitriy Novozhilov 23c088afd6 [TEST-GEN] Reorganize package structure in :generators:test-generator module 2020-12-16 19:52:20 +03:00
Dmitriy Novozhilov 380e8a3814 [TEST-GEN] Extract run of TestGenerator to top of test generation DSL 2020-12-16 19:52:19 +03:00
Vyacheslav Gerasimov 3feff16a77 Cleanup 193 compatibility fixes 2020-11-11 14:28:54 +03:00
Victor Petukhov c89461e654 JSpecify: add gradle task to download JSpecify test suite 2020-10-12 17:33:35 +03:00
Victor Petukhov d0cd7a4008 JSpecify: exclude test running from the common test task 2020-10-12 17:33:35 +03:00
Victor Petukhov 9dab052266 JSpecify: implement tests generator and test runner with checking compliance of kotlin diagnostics and jspecify marks 2020-10-12 17:33:35 +03:00
Victor Petukhov ce44f7d4d3 JSpecify: implement kotlin use sites to java ones converter 2020-10-12 17:24:31 +03:00
Victor Petukhov fb8bba4dfb Include kotlin reflect test runtime dependency for tests-java8 module to make jps tests running work 2020-10-12 17:24:26 +03:00
Dmitry Petrov 91b8e32d43 Add ABI tests for classes extending Number and CharSequence 2020-10-09 16:36:35 +03:00
Victor Petukhov 2685c7efce Jspecify: Rename codeanalysis annotations to jspecify ones 2020-10-08 14:00:10 +03:00
Denis Zharkov 59bd7364ab Enhance bounds for type parameters after loops disconnection
Otherwise behavior might change because enhancement may force computation
for other type parameters in cases like:
class A<X extends Y, Y extends X> {}

See the test:
org.jetbrains.kotlin.checkers.DiagnosticsTestGenerated.Tests.J_k#testRecursiveRawUpperBound3
2020-10-08 14:00:10 +03:00
Denis Zharkov dfb1cb8642 Minor. Rename UnknownNullness -> NullnessUnknown 2020-10-08 14:00:09 +03:00
Denis Zharkov f3a490ee16 Support compiler flag -Xcodeanalysis-annotations 2020-10-08 14:00:09 +03:00