Commit Graph

92774 Commits

Author SHA1 Message Date
Alexander Shabalin 20884d82eb [K/N] Modernize CompilationDatabase tasks
Merge-request: KT-MR-6276
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-05-25 21:49:35 +00:00
Jinseong Jeon c230a488e2 FIR LC: use the same module name as U/LC tests in IJ 2022-05-25 17:05:15 +02:00
Jinseong Jeon 1fe574f406 FIR LC: mangle internal function names 2022-05-25 17:05:14 +02:00
Jinseong Jeon c79601e616 FIR LC: utilize effective visibility retrieval for (overridden) members 2022-05-25 17:05:14 +02:00
Dmitriy Dolovov 992ef3db44 [Native][tests] Lower memory requirements for Gradle test tasks 2022-05-25 17:01:26 +03:00
sebastian.sellmair ae493e04c0 [kpm] kotlin-gradle-plugin-idea: Update version for backwards compatibility tests
... to "1.7.20-dev-1435 to bootstrap incompatible naming changes
for IdeaKotlin* -> IdeaKpm*
2022-05-25 13:15:48 +00:00
sebastian.sellmair efcdfab9a4 [kpm] Minor: GradleKpmFragmentInternal: Rename _directRefinesDependencies
... to _declaredRefinesDependencies to match the public counterpart
2022-05-25 13:15:47 +00:00
sebastian.sellmair c9a079f908 [kpm] serializationUtil.kt: Implement custom ClassLoaderObjectInputStream
Previously used the Gradle implementation, which had an undesirable
fallback for the case of missing classes in the given class loader.

For our tests, we want to ensure that only the specified class loader
is used.
2022-05-25 13:15:46 +00:00
sebastian.sellmair 7eb6288262 [kpm] kotlin-gradle-plugin: Introduce IdeaKpm* naming convention (2/2) 2022-05-25 13:15:46 +00:00
sebastian.sellmair 904fc00dde [kpm] kotlin-gradle-plugin: Introduce IdeaKpm* naming convention (1/2) 2022-05-25 13:15:45 +00:00
sebastian.sellmair 00edca4532 [kpm] kotlin-gradle-plugin-idea: Introduce IdeaKpm* naming convention (2/2)
Replace the pre-existing `IdeaKotlin` naming convention with `IdeaKpm`
2022-05-25 13:15:44 +00:00
sebastian.sellmair e2755b92aa [kpm] kotlin-gradle-plugin-idea: Introduce IdeaKpm* naming convention (1/2)
Replace the pre-existing `IdeaKotlin` naming convention with `IdeaKpm`
2022-05-25 13:15:43 +00:00
sebastian.sellmair d4dc6a3d71 [kpm] Introduce GradleKpm* naming convention (2/2)
All Gradle specific kpm entities shall be disambiguated by using
the `GradleKpm` prefix. For example `MyEntity` shall now be called
`GradleKpmMyEntity` and a subclass would be called like
`GradleKpmSpecialMyEntity`
2022-05-25 13:15:43 +00:00
sebastian.sellmair dcd47a89dd [kpm] Introduce GradleKpm* naming convention (1/2)
All Gradle specific kpm entities shall be disambiguated by using
the `GradleKpm` prefix. For example `MyEntity` shall now be called
`GradleKpmMyEntity` and a subclass would be called like
`GradleKpmSpecialMyEntity`
2022-05-25 13:15:42 +00:00
sebastian.sellmair e55f00c3d9 [kpm] Introduce Kpm* naming convention (2/2)
All Kpm owned entities shall be disambiguated by using the `Kpm` prefix
E.g. MyEntity has to be called KpmMyEntity and a subclass is called
KpmSpecialMyEntity
2022-05-25 13:15:41 +00:00
sebastian.sellmair 71677ad455 [kpm] Introduce Kpm* naming convention (1/2)
All Kpm owned entities shall be disambiguated by using the `Kpm` prefix
E.g. MyEntity has to be called KpmMyEntity and a subclass is called
KpmSpecialMyEntity
2022-05-25 13:15:40 +00:00
Mikhail Glukhikh 49175f83aa Analysis API FE10: fix delegated member rendering
After this commit,
Fe10IdeNormalAnalysisSourceModuleDelegateMemberScopeTestGenerated
passes properly
2022-05-25 12:04:59 +00:00
Mikhail Glukhikh 71b6151d51 KtFe10ScopeProvider: implement declared/delegated member scope 2022-05-25 12:04:58 +00:00
Mikhail Glukhikh 133f874351 Fix origin calculation in CliFe10AnalysisFacade
After this commit, all tests in
Fe10IdeNormalAnalysisSourceModuleFileScopeTestGenerated pass
2022-05-25 12:04:57 +00:00
Mikhail Glukhikh b710b26bf5 Fix KtFe10DescKotlinPropertySymbol.isDelegatedProperty 2022-05-25 12:04:57 +00:00
Mikhail Glukhikh 06bca02dd5 Fix REWRITE_ON_SLICE ANNOTATION in analysis API test
After this commit, all
Fe10IdeNormalAnalysisSourceModuleAnalysisApiAnnotationsOnFilesTestGenerated
pass
2022-05-25 12:04:56 +00:00
Mikhail Glukhikh b1d9b79712 KtFe10TypeRenderer: fix reflection & suspend type rendering
After this commit, all
Fe10IdeNormalAnalysisSourceModuleFunctionClassKindTestGenerated pass
2022-05-25 12:04:55 +00:00
Mikhail Glukhikh 049cab5207 Generate more FE10 analysis API tests 2022-05-25 12:04:54 +00:00
Yahor Berdnikau 6168679933 Fix JPS import
After recent changes 'jar' tasks in some projects were disabled.
I've also added to search in 'result' (kotlin-reflect) and 'shadowJar'
tasks for manifest.
2022-05-25 13:45:51 +02:00
Hung Nguyen 08e6eb07c1 [New IC] Reduce memory usage of classpath snapshot cache
- Remove soft references that are too old.
 - Compute memory usage based on Runtime.totalMemory() instead of
   Runtime.maxMemory() as the latter is not reliable.
 - Remove debug logs that haven't proved to be useful.
 - Collect metrics on the number of cache hits (in addition to cache
   misses).

#KT-52329 In Progress

[New IC] Reduce memory usage of classpath snapshot cache

Use object interning for commonly shared objects. These include:
  - supertypes of classes
  - package names of classes

One experiment showed that with the above optimization, memory usage was
reduced from 660 MB down to 280 MB (+ 4 MB for the interning pool).

More aggressive object interning didn't reduce memory usage much
further, but would increase interning overhead and code complexity, so
we didn't do this to more objects.

Note that this commit optimizes the size of classpath snapshots in
memory, not their serialized data on disk. (I attempted the latter,
but the size was only reduced from 160 MB down to 130 MB, while the code
complexity became much higher as multiple interning pools would need to
be stored to disk and later loaded from disk, each per classpath entry
snapshot or shrunk classpath snapshot.)

#KT-52329 Fixed
2022-05-25 12:59:20 +03:00
Yahor Berdnikau 8b17a42866 Fix main Gradle plugins variants were published unshadowed
The problem comes from "com.gradle.plugin-publish" plugin. It asks to
run 'jar' task even if this tasks outputs are removed from artifacts.
As 'jar' and shadow 'embeddedJar' tasks outputs has the same name and
'jar' task runs after shadow one - this leads to jar file overwrite.
And eventually publishing unshadowed artifact.
2022-05-25 10:21:45 +02:00
Ahmed El-Helw 93cb4d71d8 KT-51297: Allow suspend from any thread from ObjC
This patch adds a binary compiler argument to allow not crashing if a
suspend function is called from a non-Main dispatcher from ObjC or
Swift. This is relevant for people using the new memory model, in which
this restriction may be relaxed.
2022-05-25 09:24:22 +03:00
Pavel Kunyavskiy 2dac366dbc [K/N] Temporary disable privateSuperType test for native
^KT-52498
2022-05-24 21:15:25 +00:00
Jinseong Jeon e446c988ee FIR LC: populate default retention policy of annotations 2022-05-24 20:32:56 +02:00
Jinseong Jeon d196050d9f FIR LC: remove unnecessary bail-out in annotation util
There is another place below that handles the case
where no explicit annotations are bound, and there
unknwon nullability will be handled too.
2022-05-24 20:32:56 +02:00
Jinseong Jeon 58c2433bdd FIR LC: use unified annotations' ClassId (missed JvmName) 2022-05-24 20:32:55 +02:00
Jinseong Jeon 85388f0c79 FIR LC: correct static modifiers for accessors from companion 2022-05-24 20:32:55 +02:00
Jinseong Jeon a7a01a1f7e FIR LC: populate JvmStatic accessors from companion 2022-05-24 20:32:55 +02:00
Jinseong Jeon 63fb00fa21 FIR LC: revisit when to add fields to companion and/or containing class 2022-05-24 20:32:55 +02:00
Jinseong Jeon 89d1a6bc0f FIR LC: populate fields from companion in interface 2022-05-24 20:32:55 +02:00
Jinseong Jeon 0212e9daae FIR LC: always run with STDLIB (to handle JVM annotations) 2022-05-24 20:32:55 +02:00
Alexey Belkov 5f3e5f80d4 areParenthesesUseless: fix various false positives
The tests for this change will be committed to intellij repository
when it switches to the next Kotlin compiler containing the fix.

^KTIJ-21665
^KT-47159
2022-05-24 15:09:12 +00:00
Mads Ager 5147a9e42d Remove code that was migrated to android studio repo. 2022-05-24 14:52:01 +02:00
Mikhail Glukhikh 6f17a8713c Fix KT-47708 in FIR by transferring SAM annotations to synthetic constr. 2022-05-24 12:29:28 +00:00
Mikhail Glukhikh 9b6430d455 Cleanup: FirOverrideChecker 2022-05-24 12:29:28 +00:00
Mikhail Glukhikh 7c89f0188a FIR: resolve conflicts around SAM calls properly 2022-05-24 12:29:27 +00:00
Dmitriy Dolovov 93dad4837c [Native][tests] Don't log memory usage in Gradle build
Memory logging has been moved to the Native test infrastructure. It is performed during Gradle test runner execution.
2022-05-24 10:39:31 +00:00
Dmitriy Dolovov 70aaa212a5 [Native][tests] Track and report memory usage while tests are running 2022-05-24 10:39:30 +00:00
Dmitriy Dolovov 009e7f5c3a [Native][tests] Special logger to pass messages directly to Gradle console 2022-05-24 10:39:29 +00:00
Dmitriy Dolovov 1b9768a385 [Native][tests] Fix passing max heap space for Native compiler 2022-05-24 10:39:29 +00:00
Ivan Kylchik 07ba9be2e0 Fix error with interpreting name of java property 2022-05-24 08:25:17 +00:00
Yahor Berdnikau af6f17c243 Unify kotlinCompilerClasspath for all projects
This will prevent spawning second Kotlin daemon during compilation
except 'buildSrc' compilation. Original change was introduced in
2e515f3945 commit.
2022-05-24 07:58:38 +00:00
Yahor Berdnikau f016fd4766 Fix 'compilerDummyJar' configuration was not properly exposed
This fixes error:
Project :kotlin-daemon-embeddable declares a dependency from
configuration 'compilerDummyJar' to configuration 'compilerDummyJar'
which is not declared in the descriptor for
project :kotlin-compiler-embeddable.
2022-05-24 07:58:37 +00:00
Yahor Berdnikau e25778a719 Fix ConcurrentModificationException
This exception is happening on build configuration trying to remove
default jar task artifacts from published one. I've set 'jar' task
to be always disabled instead and just add shadow jar to artifacts.
2022-05-24 07:58:36 +00:00
Yahor Berdnikau cf2d03b914 Move common configuration from /build.gradle.kts into plugin
Move all common to all projects configuration from root build.gradle.kts
into common-configuration convention plugin.
2022-05-24 07:58:36 +00:00