Commit Graph

96002 Commits

Author SHA1 Message Date
Yan Zhulanow f3c4ae8bbf [Pill] Add the ':kotlin-gradle-plugin-annotations' module 2022-11-11 11:28:34 +00:00
Yan Zhulanow 6b198fd85f [Pill] Support 'java-test-fixtures' plugin 2022-11-11 11:28:33 +00:00
Yan Zhulanow 47b5ea0fc7 [Pill] Fix unit test running 2022-11-11 11:28:33 +00:00
Yan Zhulanow 8e494ceb99 [Pill] Update default run configurations 2022-11-11 11:28:32 +00:00
Yan Zhulanow 121599c6d4 [Pill] Prevent 'intellij' directory indexing in cooperative dev mode 2022-11-11 11:28:32 +00:00
Ilya Kirillov 4b7cacd55e [FIR] do not ignore nested type aliases in FirNestedClassifierScope 2022-11-11 12:00:01 +01:00
Ilya Kirillov 7059f7fbe7 [fir] mark functional type contexts receivers as not traversed in RawFirBuilderTotalKotlinTestCase 2022-11-11 12:00:01 +01:00
Ilya Kirillov 2378437b30 [Analysis API FIR] do not create resolved KtTypes for unresolved ones 2022-11-11 12:00:00 +01:00
Ilya Kirillov 7545ccad81 [Analysis API FE1.0] do not expose ExtensionFunctionType from functional types
it's a frontend implementation detail
2022-11-11 12:00:00 +01:00
Ilya Kirillov b47675916f [Analysis API] remove old renderer code 2022-11-11 12:00:00 +01:00
Ilya Kirillov 10b593ba8c [Analysis API] mute tests for expect/actual rendering as expect/actuals are not suported in symbols yet
^KT-54036
^KTIJ-23268
2022-11-11 11:59:59 +01:00
Ilya Kirillov 26ec7ec296 [Analysis API] update testdata after renderer rework
The new testdata seems to be more correct or just different

^KTIJ-23268
2022-11-11 11:59:59 +01:00
Ilya Kirillov d1eb7c51f1 [Analysis API] rework renderer
^KTIJ-23268 fixed
2022-11-11 11:59:58 +01:00
Ilya Kirillov f8ed993307 [Analysis API FE1.0] fix functional types for KFunction
previously, they were throwing an exception
2022-11-11 11:59:58 +01:00
Ilya Kirillov 57ee78a7f5 [Analysis API FE1.0] fix constructor symbol parameters
They should not come from the class itself
2022-11-11 11:59:57 +01:00
Ilya Kirillov 3fb5ce3bdd [Analysis API FE1.0] fix equals/hashCode for symbols 2022-11-11 11:59:57 +01:00
Ilya Kirillov 2ca89e4983 [Analysis API FE1.0] fix constructors in scopes 2022-11-11 11:59:57 +01:00
Ilya Kirillov e706c49eb0 [Analysis API FE1.0] remove Any? type parameter bound 2022-11-11 11:59:56 +01:00
Ilya Kirillov 068168bc3c [fir] change setter parameter name to value 2022-11-11 11:59:56 +01:00
Ilya Kirillov ed1751bbc6 [fir] move mutable/base collection pair map do StandardClassIds to further reuse it 2022-11-11 11:59:56 +01:00
Ilya Kirillov 725ae1fc65 [Analysis API] separate non-class error types from class error types and add information about type qualifiers
it's needed for type printing in renderer
2022-11-11 11:59:55 +01:00
Igor Yakovlev 210212c284 [WASM] Remove redundant parameters for w3c dynamic getters 2022-11-11 10:53:05 +00:00
nataliya.valtman 592db99cfe KT-53402 Add test for resources ignore 2022-11-11 11:04:27 +01:00
Jinseong Jeon 2131cb4fe0 AA FIR: functional type for anonymous function
^KTIJ-17657 In progress
2022-11-11 10:15:44 +01:00
Sergej Jaskiewicz 6d58d9cb8d [JS] Attempt to fix OOM in Node.js
But there are still segfaults, see
https://github.com/nodejs/node/issues/45410
2022-11-10 23:17:42 +00:00
pyos a968193349 K2: fix logic for supertypes annotation deserialization 2022-11-10 22:12:34 +00:00
pyos 456fe858a0 FE: commonize logic for value class representation building 2022-11-10 22:12:08 +00:00
Igor Yakovlev b6eb2b3620 [WASM] Add w3c bindings 2022-11-10 14:22:44 +00:00
Zalim Bashorov 4bafa2c9db [Wasm, Gradle] Quick fix for broken NewMultiplatformIT.testWasmD8Test 2022-11-10 13:54:10 +00:00
Leonid Startsev 2aede50306 Update BCV to 0.12.0; use JAR dump mode for kotlinx-metadata-jvm and
therefore remove BCV from kotlinx-metadata project.

Introduce @IgnoreInApiDump to workaround issue#104 in BCV.
2022-11-10 13:30:12 +00:00
Leonid Startsev 2b2e749d1f Rename KotlinClassMetadata.header to annotationData 2022-11-10 13:30:11 +00:00
Leonid Startsev b974b283a3 Lower deprecation notice for KotlinClassHeader and improve migration path 2022-11-10 13:30:11 +00:00
Leonid Startsev 96279364de Rework Binary Compatibility Validator integration:
- Add BCV to root project to commonize version

- Remove BCV from kotlinx-metadata-klib as it is not necessary for now

- Remove obsolete entry from kotlinx-metadata apiDump

- Add dependency from :kotlinx-metadata-jvm:check to :kotlinx-metadata:check so TC build can verify integrity of API dumps in both projects
2022-11-10 13:30:11 +00:00
Leonid Startsev 21d2211dcd Fix various review comments: rephrase deprecations, update KDocs,
remove unnecessary deprecations and unused functions.
2022-11-10 13:30:10 +00:00
Leonid Startsev 474ef921d8 Use standard @Deprecated in place of special opt-in annotation
Remove @DeprecatedVisitor
2022-11-10 13:30:10 +00:00
Leonid Startsev c4d409608c Rewrite KotlinP so it does not use visitors from kotlinx-metadata anymore;
fix bug with missing moduleName.
2022-11-10 13:30:10 +00:00
Leonid Startsev 3d679b76bc Use Metadata directly instead of KotlinClassHeader; rewrite latter to Java
so Java clients can obtain Metadata instance from it.
2022-11-10 13:30:09 +00:00
Leonid Startsev 471882b743 Introduce @DeprecatedVisitor; mark up visitor-related declarations with it.
Provide convenient JVM writing API.

Get rid of ExperimentalUnsignedTypes.
2022-11-10 13:30:09 +00:00
Leonid Startsev dd985d8209 Add Binary Compatibility Validator to kotlinx-metadata projects
Initiate API dumps
2022-11-10 13:30:08 +00:00
pyos e7b4927b6c FIR: don't emit SENSELESS_NULL_IN_WHEN when value is always null
This case (value is always null) contradicts the error message which says
"Expression under 'when' is never equal to null".
2022-11-10 13:10:58 +00:00
pyos fbb54f0300 FIR: fix Clonable detection condition in inline checker 2022-11-10 11:34:53 +01:00
Hung Nguyen cdbbead157 Handle changes to inline functions/property accessors with @JvmNames
If we detect a change in an inline function `foo` with @JvmName
`fooJvmName`, we have two options:
   1. Report that function `foo` has changed
   2. Report that method `fooJvmName` has changed

Similarly, if we detect a change in an inline property accessor with
JvmName `getFoo` of property `foo`, we have two options:
   1. Report that property `foo` has changed
   2. Report that property accessor `getFoo` has changed

The compiler is guaranteed to generate `LookupSymbol`s corresponding to
option 1 when referencing inline functions/property accessors, but it is
not guaranteed to generate `LookupSymbol`s corresponding to option 2.
(Currently the compiler seems to support option 2 for *inline*
functions/property accessors, but that may change.)

Therefore, we will choose option 1 as it is cleaner and safer.

^KT-54144 In progress

Small cleanup in IncrementalCompilerRunner

 - Add comment for closing caches
 - Rename providedChangedFiles to changedFiles
 - Tiny clean up in `performWorkBeforeCompilation`
 - Count directories to delete in debug logs

^KT-53015 In progress

Extract KotlinClassInfo to a separate class

to reduce the size of IncrementalJvmCache and prepare for the next
change.

^KT-54144 In progress

Ignore inline functions that are not found in the bytecode

^KT-54144 In progress

Add unit test for handling `@JvmName`s

Test: KotlinOnlyClasspathChangesComputerTest
             #testFunctionsAndPropertyAccessorsWithJvmNames
^KT-54144 Fixed

Update unit tests for handling `@JvmName`s

In a previous commit, we made a behavior change for inline property
accessors: The existing behavior is that if the implementation of an
inline getter has changed, only usages of the getter will be impacted
but not usages of the setter (and vice versa).

After that previous commit, usages of *both* the getter and setter will
now be impacted (i.e., we might compile slightly more files). This is
because a change to either the getter or the setter will now be
considered a change to the property, which will help simplify our change
analysis.

This commit updates the relevant unit tests to reflect the new behavior.

Test: Updated Incremental*TestGenerated.PureKotlin#testInlinePropertyInClass
      and Incremental*TestGenerated.PureKotlin#testInlinePropertyOnTopLevel

^KT-54144 Fixed
2022-11-10 10:03:55 +01:00
nataliya.valtman e1e07d2094 KT-54492 Add kotlin plugin version into error file 2022-11-10 08:57:10 +00:00
Dmitrii Gridin 871fd09e3f [AA FIR] KtFirClassLikeSymbolPointer: replace lambda with regular class check
^KT-54311
2022-11-10 06:39:25 +00:00
Dmitrii Gridin ab2edd40d4 [AA FIR] KtFirClassLikeSymbolPointer: mark as internal
^KT-54311
2022-11-10 06:39:25 +00:00
Dmitrii Gridin 41ebf5ed53 [AA] KtPsiBasedSymbolPointer: simplify test logic
^KT-54311
2022-11-10 06:39:24 +00:00
Dmitrii Gridin b151ed3e65 [AA K2] drop redundant nested pointers for class like symbols
^KT-54311
2022-11-10 06:39:24 +00:00
Dmitrii Gridin deafb75d0e [AA K2] KtFirFunctionSymbol: cleanup code
^KT-54311
2022-11-10 06:39:24 +00:00
Dmitrii Gridin 638eccac16 [AA K2] add missing resolve for signature creation
^KT-54311
2022-11-10 06:39:23 +00:00
Dmitrii Gridin 202a022b49 [AA K2] implement symbol pointers for value parameters
^KT-54311
2022-11-10 06:39:23 +00:00