Commit Graph

90549 Commits

Author SHA1 Message Date
Dmitriy Novozhilov bb6c6dc45d [FE 1.0] Fix reporting of UNINITIALIZED_ENUM_ENTRY on qualified enums
^KT-41124
^KT-50758 Fixed
2022-01-14 14:26:54 +03:00
Dmitriy Novozhilov 50f6825775 [FE 1.0] Cleanup code of ControlFlowProcessor
- Always pass not nullable language version settings
- Fix warnings and style
- Remove redundant pseudocode utils
2022-01-14 14:26:53 +03:00
Dmitriy Novozhilov 9f870b0549 [FIR] Report errors on cycles in annotation parameter types
^KT-47932
2022-01-14 14:26:53 +03:00
Dmitriy Novozhilov e9ac24dc33 [FE 1.0] Report errors on cycles in annotation parameter types
^KT-47932
^KT-50753 Fixed
2022-01-14 14:26:52 +03:00
Dmitriy Novozhilov 139a800ff7 [FE 1.0] Prohibit array literals inside nested objects of annotation classes
^KT-39041
^KT-50749 Fixed
2022-01-14 14:26:51 +03:00
Dmitriy Novozhilov c1575edca4 [FE 1.0] Drop ArrayLiteralsInAnnotations feature
This feature was introduced in 1.2, so now it's stable part of language
  and we can drop support of disabling it
2022-01-14 14:26:50 +03:00
Dmitriy Novozhilov ff7eb79bb1 [FE 1.0] Prohibit call of constructor of functional supertype
^KT-46344
^KT-50730 Fixed
2022-01-14 14:26:50 +03:00
Dmitriy Novozhilov ecc890efe8 [FE 1.0] Fix reporting of uninitialized parameter in default values of parameters
^KT-25694
^KT-50723 Fixed
2022-01-14 14:26:49 +03:00
Mikhael Bogdanov 92e893bebe Rework Tune module graph dependencies building
#KT-50701 In progress
2022-01-14 11:22:46 +00:00
Pavel Punegov 6f323dd33a [K/N][test] Ignore stdlib test in new infra 2022-01-14 08:15:09 +00:00
Igor Chevdar f724b5c29d [K/N][gradle][interop] Workaround for loading readonly native libs 2022-01-14 10:29:12 +05:00
Igor Chevdar 7a4ef76527 [K/N][gradle] Automatic cleaning of the class loaders map 2022-01-14 10:29:11 +05:00
Igor Chevdar bd6ea71ead [K/N][gradle][interop] Refactored ToolConfig
Added possibility to create different strategies for loading libclang
2022-01-14 10:29:10 +05:00
Igor Chevdar 650d4c78e9 [K/N][interop] A small optimization 2022-01-14 10:29:08 +05:00
Igor Chevdar 0211509795 [K/N][build] Refactored K/N tool runner 2022-01-14 10:29:07 +05:00
Igor Chevdar 8ac234fd6b [K/N][interop] Made NativeMemoryAllocator lock-free 2022-01-14 10:29:06 +05:00
Igor Chevdar 993816a400 [K/N][runtime][interop] Refactoring to run cinterop in daemon 2022-01-14 10:29:05 +05:00
Igor Chevdar 41e1fbe971 [K/N][gradle][interop] Arg to specify relative dir for libraryPath 2022-01-14 10:29:04 +05:00
Roman Golyshev 4418d76a0d FIR: Replace fir.bounds with resolvedBounds where it is appropriate
If there is a `coneType` call immediately after the `fir.bounds` call,
it means that the fully resolved type is expected, hence
`resolvedBounds` should be used
2022-01-14 01:04:24 +03:00
Roman Golyshev 939e4d1e77 FIR: Fix "unreachable branch in when" warning 2022-01-14 00:12:51 +03:00
Stanislav Erokhin 1326ca674e Introduced IDEAPluginsCompatibilityAPI and returned some API
Please read the description of IDEAPluginsCompatibilityAPI.
Also, you may notice, that Deprecation annotation was removed.
That is because with level ERROR it isn't possible to opt-in
to such API in the legit cases. And with level WARNING it won't be
reported because We have diagnostic with level ERROR about OptIn marker.
Sadly, there is no way to add ReplaceWith to the OptIn marker
2022-01-13 18:03:07 +01:00
Stanislav Erokhin 088d489141 Return parcelize-runtime to the parcelize-compiler-plugin-for-ide.jar
Classes like kotlinx.parcelize.Parcelize still used in the Android
plugin in the IDEA, so they should be included into plugin.
Otherwise, we have issues like KTIJ-20220.

#KTIJ-20220 In progress
2022-01-13 17:50:56 +01:00
Yahor Berdnikau ec1c585da4 Fix android debug keystore fix was not applied for library plugin 2022-01-13 18:32:23 +03:00
Dario Seidl 8d8bf6473b Fix typo in description of Float.ulp
Replace `Float.NIN_VALUE` with `Float.MIN_VALUE`.
2022-01-13 17:21:47 +03:00
Yahor Berdnikau 68f4580492 Fix kaptGenerateStubs doesn't ignore empty Android source directories
^KT-48617 Fixed
2022-01-13 13:11:20 +00:00
Dmitry Petrov d184babda6 JVM_IR fix cast to non-null primitive type (FIR bootstrap issue) 2022-01-13 12:47:00 +00:00
Pavel Kunyavskiy 2ba0a7b40f [K/N] Implement Platform.availableProcessors
^KT-48179
2022-01-13 12:43:03 +00:00
Denis.Zharkov 964cf937c3 Fix IllegalStateException in case of recursive T & Any upper bound
^KT-50542 Fixed
2022-01-13 12:54:47 +03:00
Pavel Kunyavskiy afc548d5d9 [K/N] Fix equality on fun-interface constructor references
^KT-50204
2022-01-13 09:45:58 +00:00
Yahor Berdnikau a378e1e128 Bump Kotlin stable release to version 1.5.32
^KT-45745 In Progress
2022-01-13 10:30:54 +01:00
Yahor Berdnikau 0f3d7d5ad8 Fix typo in parameter name
^KT-45745 In Progress
2022-01-13 10:30:53 +01:00
Yahor Berdnikau 1c1e8f3c85 Migrate SubpluginsIT to new test DSL
^KT-45745 In Progress
2022-01-13 10:30:50 +01:00
Nikita Bobko 47ed6dcfb4 CompilerArgumentsSerializerV5.serializeTo: fix NPE
NPE was happening on `?.takeIf { it.get(arguments) != it.get(newInstance) }` line.
It was happening because `it.get` could return `null`.

But the problem was only reproducible on TeamCity and not reproducible locally.

Test example (IJ repo): `org.jetbrains.kotlin.idea.fir.completion.HighLevelJvmBasicCompletionTestGenerated$Common$FromSmart.testArrayLiteralAnnotationConstructorAsDefaultValueForArray`
stacktrace:
```
java.lang.NullPointerException
  at org.jetbrains.kotlin.arguments.CompilerArgumentsSerializerV5.serializeTo(CompilerArgumentsSerializer.kt:23)
  at org.jetbrains.kotlin.config.FacetSerializationKt.writeLatestConfig(facetSerialization.kt:379)
  at org.jetbrains.kotlin.config.FacetSerializationKt.serializeFacetSettings(facetSerialization.kt:422)
  at org.jetbrains.kotlin.idea.facet.KotlinFacetConfigurationImpl.writeExternal(KotlinFacetConfigurationImpl.kt:24)
```
2022-01-13 10:11:44 +01:00
Pavel Punegov a4123a6be9 [K/N][test] Ignore test that fails due to ^KT-50763 2022-01-13 08:31:10 +00:00
Pavel Punegov 49b6545268 [K/N][test] Ignore test that extends final ArrayList (in K/N) 2022-01-13 08:31:09 +00:00
Denis.Zharkov 751e618d83 Enable ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated since 1.8
^KT-36770 Relates
2022-01-13 08:47:20 +03:00
Denis.Zharkov d3b686b28f Minor. Remove effectively unused feature 2022-01-13 08:47:20 +03:00
Denis.Zharkov d87eddaf8b Improve warnings related to type parameter bounds nullability
Explicitly supply the type parameter that needs to be non-nullified

^KT-36770 Relates
2022-01-13 08:47:20 +03:00
Denis.Zharkov 1827165716 Support rendering messages text in diagnostic tests 2022-01-13 08:47:19 +03:00
Pavel Kunyavskiy 541f6b0c88 [K/N] Fix handling of legacy suspend-function superclass
^KT-50737
2022-01-12 19:42:37 +00:00
Dmitriy Novozhilov b2b5f4a63a [FE 1.0] Don't report deprecation diagnostics about enum on it's own entries
^KT-37975 Fixed
2022-01-12 19:11:28 +03:00
Nikita Bobko 6b327d2380 Unmute JPS tests which pass 2022-01-12 15:25:23 +01:00
Aleksei.Cherepanov b3f6b78fbe [CHERRY PICKED FROM IJ] Fix debug of incremental JPS tests in intellij repo
Create extension of "load classes by parent classloader" logic to bypass clash of the same classes with different versions, loaded by different classloaders in case of running in-process compilation in debug configuration.

#KT-49786 Fixed

GitOrigin-RevId: 173749ef1a36fdb1df44e98f3d373941e00f29ad
Original commit: https://github.com/JetBrains/intellij-community/commit/16e76333d4163c3772fa6e6ef3c1c7667a4c12f9
2022-01-12 15:25:23 +01:00
Aleksei.Cherepanov ea9422fedd [CHERRY PICKED FROM IJ] Update Kotlin caches version due to adding LookupSymbolKeyDescriptor versioning
Since versioning of LookupSymbolKeyDescriptor was added in 1.5.30: f6b428f2 "KT-34862 use abi snapshot instead of build history files", it is necessary to update version of caches for JPS, as new caches are not compatible with previous.

#KT-48399 Fixed

GitOrigin-RevId: 59b1071c1a1090f78c51824d45e6c000f4ef2f3f
Original commit: https://github.com/JetBrains/intellij-community/commit/658f4aeb603bb224a14a92933ebe519948db7745
2022-01-12 15:25:22 +01:00
Stanislav Erokhin 68e5479c95 [CHERRY PICKED FROM IJ] [kotlin:testdata] Update the asm version in AsmVersionForJpsBuildTest
GitOrigin-RevId: 5a2468edca8d1f08c11ce8419178e0e6ce91bd95
Original commit: https://github.com/JetBrains/intellij-community/commit/0a144e464e026bc1f1aa698f28f3b24f6381a890
2022-01-12 15:25:22 +01:00
Aleksei.Cherepanov 7181244129 [CHERRY PICKED FROM IJ] Fix test IncrementalJvmJpsTestGenerated$WithJava$Other.testMultifileClassFileAdded
Fix test data and also remove useless marking of multifiles in KotlinBuilder after 2ee7f2b "incremental annotation processing environment" as it makes the same thing and all results are ignored

GitOrigin-RevId: 379eb3f350539cb1ee27098eecb28931df73b626
Original commit: https://github.com/JetBrains/intellij-community/commit/ee2865c35c2dadc3651518b2760b5176835b251c
2022-01-12 15:25:22 +01:00
Aleksei.Cherepanov dc9abef6e5 [CHERRY PICKED FROM IJ] [testdata] Fix Jps tests testdata
Fix test IncrementalJvmJpsTestGenerated$PureKotlin.testPackageFileAdded
Fix test IncrementalJvmJpsTestGenerated$Custom.testCommonSourcesCompilerArg
Fix test IncrementalJvmJpsTestGenerated$WithJava$JavaUsedInKotlin$SamConversions.testMethodAddDefault

GitOrigin-RevId: 63b7a47898ca42b4d7f11a01ceb0e019933f528b
Original commit: https://github.com/JetBrains/intellij-community/commit/e91bfb29e65b9eb5452c4d5f544f0bbfa3eafde3
2022-01-12 15:25:21 +01:00
Mikhail Zarechenskiy 0f0fa4736a [CHERRY PICKED FROM IJ] [kotlin] configuration: allow API version 1.3 with 1.6.x compiler
Starting from 1.6.0 the compiler supports three previous API versions, i.e., 1.3, 1.4, 1.5. Note that it's only about API versions, two previous language versions are supported as previously. See KT-49006 for details.

 ^KTIJ-19978 Fixed

GitOrigin-RevId: e1ba99ac25135959d8b81287850798a222643c88
Original commit: https://github.com/JetBrains/intellij-community/commit/d256c4653ab5aa730e522d282aed49a83f0c99f8
2022-01-12 15:25:21 +01:00
Aleksei.Cherepanov a4bf7c9772 [CHERRY PICKED FROM IJ] Fix JPS compilation
GitOrigin-RevId: a799879de2add4ca719307ddf9a143605468e731
Original commit: https://github.com/JetBrains/intellij-community/commit/9746206871853f44205b31dd8757ed2a4ad586ca
2022-01-12 15:25:21 +01:00
Aleksei.Cherepanov 2ea089f0d2 [CHERRY PICKED FROM IJ] Fix incremental build after changing Java const used as class property
Report Java static final constant with InlineConstantTracker, used as class property in Kotlin for further registration in JPS. Add tests.

#KT-49177 Fixed

GitOrigin-RevId: 01a58cf10f5419d70f0d80cbaa9bcd9732ff0547
Original commit: https://github.com/JetBrains/intellij-community/commit/d077f3b3217c8d88518fec7249228cb29df2e0ff
2022-01-12 15:25:20 +01:00