Commit Graph

88334 Commits

Author SHA1 Message Date
Nikolay Krasko 1efd583e14 Fix running nested classes with JUnit 5 causes outer class tests execution
Note: there might be a performance issue with running tests,
the reason why custom filtering was added to the tests running.
It's not tested and should be addressed separately

Try run IrBlackBoxCodegenTestGenerated.Annotations. Everything in the
outer class IrBlackBoxCodegenTestGenerated is run instead.
This is not an IDEA problem, since it reproduces from
the command line too.

^KTI-712 Fixed
2021-12-14 23:07:19 +03:00
Jinseong Jeon 20408dc176 LC: use callable name as suffix of receiver parameter name 2021-12-14 21:01:50 +03:00
Leonid Startsev 9b9522d714 Allow defining custom KSerializer for non-generic class as a class
Previously only objects were allowed. Due to a bug, this accidentally
worked in old backend.

#KT-46444 Fixed
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1587
2021-12-14 17:53:09 +00:00
Jinseong Jeon 9a669092e3 FIR LC: backward compatible visibility of enum entry ctor 2021-12-14 18:26:26 +03:00
Dmitry Petrov 9375f41936 JVM_IR KT-50073 inline callable reference adapter into 'invoke' 2021-12-14 14:35:12 +00:00
Dmitry Petrov 42dd8aa12d JVM_IR KT-50193 remove temporary variable in argument null check 2021-12-14 17:10:23 +03:00
Dmitry Petrov 34c70ea04e JVM_IR KT-50193 result of !! is non-null 2021-12-14 17:10:20 +03:00
Anastasia.Shadrina 343a860553 [FE] Make OverloadChecker take CR into account 2021-12-14 15:19:42 +03:00
konstantin.tskhovrebov 2bb155edc1 KT-50159 Check that all inner frameworks in XCFramework have same names
And warn if XCFramework has different name with inner frameworks.

#KT-50159 Fixed
2021-12-14 14:47:42 +03:00
Yahor Berdnikau 1c8a1e656e Add function to make a snapshot of current test project
This will allow checking current state of test project and try
to work with it directly.

^KT-45745 In Progress
2021-12-14 12:45:51 +01:00
Victor Petukhov 6fed67b36c Revert "Revert "Fix setCompileTimeInitializer usage in MemberDeserializer.kt""
This reverts commit 965bab2d2d.
2021-12-14 14:21:48 +03:00
Victor Petukhov 24900630cb Revert "Revert "[FE 1.0] Provide an API to clean compile time initializer cache for variable descriptor""
This reverts commit faeb5d21ab.
2021-12-14 14:21:46 +03:00
Dmitriy Dolovov 60dcafcf43 [Test] TestGen: Use canonical class names for generated imports
This is needed to have correct class names for inner/nested classes. For example, to have `import java.util.AbstractMap.SimpleEntry` instead of `import java.util.AbstractMap$SimpleEntry`.
2021-12-14 13:48:23 +03:00
Ilya Chernikov c1c94778ce Detect and report inner classes capturing script instance 2021-12-14 13:39:22 +03:00
Ilya Chernikov e865652602 [minor] ScriptLowering cleanup 2021-12-14 13:39:22 +03:00
Ilya Chernikov 1450f4d890 Implement property for explicit jvmTarget for script definition...
Apply the property to the default JSR-223 script taking the value from
java.specification.version property, so effectively implementing
jvmTarget detection from current VM.
Also drop enforcing of target 1.8, using common default.
#KT-49329 fixed
#KT-40497 fixed
2021-12-14 13:39:21 +03:00
Ilya Chernikov f0316cde54 [minor] test infrastructure: fix default handling in proc launcher 2021-12-14 13:39:21 +03:00
Ilya Chernikov ec2d6ea5f1 Restore script testing on both backends, fix some tests 2021-12-14 13:39:19 +03:00
Ilya Chernikov 670575696f Remove forced old backend for script compilation, using common default 2021-12-14 13:39:19 +03:00
Ilya Chernikov 6d6de9dd76 Implement tests for script instance capturing in the host tests 2021-12-14 13:39:18 +03:00
Ilya Chernikov 10c5071eda Implement backend error reporting on unsupported script capturing
#KT-30616 fixed
#KT-43995 fixed
#KT-19424 fixed
#KT-49443 fixed
2021-12-14 13:39:17 +03:00
Ilya Chernikov cb5e451e05 Implement script instance capturing in script lowering
for regular classes only. Reimplementing the main behavior of the
old BE and implementing few cases on top of it.
#KT-19423 fixed
2021-12-14 13:39:17 +03:00
Ilya Chernikov 87952d63a3 Rollback script related LDL changes...
to reimplement them properly in the script lowering
2021-12-14 13:39:16 +03:00
Hung Nguyen 586fa8af64 KT-45777: Shrink classpath snapshot incrementally
Currently, we shrink classpath snapshots at 2 steps:
  - Classpath diffing: Shrink the current classpath snapshot against
    the previous lookup symbols
  - Classpath snapshot saving: Shrink the current classpath snapshot
    against the current lookup symbols

With this commit, the shrinking at the second step is now incremental.
The shrinking at the first step is still non-incremental.
2021-12-14 13:10:08 +03:00
Steven Schäfer 4f3debdec6 [KAPT] Correct error types in annotations (KT-32596) 2021-12-14 11:31:25 +03:00
Yahor Berdnikau 701446ad25 Pin 'debug.keystore' in two additional android plugins
Also pin it for 'com.android.feature' and 'com.android.test' plugins.

^KT-45745 In Progress
2021-12-13 22:36:27 +03:00
Roman Artemev 312cbb6613 [JS IR IC] Add tests to check cache invalidation via fast path 2021-12-13 20:57:53 +03:00
Roman Artemev b719865c25 [JS IR IC] Implement fast path invalidation check
Compute library md5 hash and check it first with cached one. If hashes
are equal it means that cache is up-to-date and no additional checks are
needed

 - store library hashes (flat + trans) into cache info file
 - change invalidator return value
2021-12-13 20:57:52 +03:00
Roman Artemev 5ba6ca4c16 [TEST] Support module step directives in TestModel parser 2021-12-13 20:57:51 +03:00
Dmitry Petrov e47871f98b JVM_IR KT-50215 KT-50076 extra test 2021-12-13 20:34:57 +03:00
Ilya Goncharov 6adcbe081e [JS IR] Consider erasing type parameters in return type in js signatures 2021-12-13 16:16:59 +00:00
Ilya Goncharov 4f1a10d72e [JS] Uncomment test on afterTest 2021-12-13 15:29:27 +00:00
Dmitriy Dolovov e0daa96cae [Build] Avoid resetting of DefaultTestFilter.commandLineIncludePatterns 2021-12-13 18:14:43 +03:00
Ivan Kylchik b131c52889 Drop all usages of WITH_RUNTIME directive 2021-12-13 18:07:11 +03:00
Evgeniy.Zhelenskiy 1874318954 [Tests] Windows regeneration does not change tests 2021-12-13 17:54:15 +03:00
Dmitry Petrov df460a842b JVM_IR KT-50076 avoid CHECKCAST on moved dispatch receiver parameter 2021-12-13 14:13:34 +00:00
Dmitry Petrov 6f148c594f Revert "JVM_IR KT-50076 avoid CHECKCAST on moved dispatch receiver parameter"
This reverts commit 627d838343.
2021-12-13 14:13:33 +00:00
Mikhail Glukhikh df50a8141f FirCallCompleter: unwrap definitely not-null type properly
#KT-50180 Fixed
2021-12-13 16:24:59 +03:00
Mikhail Glukhikh febf336d23 IrConstTransformer: transform constants also inside call children 2021-12-13 16:24:59 +03:00
Mikhail Glukhikh 66231baa06 FIR2IR: pass annotationMode through arrayOf calls properly
#KT-50163 Fixed
2021-12-13 16:24:59 +03:00
Mikhail Glukhikh 09585d116e FirTypeIntersectionScope: fast success in isMoreSpecific 2021-12-13 16:24:58 +03:00
Ilya Goncharov 0aec48876f Commit package-lock.json in kotlin-test-it 2021-12-13 12:36:57 +00:00
Ilya Goncharov 89dfc4b589 Commit yarn.lock 2021-12-13 12:36:56 +00:00
Piotr Krzeminski ad85813136 Allow running Chrome headless with '--no-sandbox' flag
Without this, one has to define a file like `karma.config.d/karma.conf.js`
with contents:

```js
config.set({
    browsers: ['ChromeHeadlessNoSandbox'],

    customLaunchers: {
        ChromeHeadlessNoSandbox: {
            base: 'ChromeHeadless',
            // Needed to work on Jenkins. Otherwise, there's an error:
            // 'Running as root without --no-sandbox is not supported. See https://crbug.com/638180.'
            flags: ['--no-sandbox'],
        }
    }
});
```

This change allows staying 100% in Gradle config for such configuration.
With growing usage of Kubernetes, this flag becomes more and more
popular.

Ideally the Karma config API in Gradle could be more flexible, so that
e.g. someone that uses Chromium could also use `--no-sandbox` flag.
However, it's some bigger change that influnces the API, so I want this
change to be simple.

Related Slack thread: https://kotlinlang.slack.com/archives/C0B8L3U69/p1639133380172400
2021-12-13 11:45:51 +03:00
Sergej Jaskiewicz 41acdefce9 [JS IR] Treat char as inline class no matter how it's declared 2021-12-13 07:36:57 +00:00
Sergej Jaskiewicz 4f13717fea [IR] Use InlineClassesUtils in lowerings instead of IrClass.isInline
We do it because sometimes we want to treat a regular class as
an inline class. For example, in the Wasm backend we treat classes
with the `@WasmAutoboxed` annotation as inline classes. Also, in
the JS IR backend the `Char` class is declared as a regular class for
compatibility reasons, but we want it to be an inline class for
performance.
2021-12-13 07:36:56 +00:00
Sergej Jaskiewicz e5993ab594 [JS IR] [Wasm] Extract InlineClassesUtils into CommonBackendContext 2021-12-13 07:36:56 +00:00
Sergej Jaskiewicz 962ca40687 [JS IR] Pass JsIrBackendContext as non-nullable in some functions 2021-12-13 07:36:55 +00:00
Pavel Kunyavskiy 3a8b4059c9 [K/N] Disable cms for targets not supporting threads 2021-12-13 05:32:11 +00:00
Pavel Kunyavskiy 42aaa86f10 [K/N] Mark finalizing extra objects to avoid double finalizing
When new mark phase finished before previous finalization is done,
extra objects are still in list, which would be passed to finalize.
This could lead to unpredictable effects.

After this commit such objects are marked by new flag and ignored by
next gc runs.
2021-12-13 05:32:11 +00:00