Commit Graph

91441 Commits

Author SHA1 Message Date
Yahor Berdnikau 0488924edb Migrate kotlin-noarg configuration
^KT-49227 In Progress
2022-02-22 12:35:02 +00:00
Yahor Berdnikau 539826e611 Migrate kotlin-serialization configuration
^KT-49227 In Progress
2022-02-22 12:35:02 +00:00
Yahor Berdnikau 0af5b34921 Move some Gradle libraries to use common-dependency configuration
^KT-49227 In Progress
2022-02-22 12:35:02 +00:00
Yahor Berdnikau 1d2796d491 Update Gradle plugins publishing setup
Simplifies and make it aligned with official documentation, which
removes some old workarounds. Additionally, it enables publication of
Gradle metadata file, which is required for plugin variants feature
support.

Instead of using 'gradleApi()' as Gradle API dependency, which provides
build current Gradle version api, now setup is using
"dev.gradleplugins:gradle-api" artifacts with specific Gradle version.
This allows to have more fine-grained Gradle support for removed apis.

^KT-49227 In Progress
2022-02-22 12:35:01 +00:00
Yahor Berdnikau e4610d9df6 Update Gradle plugin publish plugin to 0.20.0 version.
^KT-49227 In Progress
2022-02-22 12:35:01 +00:00
Yahor Berdnikau 764dd84803 Update dokka plugin to 1.6.10 version
Move it into 'buildSrc' dependency, so it will be available to
precompiled script plugins.

^KT-49227 In Progress
2022-02-22 12:35:00 +00:00
Svyatoslav Scherbina 0c24f67c21 Native: fix location offsets in SuspendFunctionN implementations
When generating synthetic Function{N+1}.invoke implementations for
SuspendFunction{N} subclasses, use SYNTHETIC_OFFSET instead of
suspend invoke function location offsets.

This location is more suitable for generated synthetic functions.
Additionally, this fixes the case when suspend invoke is fake override:
fake overrides use UNDEFINED_OFFSET, so the generated function was
getting UNDEFINED_OFFSET as well, leading to incorrect debug
information.

Fix suspendFunctionAsSupertype.kt and suspendFunctionAsSupertypeCall.kt
2022-02-22 11:34:28 +00:00
Alexander Shabalin 964edbaf91 [K/N] Reuse mark queue ^KT-51436
Merge-request: KT-MR-5819
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-02-22 11:01:15 +00:00
Yahor Berdnikau 14dc20186d Migrate IncrementalCompilationMultiProjectIT test to new dsl
^KT-45745 In Progress
2022-02-21 23:49:12 +03:00
Yahor Berdnikau a5c1febf88 Convert IncrementalJavaChangeIT test to new tests dsl
^KT-45745 In Progress
2022-02-21 23:49:11 +03:00
Yahor Berdnikau f8a3b8bf1f Add helper to get paths related to the project dir
^KT-45745 In Progress
2022-02-21 23:49:11 +03:00
Yahor Berdnikau 01d5b92b33 Add additional build options required for incremental tests
^KT-45745 In Progress
2022-02-21 23:49:10 +03:00
Mikhail Glukhikh 8274c43ee6 Make useExperimental non-CLI argument 2022-02-21 22:32:53 +03:00
Alexander Udalov 96ba4bb201 Add test to check that KT-30172 is fixed 2022-02-21 20:31:05 +01:00
tdn120 8d1fb7bb5e Check analysis error before checking compiler args
ExperimentalUsageChecker.checkCompilerArguments() will crash if there was an error running analyze().
This checks for the error first so it can be properly reported.
2022-02-21 20:31:05 +01:00
Alexander Udalov 8ccd4a40d2 IR: rename IrElementVisitorVoid.visitVariableAccess -> visitValueAccess
For consistency with IrElementVisitor.

Co-authored-by: mcpiroman <mcpiroman@gmail.com>
2022-02-21 19:56:45 +01:00
Alexander Udalov b00cd30e93 IR: minor, move accept from IrConstantObjectImpl to IrConstantObject 2022-02-21 19:56:45 +01:00
Alexander Udalov 0b6972edf0 IR: add default implementations for acceptChildren/transformChildren
To simplify migration to auto-generated IR.
2022-02-21 19:56:45 +01:00
Alexander Udalov 4bec1b08f9 IR: move IrElement.transform implementation to IrElementBase
To avoid extra indirection via `IrElement$DefaultImpls` for elements
whose `transform` uses the default implementation. And also, to simplify
migration to auto-generated IR tree.
2022-02-21 19:56:44 +01:00
Alexander Udalov 2ce91853ec IR: minor, extract declarations from IrElement.kt 2022-02-21 19:56:44 +01:00
Alexander Udalov 1303ac4848 IR: make IrGetValue.copyWithOffsets an extension function 2022-02-21 19:56:44 +01:00
Alexander Udalov bb77078362 Do not use embeddable compiler for K/N in testMppBuildWithCompilerPlugins 2022-02-21 19:56:22 +01:00
Yan Zhulanow 0b94cb2c6e Exclude junit-platform.properties from compiler test JAR
Presence of 'junit-platform.properties' in the JAR makes JUnit5
IDE tests run in parallel. The IDE infrastructure isn't prepared
for this, and tests fail miserably with a variety of exceptions.
2022-02-22 02:17:45 +09:00
Ilmir Usmanov c072448d22 Lower fun interface children's body during inline class lowering
#KT-51121 Fixed
2022-02-21 19:50:12 +03:00
Ivan Gavrilovic 72532f6f03 KT-41456: Incremental KAPT - optimize .class file counting
When counting .class files, stop once the required number is reached.
Also, implement simple counting logic directly, it is 25% faster than
using File.walk(). The way this information is used is a heuristic, so
reducing computation cost makes sense.

^KT-41456 Fixed
2022-02-21 18:10:03 +03:00
Ivan Gavrilovic 0074e0209c KT-41456: Incremental KAPT - check compiled sources before running incrementally
Because incremental KAPT tries to reuse .class files produced by kotlinc
and javac, it should check for their existence before starting
an incremental run. Otherwise, annotation processors that perform type
validation will fail to run.

Current check counts the number of declared types in processed .java
sources, and it makes sure the total number of .class files in compiled
sources dirs is equal or higher. Otherwise, KAPT runs non-incrementally.

Tests: KaptIncrementalWithIsolatingApt.testMissingKotlinOutputForcesNonIncrementalRun

^KT-41456 In Progress
2022-02-21 18:10:00 +03:00
Ivan Gavrilovic c7e73ce88d KT-41456: Incremental KAPT - represent source and class file structure differently
When storing source information needed for type analysis, store
.java file and .class file information separately. This is because
for class files only declared typed is needed.

Tests: updating existing ones

^KT-41456 In Progress
2022-02-21 18:09:58 +03:00
Mikhail Glukhikh 570189e833 Mark deprecated 'useExperimental' with IDEAPluginsCompatibilityAPI 2022-02-21 14:33:10 +00:00
Simon Ogorodnik 2a7aa2f240 FirTypeResolver. Prohibit resolving FirResolvedTypeRef 2022-02-21 12:23:26 +00:00
Simon Ogorodnik bf3a3caee6 FIR. Do not re-resolve parts of intersection types 2022-02-21 12:23:26 +00:00
Simon Ogorodnik 857fe985b2 FIR tree. Make intersection type part-types non-null 2022-02-21 12:23:25 +00:00
Simon Ogorodnik 9c727e6d5d FIR. Fix currentFile unset in specific type resolver in some cases 2022-02-21 12:23:25 +00:00
Yahor Berdnikau 9943b146e9 Remove 'kotlinPluginVersion' property
^KT-47318 Fixed
2022-02-21 09:46:42 +00:00
Yahor Berdnikau 9d0d26e15d Restore 'KotlinGradleSubplugin' as marker interface.
This avoids build failure in 'buildSrc' module with 'kotlin-dsl' applied
with 'ClassNotFound' exception.

^KT-51378 Fixed
2022-02-21 09:42:23 +00:00
Ilya Goncharov 2173ce77d5 rra/ilgonmic/fork-options-js-test
[Gradle, JS] Environment instead of fork options

[Gradle, JS] Add test on fork options

[Gradle, JS] Add fork options to kotlin js test

Merge-request: KT-MR-5793
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>

^KT-51414 fixed
2022-02-21 08:41:29 +00:00
Aleksei.Cherepanov 46c0c4f9d9 Fix creation of temp file in case of bad parent dir
createTempFile can fail, if you pass non-existent path to kotlin.jps.dir.for.module.files or java.io.tmpdir. Now we try to create non-existent dirs and provide more info if it also fails

#KTIJ-17280 Fixed
2022-02-21 08:34:11 +00:00
Ilya Matveev f7468cf9bc [K/N][stdlib] Support \V, \v, \H, \h, \R in regex engine
Issue #KT-50742 Fixed
2022-02-21 13:20:23 +07:00
Yahor Berdnikau 798a15c450 Fix flaky native test. 2022-02-18 19:37:07 +03:00
sebastian.sellmair 4a02e88df1 [KPM] kotlin-gradle-plugin-idea: Publish sources and javadoc jars
KT-51262
KT-51220
2022-02-18 16:31:06 +00:00
Alexander Udalov e5e5970883 JVM IR: workaround indirect dependency between lowerings
#KT-51353 Fixed
2022-02-18 17:04:18 +01:00
Dmitry Petrov 3b3734f0bb JVM_IR simplify RenameFieldsLowering 2022-02-18 15:37:42 +00:00
Dmitry Petrov 7f95d7f414 IR make 'name' a var 2022-02-18 15:37:42 +00:00
Yan Zhulanow 0860ff6542 Add module ':compiler:frontend.common.jvm' to the JPS plugin
New module was added in '52baf7338edcbc877e2ca1b0c7b63665d15f0e80',
however unless it's present in the 'compilerModulesForJps' list,
it's not packed inside the JPS plugin.
2022-02-18 23:54:29 +09:00
Dmitriy Novozhilov d4d22b0dcf [FIR] Add plugin prototype for testing extension for injection receivers 2022-02-18 17:52:34 +03:00
Dmitriy Novozhilov 83179f4482 [FIR] Add extension for injecting new implicit receivers after resolution of function call 2022-02-18 17:52:34 +03:00
Dmitriy Novozhilov e7e1aa1873 [Build] Add ability to enable rendering of diagnostic names via local.properties 2022-02-18 17:44:45 +03:00
Dmitriy Novozhilov 3d48f9926f [Build] Update version of kotlin-build-gradle-plugin to 0.0.35 2022-02-18 17:44:44 +03:00
Dmitriy Novozhilov 00031f7321 [Build] Add missing md5 hashes to verification-metadata.xml 2022-02-18 17:44:44 +03:00
Dmitriy Novozhilov 74d36634bf [Build] Add renderDiagnosticNames property to kotlin build gradle plugin 2022-02-18 17:44:43 +03:00
Dmitriy Novozhilov baf300a815 [StdLib] Suppress INVISIBLE_REFERENCE alongside with INVISIBLE_MEMBER
This is needed to successful compilation of stdlib with FIR compiler
2022-02-18 17:44:43 +03:00