Tianyu Geng
0d4e9ca0b9
FIR: allow reporting multiple FirDiagnostics from a ConeDiagnostic
2021-03-11 22:57:57 +03:00
Mikhail Glukhikh
1f15ce2d26
FIR diagnostics: extract mapUnsafeCallError
2021-03-11 22:57:57 +03:00
Mark Punzalan
bb790195a2
FIR IDE: Enable ChangeVariableMutabilityFix for MUST_BE_INITIALIZED.
2021-03-11 16:31:40 +01:00
Ilya Chernikov
09fb2cd746
[minor] disable implicits test on IR, see added comments for details
2021-03-11 15:50:33 +01:00
Ilya Chernikov
e05c8ac57b
Add script metedata flag
2021-03-11 15:50:33 +01:00
Ilya Chernikov
7c63105bb7
Mark script result expression as used to avoid coercion to unit
2021-03-11 15:50:32 +01:00
Ilya Chernikov
7d07010785
Fix handling of lambdas in top-level destructuring declarations
2021-03-11 15:50:32 +01:00
Ilya Chernikov
22f1814911
Fix CFA for destructuring declarations in scripts
...
in particular without the fix, the CFA skipped marking of the used
result values in lambdas and they were coerced to unit in IR
2021-03-11 15:50:31 +01:00
Ilya Chernikov
10567d9a37
[minor] fix scripting test dependencies
2021-03-11 15:50:31 +01:00
Ilya Chernikov
9c786a9cd9
[minor] uncomment 2 scripting tests:
...
Tests were failing before, but now fixed, most likely by switching to
default target 1.8 and some changes in scripting IR support.
#KT-44471 fixed
2021-03-11 15:50:31 +01:00
Ilya Chernikov
ef01411d20
[minor] fix script util tests
2021-03-11 15:50:30 +01:00
Ilya Chernikov
375441832e
Implement REPL support in IR scripting
2021-03-11 15:50:30 +01:00
Ilya Chernikov
c066b7843c
Fix provided properties generation in ir scripting
2021-03-11 15:50:07 +01:00
Ilya Chernikov
bc6c17d4b2
Enable IR in jvm scripting host tests
2021-03-11 15:50:06 +01:00
Ilya Chernikov
e9da385f7c
Implement property for passing argumens to isolated script compiler
2021-03-11 15:50:06 +01:00
Ilya Chernikov
43d7536a28
Protect scripts compilation from passing -Xuse-ir via configuration
...
as well as other options that require changes in the compilation setup
before compiler options from the configuration could be processed
2021-03-11 15:50:06 +01:00
Ilya Chernikov
bac6a7346e
Extend GeneratorExtensions with previous script, implemt it for JS REPL
...
also refactor JS REPL for better compatibility with the generic
REPL/scripting infrastructure
2021-03-11 15:50:01 +01:00
Ilya Chernikov
83da5f61fd
[minor] Implement in-process test for main.kts cache
...
mainly to ease debugging
2021-03-11 15:49:46 +01:00
Ilya Chernikov
4dc228a0a3
Implement proper call to the base class ctor in ir script lowering
2021-03-11 15:49:46 +01:00
Ilya Chernikov
32d0c99289
Implement metadata handling for IR scripts
2021-03-11 15:49:45 +01:00
Ilya Chernikov
4c6b5ff0b8
Implement IR backend support in scripting tests, enable for some tests
2021-03-11 15:49:44 +01:00
Alexander Likhachev
d1ee05c7f6
Revert "[Build] Fix configuration cache issues with install task"
...
This reverts commit 078849d1
2021-03-11 17:22:37 +03:00
Yahor Berdnikau
543ab3fa2a
Fix issues in Android test projects setup.
2021-03-11 16:36:54 +03:00
Yahor Berdnikau
590bab82e2
Remove not-needed test task validation.
...
Now all test 'install' dependencies are added via centralized 'dependsOnKotlinGradlePluginInstall()' method.
2021-03-11 16:36:53 +03:00
Yahor Berdnikau
3f953bcdfc
Use lazy query for KGP test SourceSet output.
2021-03-11 16:36:52 +03:00
Yahor Berdnikau
7e7552bf5d
Use JUnit 5 platform to run KGP tests.
...
Enabled vintage engine, so existing tests could run without any
modification.
^KT-45353 In Progress
2021-03-11 16:36:50 +03:00
Tianyu Geng
9bdae40ad8
FIR IDE: check generated primary constructor
...
Currently the IDE skips checking the delegated constructor call because
the primary constructor is generated if it's declared with the class.
2021-03-11 14:30:54 +01:00
Svyatoslav Scherbina
2b994e1b66
Native: fix links in RELEASE_NOTES.md
2021-03-11 13:25:42 +00:00
Jinseong Jeon
55561fad37
FIR CFG: correct target and label for rethrow in try expression
...
^KT-45385 Fixed
2021-03-11 16:19:16 +03:00
Jinseong Jeon
4f20d2dccf
Reproduce KT-45385: false positive MUST_BE_INITIALIZED_* after rethrow
2021-03-11 16:19:15 +03:00
Alexander Udalov
f4c63c8ba2
Update public API dump for stdlib
2021-03-11 14:17:33 +01:00
Michael Hoisie
83383ab9e5
Make kotlin.jvm.internal.DefaultConstructorMarker public
...
DefaultConstructorMarker is used as a marker to ensure that a
constructor is unique for companion objects. Prior to this change,
DefaultConstructorMarker was package private.
Being package private worked when calling the
DefaultConstructorMarker-marked constsructor using `invokespecial`,
likely because the JVM may not perform strict access checks in this
situation.
However, when access checks are performed, trying to call a
DefaultConstructorMarker-marked constructor will fail. This could happen
if the constructor was called using reflection or the MethodHandle API.
These APIs may be used by tools that perform bytecode instrumentation
on Kotlin JVM bytecode, such as Robolectric. It also caused problems
when using ByteBuddy validation.
Fixes https://youtrack.jetbrains.com/issue/KT-20869
2021-03-11 14:17:33 +01:00
Alexander Likhachev
78ed758704
[Gradle, K/N] Rework environment input on test tasks
...
Provide method `trackEnvironment` to track environment variables. Use only tracked environment variables as task input.
#KT-44059 Fixed
2021-03-11 15:44:37 +03:00
Alexander Likhachev
c5a9f20a6f
[Gradle, K/N] Don't add unsupported targets to default fat frameworks task
2021-03-11 15:37:36 +03:00
Alexander Udalov
bc5fc122c5
JVM, JVM IR: report error if not all parts of multifile class are @JvmSynthetic
...
#KT-41884 Fixed
2021-03-11 13:33:25 +01:00
Alexander Udalov
75850a618c
Minor, move bytecodeListing tests on JvmMultifileClass
2021-03-11 13:33:25 +01:00
Steven Schäfer
057ead358c
JVM: Add FILE target to the JvmSynthetic annotation ( #4149 )
2021-03-11 13:33:07 +01:00
Victor Petukhov
b45d5abeb1
[jspecify] Change annotations' package from org.jspecify.annotations to org.jspecify.nullness, and DefaultNonNull to NullMarked
...
^KT-45409 Fixed
2021-03-11 15:32:14 +03:00
Alexander Likhachev
2ae7740c46
Set explicit lang version 1.3 for kotlin-native-utils & kotlin-util-io
...
Without explicit version we cannot use those modules in buildscripts with Gradle 6.8+ because Gradle doesn't set flag `skipPrereleaseCheck` (previously was named `skipMetadataVersionCheck`). This way we make it compatible with all supported versions of Gradle.
2021-03-11 14:12:38 +03:00
Alexander Likhachev
875cf1acf9
[Build] Add https://nodejs.org/dist to cache redirector
...
https://nodejs.org/dist repository is being added by Gradle Node plugin (com.github.node-gradle.node) at configuration phase in project.afterEvaluate so we need to wrap it once more to setup redirection later than repository is added
2021-03-11 14:12:37 +03:00
Alexander Likhachev
35df00e071
[Build] Apply :idea:idea-gradle classpath modification on JPS build only
...
This modification is incompatible with Gradle configuration cache
Relates to #KT-44611
2021-03-11 14:12:37 +03:00
Alexander Likhachev
57f5939f5e
[Build] Fix configuration cache issues (part 7)
...
* Read system property "disable.verification.tasks" using Gradle provider
* Fix compileTestKotlin tasks with instrumented classes
* Read Gradle property "kotlin.test.maxParallelForks" using Gradle provider
* Change :idea:performanceTests jackson version to fixed ones
Relates to #KT-44611
2021-03-11 14:12:37 +03:00
Alexander Likhachev
6bd44df861
[Build] Fix configuration cache issues (part 6)
...
Make DexMethodCountStats task class, tasks :examples:kotlin-jsr223-daemon-local-eval-example:test,:idea:idea-fir:test, :idea:idea-fir-performance-tests:test, :idea:idea-frontend-fir:test, :idea:idea-frontend-fir:idea-fir-low-level-api:test, :kotlin-compiler-client-embeddable:test, :kotlin-compiler-embeddable:test, :kotlin-stdlib-js-ir:compileTestKotlinJs, :plugins:android-extensions-compiler:test, :plugins:parcelize:parcelize-compiler:test, :compiler:test compatible with configuration cache
Relates to #KT-44611
2021-03-11 14:12:36 +03:00
Alexander Likhachev
1751b5182b
[Build] Apply test distribution plugin conditionally only if it's needed
...
This buildscript logic change is motivated by configuration cache incompatibility of the plugin
Relates to #KT-44611
2021-03-11 14:12:36 +03:00
Alexander Likhachev
9be06da045
[Build] Make Gradle IT buildscript property reads via Gradle providers
...
Relates to #KT-44611
2021-03-11 14:12:36 +03:00
Alexander Likhachev
ca7dfe02b2
[Build] Replace deprecated configurations usage :tools:kotlinp
2021-03-11 14:12:36 +03:00
Alexander Likhachev
078849d133
[Build] Fix configuration cache issues with install task
...
* `install` task provided by `maven` plugin doesn't support configuration cache so replace `maven` plugin with `maven-publish` and use task that is subtype of PublishToMavenRepository. `maven-publish` partially support configuration cache, see https://github.com/gradle/gradle/issues/13468
* Apply `signing` plugin only if it really needed. The plugin doesn't support configuration cache. See https://github.com/gradle/gradle/issues/13470
Relates to #KT-44611
2021-03-11 14:12:35 +03:00
Alexander Likhachev
46b056c929
[Build] Fix configuration cache issues (part 5)
...
Make Project.configureFormInstrumentation and Task.useAndroidConfiguration extensions, :dependencies:android-sdk unzip tasks compatible with configuration cache
Relates to #KT-44611
2021-03-11 14:12:35 +03:00
Alexander Likhachev
da6544ae3c
[Build] Make projectTest() extension compatible with configuration cache
...
Relates to #KT-44611
2021-03-11 14:12:35 +03:00
Alexander Likhachev
ce49664366
[Build] Bump test-retry plugin version to 1.2.0 to support conf cache
...
Relates to #KT-44611
2021-03-11 14:12:34 +03:00