Commit Graph

92742 Commits

Author SHA1 Message Date
Tianyu Geng 0803ab0d0b [Analysis API] Add KtFe10ReferenceResolutionHelper and ...
Make implementation of KtFe10XXXReference follow the old
descriptor-based implementation as closely as possible.
2022-05-27 15:37:33 +02:00
Tianyu Geng b5139c958b [Analysis API] Add KtReferenceMutateService...
and delegate renaming and rebinding to this new service for `KtReference`.

In addition, CliKtFe10XXXReference are all removed because it seems they are not necessary because the IDE flavor differs only by handling renaming, which is moved to a separate service.
2022-05-27 15:37:33 +02:00
Tianyu Geng 213e7154c2 Analysis API: remove unnecessary overwrite in KtFirSimpleNameReference 2022-05-27 15:37:32 +02:00
Alexander Udalov 70121f0c78 Report error on non-existent classpath in -Xplugin
#KT-52380 Fixed
2022-05-27 13:13:33 +02:00
Svyatoslav Scherbina c45a3d39b1 [Gradle, Native, IT] Add test for exporting published lib
This test checks that `transitiveExport = true` is no longer required
for exporting a published multiplatform library in a native library.
2022-05-27 07:58:33 +00:00
Svyatoslav Scherbina 045528e643 [Gradle, Native, IT] Add missing assertion 2022-05-27 07:58:33 +00:00
Sergej Jaskiewicz e9db050245 [JS] Optimize resolving paths when building source maps
`File.getCanonicalFile` follows symlinks, that is not necessary.
2022-05-26 16:32:07 +00:00
Sergej Jaskiewicz 375c13cd7e [JS] Add a doc comment for SourceMapLocationRemapper 2022-05-26 16:32:06 +00:00
Sergej Jaskiewicz 0614c519af [JS] Convert SourceFilePathResolver to Kotlin, fix usages 2022-05-26 16:32:05 +00:00
Sergej Jaskiewicz 4bf79cd23b Rename SourceFilePathResolver.java -> SourceFilePathResolver.kt 2022-05-26 16:32:04 +00:00
Vyacheslav Gerasimov 6a0fbce76a Build: Fix assemble task of :kotlin-native:runtime 2022-05-26 10:49:24 +00:00
Pavel Punegov 8afe203f39 [K/N] Remove obsolete generator project 2022-05-26 10:37:30 +00:00
Pavel Punegov dbd383aa2a [K/N] Fix kotlin gradle plugin usage in build-tools 2022-05-26 10:37:29 +00:00
Pavel Punegov cda0308760 [K/N] Fix kotlin-native-shared usage in build-tools 2022-05-26 10:37:29 +00:00
Pavel Punegov 83c2b3657f [K/N] Fix build-tools project compilation
Add necessary subprojects and dependencies
Add OptIn annotation for experimental stdlib methods in 1.5
Fix compilation errors and cleanup
2022-05-26 10:37:28 +00:00
Alexander Shabalin 00892c2903 [K/N] Add SAM with receiver plugin
(cherry picked from commit a58e2459c6)
2022-05-26 10:37:27 +00:00
Pavel Punegov 987930a0e5 [K/N] Add build-tools as a module for IDEA
Adds a module to project making it able to use analysis
and syntax highlight

(cherry picked from commit c545fd5ef8)
2022-05-26 10:37:26 +00:00
Pavel Kunyavskiy be2c92a0bd [K/N] Patch mimalloc to avoid using clock_gettime on apple targets
^KT-52430
2022-05-26 10:32:12 +00:00
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