Commit Graph

128 Commits

Author SHA1 Message Date
Svyatoslav Kuzmich b503eafcb2 [Wasm] Allow implementing function interfaces in the new test infra
Make it consistent with CLI and old test infra
2023-06-25 10:18:50 +02:00
Svyatoslav Kuzmich 736519c506 [JS] Rename JsLibraryProvider to LibraryProvider
This class is not JS-specific and can be used in Wasm test services
2023-06-25 10:18:50 +02:00
Kirill Rakhman 919d6401f7 [Tests] Convert line endings of test files to LF
This fixes a problem on Windows where CRs would end up in the code
leading to parsing problems.
2023-06-23 09:03:28 +00:00
Nikolay Lunyak 46ea908daf [Tests] Ensure the temporary directories are cleared
This change may prevent OOMs. Context:
https://jetbrains.slack.com/archives/C4U955N6B/p1685000899030279
2023-06-20 13:28:23 +00:00
Nikolay Lunyak 70605c84df [FIR Native] KT-58549: Get rid of the builtin provider
According to
`FirNativeCodegenBoxTestGenerated.testNestedClassesInAnnotations`,
the annotation
`kotlin.internal.PlatformDependent` is
unresolved reference.

^KT-58549 Fixed
2023-06-01 10:27:54 +00:00
Ilya Goncharov bcefa1cd66 [Gradle, Wasm] Add wasm platform kind
KTIJ-25583
2023-05-17 13:28:20 +00:00
Mads Ager 6117f76a8c Discourage the use of LANGUAGE_VERSION directive.
Pinning the language version is rarely the right thing to do.
This changes makes it harder to do so by requiring an additional
directive with a name that indicates to developers that they are
likely doing something dangerous.
2023-05-15 14:29:48 +00:00
Mads Ager fb476612af Add LANGUAGE_VERSION test directive. 2023-05-12 10:49:42 +00:00
Pavel Mikhailovskii 7ac5233a32 KT-54804 [SLC] Generate synthetic functions for annotations on properties in light classes 2023-05-12 09:39:37 +00:00
Kirill Rakhman 3c66ae0f8b [FIR, LT] Report syntax error by traversing LT after parsing
#KT-57756 Fixed
2023-05-05 09:34:24 +00:00
Kirill Rakhman 6119606cb6 [FIR LT] Make syntax error reporting in tests consistent with cli 2023-05-05 09:34:23 +00:00
Roman Golyshev d4cffb8a5a [213] Switch to 213 platform
KTI-1114
2023-04-21 13:19:04 +00:00
Dmitriy Novozhilov 6287968511 [FIR Test] Migrate AbstractFirLoadCompiledKotlin to new test infrastructure
Also introduce two different modes for those tests:
- load metadata compiled with K1
- load metadata compiled with K2
2023-04-19 14:33:25 +00:00
Ivan Kylchik 86b3ec73d1 Add new set of tests to run JVM checks with IR inliner 2023-03-14 20:47:42 +00:00
Mikhail Glukhikh fbea09b3b6 K2 tests: always use language version 2.0 or higher 2023-03-11 10:15:24 +00:00
Ilya Kirillov dec9bdefb6 [FIR] continue executing the test pipeline in a case of FirLazyResolveContractViolationException is thrown
Previously in the black-box test, no actual tests were run in a case FirLazyResolveContractViolationException were thrown
2023-02-24 16:10:58 +01:00
Dmitrii Gridin 3b9318bd3a [SLC] LazyAnnotationsBox: drop redundant synchronization
We can use less strict rule for produced annotations:
* Previously: the same annotations from `findAnnotation` and `annotations`
have the same identity
* Now: the same annotations from `findAnnotation` and `annotations`
are equals by 'equals'

^KT-56046
2023-02-03 19:49:03 +00:00
Svyatoslav Kuzmich bebb9b1392 [Wasm] Move compiler tests to :wasm:wasm.tests module
They don't belong in K/JS test module.
2023-01-31 13:12:12 +00:00
Ilya Kirillov a55b4a977b [FIR] refactoring: extract registration of lazy declaration resolve contract checking to a separate function in tests 2023-01-13 15:57:05 +00:00
Sergej Jaskiewicz 672be7ecb5 [test] Allow files with same names in tests
Introduce a directive that allows compiling different files with
matching names in tests.
2022-12-01 17:15:55 +00:00
Jaebaek Seo 1a5a6474d6 Support TargetPlatform.isJs() for FIR 2022-11-15 16:50:17 +01:00
Ilya Chernikov fa0cda6236 FIR JS: enable full JS box tests with FIR 2022-11-12 14:34:07 +01:00
Dmitriy Novozhilov 097a86deb5 [Test] Check that FIR tree does not contain stub types and type variable types after resolution 2022-11-03 08:30:08 +00:00
Mikhail Glukhikh 036f9affd8 K2: link via signatures if -Xlink-via-signatures is set
Related to KT-53505
2022-09-14 10:15:22 +00:00
Pavel Mikhailovskii 6a14400342 KT-53804 Restore old and incorrect logic of generating InnerClasses attributes for kotlin-stdlib 2022-09-05 14:02:52 +00:00
Alexander Udalov 690322b203 Add flag -Xno-new-java-annotation-targets
Do not generate TYPE_USE/TYPE_PARAMETER Java annotation targets when
this flag is specified.

 #KT-53712 Fixed
2022-08-29 13:43:49 +02: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
Ilya Kirillov 56e6d5d6b9 [Analysis API] do not preresolve all FirDeclarations to TYPES in tests
Previously, we resolved all declaration to the TYPES phase to collect their sealed inheritors
and thus not really checking lazy resolution to TYPES.
Now sealed class inheritors collection happens in separate LLFirResolveSession
2022-08-10 22:49:13 +02:00
Victor Petukhov 8500ee08a8 [FE 1.0] Remove CONSTRAINT_SYSTEM_FOR_OVERLOAD_RESOLUTION analysis flag
The constraint system for the old type inference is going to be removed.
Also, `CONSTRAINT_SYSTEM_FOR_OVERLOAD_RESOLUTION` isn't used in the production
2022-08-02 10:29:38 +00:00
Dmitriy Novozhilov 9c41e75802 [KAPT] Migrate kapt tests to new test infrastructure 2022-07-20 10:12:24 +00:00
Dmitriy Novozhilov b7cc781e97 [Test] Create KtFiles with proper virtual files
This is needed to properly report diagnostics in KAPT3 tests, which
  uses psiElement.containingFile as origin
2022-07-20 10:12:23 +00:00
Dmitriy Novozhilov 1a8496757e [Compiler] Mark all entrypoints to compiler API as experimental 2022-06-29 12:00:01 +00:00
Dmitriy Novozhilov 8b42638afa [Plugins] Introduce new API for registering compiler plugins
Original `ComponentRegistrar` exposes Project to its registration method,
  so plugins should manually register extensions to it. To prepare for
  possible unbound compiler from Project API in future new  `K2ComponentRegistrar`
  introduced which provides registration method without Project at all
2022-06-29 11:59:58 +00:00
Dmitriy Novozhilov bc8051ce9b [Test] Allow to create source files different from .kt and .java in SourceFileProvider 2022-06-07 14:12:20 +00:00
Ilya Kirillov 2649788b87 [analysis api fir] put every library into a separate KtModule in tests 2022-04-13 12:53:22 +02:00
Dmitriy Novozhilov afad6a564a [Test] Pass CompilerConfiguration to AbstractEnvironmentConfigurator.registerCompilerExtensions
This is needed to provide ability to configure extensions depending on
  configuration of specific test
2022-04-08 09:42:00 +00:00
Dmitriy Novozhilov 400ad6a01e [Test] Add ability to configure access to application disposable in test configuration
This is needed to unbound CompilerConfigurationProvider from ApplicationEnvironmentDisposer,
  which depends on classes from JUnit 5. This will allow to safely use
  compiler test framework with base test framework different from JUnit 5
2022-04-08 09:41:59 +00:00
Ilya Chernikov 03cbfea737 FIR LT: Introduce source file abstraction, carry it from parsing to IR
along with source lines mapping, allows to "emulate" usage of the
PSI files which allows to extract source file and line mapping info
on every stage from source element.
It makes sense to use this mapping for the error reporting too.
2022-03-30 08:34:30 +00:00
Ilya Chernikov cf22400701 Introduce LT file abstraction in tests parallel to KtFile
allows to create a valid LT-based file with synthetic path important
for dumps comparisons in tests
2022-03-30 08:30:09 +00:00
Roman Golyshev ffcbc583d0 FIR: Split EnvironmentConfigurator to an interface and abstract class
It is needed to make it easier to write wrappers for configurators
2022-02-25 23:08:26 +03:00
Alexander Udalov b443848ea0 Fix type table serialization in DescriptorSerializer
Always serialize type table (and version requirement table) after
everything else, to prevent bugs like KT-51446 where inline class
underlying type was added to the type table after it has already been
serialized.

 #KT-51446 Fixed
2022-02-24 16:34:25 +01:00
Jinseong Jeon a986aff429 AA: refactor service registrations
such that AA standalone mode doesn't need to unregister services that
were already registered by pre-analysis handlers
2022-02-09 23:11:44 +01:00
Mikhail Glukhikh ad0d0ca47f Drop redundant Suppress("RemoveExplicitTypeArguments") 2022-01-26 12:19:55 +00:00
Dmitriy Novozhilov 09a7a1c09f [FIR] Add ability to specify members in FirScopeDumpHandler 2022-01-19 15:24:43 +03:00
Irene Dea 3c4989b672 Address JDK8/JDK6 issues with computeIfAbsent 2022-01-08 15:26:44 +03:00
Irene Dea 62bde2d686 Move AttributeArray to compiler.common so frontend extension can share it 2022-01-08 15:25:06 +03:00
Ilya Kirillov 40fdb26569 Analysis LC: introduce Symbol LC tests 2021-12-27 16:23:18 +03:00
Mikhael Bogdanov 3593e45b97 Rename 'RELEASE' fields into 'JDK_RELEASE' 2021-12-23 07:26:00 +00:00
Mikhael Bogdanov 409d36c911 Basic -Xrelease option support
#KT-29974 Fixed
2021-12-23 07:25:57 +00:00
Sergej Jaskiewicz 3fb1096c18 [JS IR] Support IR dump in JS tests 2021-12-22 17:55:33 +00:00