Commit Graph

91425 Commits

Author SHA1 Message Date
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
Dmitriy Novozhilov aef752a8cb [StdLib] Add -Xbuiltins-from-sources to arguments of stdlib for JVM
This flag is needed to successful compilation of stdlib with FIR compiler
2022-02-18 17:44:42 +03:00
Dmitriy Novozhilov a1fb4d3990 [FIR2IR] Add signature of class to error message if symbol is already bound 2022-02-18 17:44:42 +03:00
Dmitriy Novozhilov c116565c0e [FIR] Allow named arguments for calls of expect functions 2022-02-18 17:44:41 +03:00
Dmitriy Novozhilov 44bfb6fde8 [FIR] Don't register FirJavaElementFinder for common session 2022-02-18 17:44:40 +03:00
Dmitriy Novozhilov b47cc86c57 [FIR] Fix incorrect context usages with withSuppressedDiagnostics call 2022-02-18 17:44:40 +03:00
Dmitriy Novozhilov ccb74b6477 [FIR] Fix computing compatibility of expect and actual modality 2022-02-18 17:44:39 +03:00
Dmitriy Novozhilov e1d21d7a37 [Test] Enable MultiPlatformProjects in multiplatform tests by default 2022-02-18 17:44:39 +03:00
Dmitriy Novozhilov 23af5510a6 [FIR] Render full declaration header in diagnostic messages 2022-02-18 17:44:38 +03:00
Dmitriy Novozhilov 2fa6425965 [LL] Add proper equals and hashCode for KtModuleBasedModuleData 2022-02-18 17:44:37 +03:00
Dmitriy Novozhilov 851305f981 [FIR] Allow smartcasts on member properties for classes from dependsOn dependencies 2022-02-18 17:44:37 +03:00
Dmitriy Novozhilov aeb68f956c [FIR] Turn LEAKED_IN_PLACE_LAMBDA into a warning 2022-02-18 17:44:36 +03:00
Dmitriy Novozhilov 6105271d41 [FIR] Make internal declarations from dependsOn dependent modules visible 2022-02-18 17:44:36 +03:00
Dmitriy Novozhilov ab1ff7baf5 [FIR] Prioritize source dependencies in dependency provider 2022-02-18 17:44:35 +03:00
Yahor Berdnikau 283ba353e7 Remove useless cast in jvm toolchain scripts 2022-02-18 15:40:35 +01:00
Anastasia.Shadrina 4b366ddcf6 [BE JVM] KT-51271 Set proper indices generating contextual inline call
[Tests] Test inline call with context receivers and default params
2022-02-18 15:55:43 +03:00
Dmitry Gridin dc210fa6ef [light classes] KtUltraLightParameterForSetterParameter: simplify equals
^KTIJ-21151
2022-02-18 17:41:05 +07:00