Commit Graph

98283 Commits

Author SHA1 Message Date
Dmitriy Novozhilov 4941fcd10e [FIR] Report PRIVATE_CLASS_MEMBER_FROM_INLINE on qualifiers of companions
^KT-56172 Fixed
^KT-55179
2023-01-31 07:53:12 +00:00
Dmitriy Novozhilov 522eec8c51 [FIR] Fix reporting PRIVATE_CLASS_MEMBER_FROM_INLINE on members of companion
^KT-56172
^KT-55179
2023-01-31 07:53:12 +00:00
Dmitriy Novozhilov d856ae1f35 [FIR] Move common members in symbols up in the hierarchy 2023-01-31 07:53:11 +00:00
Dmitriy Novozhilov a83caec94f [FE 1.0] Implement deprecation PRIVATE_CLASS_MEMBER_FROM_INLINE_WARNING warning
^KT-55179
^KT-56171 Fixed
2023-01-31 07:53:11 +00:00
Dmitriy Novozhilov d01a2c7271 [Test] Add test for KT-45814
^KT-45814 Can't reproduce
2023-01-31 07:53:10 +00:00
Dmitriy Novozhilov a1a9a55e1a [Test] Add test for KT-41952
^KT-41952 Obsolete
2023-01-31 07:53:09 +00:00
Dmitriy Novozhilov 4c96495eef [FIR] Put new contract syntax under feauture flag
^KT-55171 Fixed
2023-01-31 07:53:09 +00:00
Dmitriy Novozhilov 2783aa13f5 [Backend] Restore isMostPreciseContravariantArgument method for binary compatibility
^KT-56033 Fixed
2023-01-31 07:53:08 +00:00
Dmitriy Novozhilov 36bb418049 [Parcelize] Add test for KT-47074 2023-01-31 07:53:08 +00:00
Anton Lakotka 37007a28ac [Gradle] Report deprecated source set layouts outside after evaluate
^KT-55730 Verification Pending
2023-01-31 07:43:15 +00:00
Anton Lakotka 3c343543e9 [Gradle] Legacy metadata compilation should contain all source sets from
depends on closure of its default source set.

With HMPP it is no longer needed, since each source compiles
independently and sees its parent declarations via klib dependencies

^KT-55730 Verification Pending
2023-01-31 07:43:15 +00:00
Anton Lakotka 23f10a1d38 [Gradle] Deprecate case when commonMain depends on another source set
^KT-55824 Verification Pending
2023-01-31 07:43:14 +00:00
Artem Vasilev ccc3f52acf [FIR] Rename FirSyntheticPropertiesStorage, extract property creation 2023-01-30 20:05:51 +00:00
Artem Vasilev 075a80613b [FIR] Introduce cache for not-yet-enhanced synthetic properties
The original synthetic properties from Java were not cached anywhere and
created anew for every session. However, the enhanced properties are
(along with their originals) saved inside the session's cache, causing
inconsistency with newly created symbols via referential equality.
2023-01-30 20:05:50 +00:00
Pavel Kunyavskiy cb655d2d37 [K/N] Fix work with adapted function references
Their parsing was totally incorrect for K2, and sometimes incorrect for
K1. After this commit it uses same code as for JVM.

^KT-55462
2023-01-30 19:44:49 +00:00
Marco Pennekamp 9a693fa967 [FIR] Update backend tests with actual/expect in same module
- The fix for KT-55570 caused some backend tests to fail, because errors
  are now correctly reported for simple classes and actual/expect in
  the same module is not supported in FIR. See KT-55177.
- The commit also adds separate tests for K2. Unfortunately, these have
  to be disabled for K1 because K1 then reports "expect without actual"
  errors.
2023-01-30 17:17:58 +00:00
Marco Pennekamp d6cb75ca91 [LL FIR] KT-55329 Support transitive dependsOn dependencies in LL FIR
- In contrast to other kinds of dependencies, `dependsOn` dependencies
  must be followed transitively.
- Add `transitiveDependsOnDependencies` to `KtModule`. These
  dependencies are calculated lazily with a topological sort. They are
  added to the dependency provider when it's built in
  `LLFirSessionFactory`.

^KT-55329 fixed
2023-01-30 17:17:58 +00:00
Marco Pennekamp 1803bd36cc [FIR] Fix IncDecOperatorsInExpectClass for FIR, add multi-module test
- `IncDecOperatorsInExpectClass.kt` should produce an
  `ACTUAL_WITHOUT_EXPECT` in K2 (see KT-55177). This went unnoticed
  because of KT-55570.
- A similar multi-module test for K1 and K2 has been added, called:
  `multiplatform/incDecOperatorsInExpectClass.kt`.
2023-01-30 17:17:57 +00:00
Marco Pennekamp 2faa247075 [FIR] KT-55570 Fix ACTUAL_WITHOUT_EXPECT reporting for empty classes
- FirExpectActualMatcherTransformer: Instead of returning,
  `transformMemberDeclaration` must assign an empty map to
  `expectForActualData` so that `FirExpectActualDeclarationChecker`
  doesn't assume that the member declaration needs no expect-actual
  checking.

^KT-55570 fixed
2023-01-30 17:17:57 +00:00
Marco Pennekamp 7c96124a38 [LL FIR] KT-55329 Rename refinementDependency to dependsOnDependency
- The new Kotlin MPP name for `refinementDependency` is
  `dependsOnDependency`.
2023-01-30 17:17:57 +00:00
Svyatoslav Scherbina fa352fd20e Bump Kotlin/Native version to 1.9.0-dev-764 2023-01-30 16:46:51 +00:00
Nikolay Lunyak 5994a99dbb [FIR] KT-54507: Report redundant for abstract interfaces
^KT-54507 Fixed

Merge-request: KT-MR-8490
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
2023-01-30 16:45:20 +00:00
Svyatoslav Scherbina 7ef7d0e062 Native: fix Deprecation ObjCExport test after updating version to 1.9
Starting from language version 1.9, deprecation is not propagated
through overrides (see KT-47902 for more details).
As a result, after updating langauge version to 1.9 in 66544a4,
testObjCExport started to fail, because it expected the old behaviour.
This commit updates the test correspondingly.
2023-01-30 15:45:18 +00:00
Mikhail Glukhikh bf090cdc6d Add different black box tests around KT-52338 2023-01-30 14:55:41 +00:00
Mikhail Glukhikh f6bd4d5e15 Diagnostic tests: create fieldRename subDir and use it for related tests
Related to: KT-55846, KT-50082, KT-55436, KT-55017
2023-01-30 14:55:40 +00:00
Sebastian Sellmair 35c0a3d391 [Gradle] Keep stdlib-common for shared native source sets
^KT-56278 Verification Pending
2023-01-30 14:50:50 +00:00
Aleksei.Cherepanov 090a58ccc4 Change allConstants test
Currently, FIR compilation of `const val b: Byte = 50 + 50` shows an error, but old compiler doesn't (it shows only warning). Since this is an incremental test, it should not be affected by compiler errors, but should only test for .kt usage without recompilation.

#KT-54991 In Progress
2023-01-30 13:45:39 +00:00
Aleksei.Cherepanov a0fa438735 Revert "FIR IC: fix test with behavior different from non-tight cycle variants"
This reverts commit c4a29651 as it is no longer needed after IC fix: `5ba3053e` "[IC] Do not report recompilation of non-existing files", because now fix-ic-build.log duplicates the main build.log

#KT-54991 In Progress
2023-01-30 13:45:38 +00:00
Aleksei.Cherepanov 67f308dbdb Add dummy test data
Gradle IC with enabled FIR compilation adds some extra files to the compilation scope compared to the previous compiler(KT-55576). Adding dummy files to such tests with expanded compilation scope will prevent green Aggregate build if some changes in IC will lead to full module compilation as there were such precedents with JS IC because otherwise, all files in the module are present in the build log.

#KT-54991 In Progress
2023-01-30 13:45:38 +00:00
Aleksei.Cherepanov 848e1001f8 Add test for IC issue with typealias
If typealias is defined in a separate file, then after changing some base types, an incremental compilation of Kotlin could not find all affected files, because of lack of information, which it can not get on the class file analyzing phase. FIR provides a new approach to IC compilation: now we can run the frontend several times, which allows us to obtain all necessary information and use it to mark all affected files for recompilation.
Relates to KT-54991

#KT-28233 Fixed
2023-01-30 13:45:37 +00:00
Pavel Kirpichenkov 25668ddd01 [MPP] Do not postpone warning reporting for HMPP props to afterEvaluate
The check itself happens during application time, remove the health
check wrapper for reporting to make the code more clear. One downside is
that the warning could be reported on misconfigured projects, but it's
a minor inconvenience.

KT-55891
2023-01-30 13:21:00 +00:00
Pavel Kirpichenkov a03db78ed2 [MPP] Fix warning reports for subprojects
Properly report warnings for projects that don't apply multiplatform
plugin in the root project, but declare the obsolete properties

KT-55891
2023-01-30 13:21:00 +00:00
Pavel Kirpichenkov b0c360b1b6 [MPP] Change the deprecation message for HMPP properties
KT-55891
2023-01-30 13:21:00 +00:00
Pavel Kirpichenkov 37c87b0a84 [MPP] Don't report HMPP deprecation warnings on subprojects
MPP plugin applied to a root project leads to false positive reports
in its subprojects. Also, granular metadata flag is not supposed to be
set in subprojects. Reporting only for the root project should cover
most of the cases.

KT-55891
2023-01-30 13:20:59 +00:00
Mads Sig Ager 7c3cc1d5c1 [JVM_IR] Limit inner class attributes to types in class file (#5081)
* [JVM_IR] Limit inner class attributes to types in class file

Inner class attributes should only be recorded for types that
are materialized in the result class file. In particular, we
should not emit inner classes attributes for types that appear
only in fake overrides. We do map these types to track the
fake overrides for JVM signature clashes but they are not
materialized in the class file.

^KT-56104 Fixed

* [JVM_IR] Consistently pass around materialized boolean in mapType.
2023-01-30 14:11:07 +01:00
Pavel Punegov c9aeadd31f [K/N] Remove old Compiler and Meta Version ^KT-55677 Fixed
* Replace it with KotlinCompilerVersion
* K/N version should be set now with `deployVersion`.
* Cleanup deprecated functions in older versions
 of the Gradle plugin
* Cleanup tests for older versions of compiler downloader

Merge-request: KT-MR-8436
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-01-30 13:10:08 +00:00
Roman Golyshev 5ec626b29d [Analysis API] KTIJ-24453 Handle TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM error in KtFe10CallResolver.kt
It makes call with such type of errors completely unresolvable in
Analysis API

^KTIJ-24453 Fixed
2023-01-30 12:45:19 +00:00
Yahor Berdnikau 137e4b0422 Update duckduckgo benchmark
It is still not working due to koltin-androidx-extensions plugin usage.
2023-01-30 12:43:13 +00:00
Yahor Berdnikau 09ab70473d Update kvision benchmark 2023-01-30 12:43:13 +00:00
Yahor Berdnikau ff2de0e2b9 Also clean newly added files.
Some patches could add new file and after hard reset they are not
deleted. This leads to patch apply failure.

Updated JGit otherwise clean command was not working properly.
2023-01-30 12:43:12 +00:00
Yahor Berdnikau 5541d1d8a2 Update graphql-kotlin benchmark. 2023-01-30 12:43:12 +00:00
Yahor Berdnikau 3f4c824a23 Run benchmarks in the same suite
This should reduce variation in results, especially when overall time is
 quite low.
2023-01-30 12:43:12 +00:00
Sebastian Sellmair ace1bc76a1 [Gradle] IdeProjectToProjectCInteropDependencyResolver: Ensure lenient resolution
^KT-56285 Verification Pending
2023-01-30 12:42:05 +00:00
Marco Pennekamp 2f876a2094 [LL FIR] Pass correct session invalidators to LLFirSessionFactory 2023-01-30 12:39:42 +00:00
Yan Zhulanow fdf515baff [LL API] Add more logging to collectDesignationPathWithContainingClass() 2023-01-30 11:11:27 +00:00
Yan Zhulanow 699f96284a [FE] Add missing 'lazyResolveToPhase()' before recursive bound check
^KTIJ-24087 Fixed
2023-01-30 11:09:42 +00:00
Svyatoslav Scherbina 322a8a443b Native: add included forward declarations into cinterop klib manifest
This allows the compiler to limit imports from "magic" packages like
cnames.structs to forward declarations actually present in dependent
cinterop klibs.

The manifest already had `exportForwardDeclarations` field, but
- it didn't include Objective-C forward declarations (@class, @protocol)
- it has a slightly different meaning (the export list enables importing
  the listed declarations through the interop package of the library,
  while the include list shouldn't do that), so we better avoid mixing
  them.
2023-01-30 11:00:33 +00:00
Svyatoslav Scherbina 86a29a7b07 Native: correct ObjCExport test for forward declarations
The test relies on the fact that any name can be imported from a "magic"
package like `objcnames.classes`.
This was the case for K1, but likely won't be for K2: the compiler
should allow importing only those names that are actually
forward-declared in a cinterop library.

This commit changes the test that way. In particular, moves it to a
different task that has a cinterop dependency.
2023-01-30 11:00:32 +00:00
Svyatoslav Scherbina 445d44b79a K2/Native: simplify forward declarations test to make it work with K2 2023-01-30 11:00:32 +00:00
Svyatoslav Scherbina f3ed006ed9 Native: add a test for forward declarations with two cinterop libs 2023-01-30 11:00:31 +00:00