Commit Graph

91537 Commits

Author SHA1 Message Date
Ilya Kirillov 7fbfb1bd95 Fix cooperative development setup for kt-master 2022-03-02 13:46:24 +01:00
Dmitry Petrov 8576265108 Enable KotlinFunInterfaceConstructorReference in LV 1.7 2022-03-02 13:12:08 +03:00
Yahor Berdnikau aca2e46e62 Fix failing kapt test
Dependency test is using was not available. Updated it to the latest
stable version.
2022-03-02 11:05:26 +01:00
Ilya Goncharov 8b34be9490 rra/ilgonmic/update-lock-files
[Gradle, JS] Update npm versions

[JS] Update package.json's and lock files

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

^KT-51503 fixed
2022-03-01 10:24:56 +00:00
Pavel Kunyavskiy dae24ff6d1 [K/N] Support IrDefinitelyNotNullType in type erasure 2022-03-01 08:03:28 +00:00
Nikolay Krasko 0b4aea4103 Fix exhaustive when error in :ring:compileKotlinNative 2022-03-01 02:28:52 +03:00
Artem Kobzar ac542d4c01 feat(JS/IR isInterfaceImpl perf): improve isInterfaceImpl performance by memoize an result. 2022-02-28 20:28:10 +00:00
Vyacheslav Gerasimov f8f1b3fd41 Build: Remove allowUntrustedServer & allowInsecureProtocol
#KTI-791
2022-02-28 15:56:31 +03:00
Yahor Berdnikau cb474f9b43 Remove 'jdkHome' option from Gradle options
Toolchain feature is replaced it.

^KT-46541 Fixed
2022-02-28 10:08:50 +00:00
Anton Lakotka 3cc3bf2a6b [Gradle] JsCompilationDependenciesHolder should not implement HasKotlinDependencies through delegation
`HasKotlinDependencies::dependencies` methods is meant to read
``*ConfigurationName` properties in implementations.
Therefore, implementation through delegate isn't possible since
delegate *can't* read overrided properties, instead it sees its own.

^KT-51457 Verification Pending
2022-02-28 09:50:02 +00:00
Anton Lakotka bf11704a98 [Gradle] Add test for KT-51457
^KT-51457 In Progress
2022-02-28 09:50:01 +00:00
Aleksei.Cherepanov ee756638a0 Fix creation of temp file in case of bad parent dir for Gradle
newTmpFile can fail, if you pass non-existent path as temp parent directory or java.io.tmpdir is empty or invalid. Now we try to create non-existent dirs and provide more info if it also fails. Also fix error throwing in JPS part(46c0c4f9)

#KT-51374 Fixed
2022-02-28 08:50:02 +00:00
Dmitriy Novozhilov 4022918ea2 [FIR2IR] Properly generate arguments for annotation constructors calls in default values of annotation constructors 2022-02-28 11:42:35 +03:00
Dmitriy Novozhilov 18fc2802e5 [FIR] Make FirTypeParameter.containingDeclarationSymbol not null
Also fix initializing this property in all places
2022-02-28 11:42:34 +03:00
Dmitriy Novozhilov 35a2a6bcec [FIR] Store containingDeclarationSymbol for type parameters of substitution overrides 2022-02-28 11:42:33 +03:00
Pavel Kirpichenkov 1e925b5937 [MPP] Allow commonization of platform types in leaf targets
Costs little right now and is more robust for potential future uses of
platform types in native libraries or cinterops.

KT-41509
2022-02-28 10:59:44 +03:00
Pavel Kirpichenkov 867390b889 [MPP] Move integer names used by commonizer to its module
KT-41509
2022-02-28 10:59:42 +03:00
Pavel Kirpichenkov 91a0af2aa1 [MPP] Provide platform integers support library implicitly in KGP
KT-41509
2022-02-28 10:59:40 +03:00
Pavel Kirpichenkov f257297505 [MPP] Commonize to platform integers considering target's bit width
Commonized type should match the platform's `platform.posix.ssize_t`
type alias' width. The implementation hard-codes platform widths for
all the targets, this can be potentially changed to search for ssize_t
in dependencies and get width from its type.

Use real targets in platform int commonization tests.

KT-41509
2022-02-28 10:59:38 +03:00
Pavel Kirpichenkov 8f4d04dad2 [MPP] Add preliminary version of platform integer commonizer
Doesn't take target's size_t alias into account just yet

KT-41509
2022-02-28 10:59:36 +03:00
Pavel Kirpichenkov b8ee473107 [Commonizer] Improve error messages for tests 2022-02-28 10:59:34 +03:00
Dmitriy Novozhilov 324e4bf254 Revert "Build: Remove allowUntrustedServer & allowInsecureProtocol"
This revert is temporary and it should be returned after fix of problem
  with public TC configurations
2022-02-28 10:56:04 +03:00
Alexander Udalov 157db778fd Rework support of Iterator.iterator optimization in ForLoopsLowering
- Fix the predicate used for finding the member function `next`: check
  that there's no extension receiver parameter, don't filter out
  abstract functions.
- Do not copy iterator expression, instead change the type in all
  references to the iterator variable.
- Fix some style issues.

 #KT-47171 Fixed
2022-02-28 01:39:31 +01:00
Xin Wang 1b776bd5b6 JVM_IR: Specialize iterator if possible
fixes KT-47171
2022-02-28 01:39:31 +01:00
Roman Golyshev 8bcdc70adc FIR IDE: Add IDE tests for sample compiler plugin 2022-02-25 23:08:26 +03:00
Roman Golyshev fed08aaff5 FIR IDE: Consider COMPANION_GENERATION phase in lazy resolve 2022-02-25 23:08:26 +03:00
Roman Golyshev 6e649dd29c FIR IDE: Add a way to use test compiler plugin in FIR IDE tests
Compiler plugins can be enabled
by WITH_FIR_TEST_COMPILER_PLUGIN directive
2022-02-25 23:08:26 +03: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
Roman Golyshev 1a77643ad0 FIR IDE: Add static implementation of KotlinAnnotationsResolver 2022-02-25 23:08:26 +03:00
Roman Golyshev f700b87f6c FIR: Prevent registering compiler plugins twice 2022-02-25 23:08:25 +03:00
Roman Golyshev 62f0487efa FIR: Set resolve phase to BODY_RESOLVE for the generated declarations
In the future it should be checked that plugins can return only
`BODY_RESOLVE`d declarations
2022-02-25 23:08:25 +03:00
Roman Golyshev 765af5f18a FIR IDE: Register plugins-related session components in IDE session
Move registering CLI-specific plugin-related components to
`registerCliCompilerOnlyComponents`
2022-02-25 23:08:25 +03:00
Roman Golyshev 8d9d46dae3 FIR IDE: Lift extensions registration higher in session creation process
We want to do that before creating symbol providers
2022-02-25 23:08:25 +03:00
Roman Golyshev b1b99e1673 FIR IDE: Add the simplest support for PLUGIN KtDeclarationOrigin 2022-02-25 23:08:25 +03:00
Roman Golyshev 6d6a3fbe21 FIR IDE: Consider generated names in KtFirPackageScope
If scope doesn't return generated names from `getPossibleCallableNames`,
it's impossible to query them from the scope, since you have to know the
name of callable/classifier to query it
2022-02-25 23:08:25 +03:00
Roman Golyshev 13cc0ddf97 FIR: Implement FirIdePredicateBasedProvider 2022-02-25 23:08:25 +03:00
Roman Golyshev 08b6353431 FIR: Add IDE implementation for FirRegisteredPluginAnnotations
It works on `KotlinAnnotationsResolver`, which means that it uses
PSI indices to search for the annotations
2022-02-25 23:08:25 +03:00
Roman Golyshev 76707afc90 FIR: Add KotlinAnnotationsResolver service 2022-02-25 23:08:25 +03:00
Roman Golyshev 029331c23b FIR: Introduce AbstractFirRegisteredPluginAnnotations
It will be needed to implement an alternative implementation of this
service
2022-02-25 23:08:25 +03:00
Yahor Berdnikau d62c70298a Disable javadoc generation on local development
Currently Dokka tasks running for Gradle plugins take quite a lot of
time slowing down local development cycle.

This change disables publishing javadoc on non-CI builds. This could be
lifted by putting 'kotlin.build.gradle.publish.javadocs=true' into
local.properties.

^KT-49227 In Progress
2022-02-25 15:21:48 +00:00
Ilya Kirillov 4a5aee688e FIR LC: fix invalid type param upper bound 2022-02-25 14:06:05 +01:00
Ivan Kochurkin e010f59560 Move JSPECIFY_ANNOTATIONS_PACKAGE to 1.8 2022-02-25 11:46:28 +00:00
Ivan Kochurkin c03886ecda Move IgnoreNullabilityForErasedValueParameters to 1.8 2022-02-25 11:46:27 +00:00
Mikhail Glukhikh 53d6ac24e5 Switch kotlin version to 1.7
* Change 1.6 to 1.7 constants
* Fix SAFE_CALL_WILL_CHANGE_NULLABILITY for testData
* Change EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_WARNING to EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR
* Change NON_EXHAUSTIVE_WHEN_STATEMENT to NO_ELSE_IN_WHEN
* Fix testData for SafeCallsAreAlwaysNullable
* Change T -> T & Any in test dumps
* Change INVALID_CHARACTERS_NATIVE_WARNING -> INVALID_CHARACTERS_NATIVE_ERROR
* TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_WARNING -> TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR
2022-02-25 11:46:27 +00:00
Yan Zhulanow d741aaf82f Fix pattern for filtering out services in compiler-tests-for-ide
The original pattern wasn't enough for matching all files in the
'META-INF/services' directory, especially the 'TestExecutionListener'
service registration that breaks tearDown() in JUnit5 tests in IDE.
2022-02-25 19:48:17 +09:00
Dmitry Petrov a1db077af9 JVM_IR KT-51458 fix DNN types handling in JvmStringConcatenationLowering 2022-02-25 10:09:14 +03:00
Roman Golyshev f1f2c7cce5 FIR IDE: Small fixes 2022-02-25 01:54:25 +03:00
Igor Yakovlev f0f94623f4 [WASM] Implement data class hashCode and toString for arrays 2022-02-24 20:15:15 +03:00
Vyacheslav Gerasimov 8a20df1a97 Build: Remove allowUntrustedServer & allowInsecureProtocol
#KTI-791
2022-02-24 19:54:00 +03:00
Jinseong Jeon 1b276a3c59 AA: allow enum generated declarations for psi retrieval 2022-02-24 17:51:51 +01:00