Commit Graph

482 Commits

Author SHA1 Message Date
Sebastian Sellmair d103f60af8 [Commonizer] Demote duplicate dependency libraries to 'warning'
^KT-56729 Verification Pending
2023-02-20 16:30:10 +00:00
Sebastian Sellmair 513f4a3c42 [Commonizer] Commonize 'HAS_ENUM_ENTRIES' flag
^KT-56207 Verification Pending
2023-02-06 18:36:37 +00:00
Nikita Bobko 62b27b4613 Cleanup: drop KlibIrVersion
Review: https://jetbrains.team/p/kt/reviews/8401
In scope of: KT-55082

Because this version isn't used for anything. We have KotlinAbiVersion
to version the IR format.
2023-02-01 15:13:34 +01:00
Dmitriy Novozhilov 993695a7d0 [Commonizer] Mute tests due to KT-56207 2023-01-30 09:30:00 +00:00
Roman Efremov 2dc3871954 Add "hasEnumEntries" class flag to kotlinx-metadata
^KT-53929 Fixed
2023-01-23 12:53:06 +01:00
Mikhail Glukhikh 89dd28226b BinaryVersion: introduce isCompatibleWithCurrentCompilerVersion 2023-01-16 18:12:55 +01:00
Sergej Jaskiewicz 1539d7ef1a [klib] Bring package names in sync with the directory layout
Basically, some package names were Native-specific, whilst the packages
themselves were not Native-specific at all. This was already reflected
in the directory layout, but not in the package names.
This is fixed here.

NFC, just an automatic rename of packages with fixes of imports.
2022-12-01 21:46:43 +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
Anton Lakotka 1b3cc0dfaa [Gradle] Register watchosDeviceArm64 in commonizer
^KT-53107
2022-10-05 19:32:03 +00:00
Sergey Bogolepov 289f540530 [Commonizer] workaround for CoreGraphics from Xcode 14 2022-10-05 09:59:10 +00:00
Nikita Bobko 70ed76e0bd Drop unused ':dist' dependency in some tests
Review: https://jetbrains.team/p/kt/reviews/6753

This commit doesn't fix any issue except for "cleanup". If you find a
mistake in this commit feel free to revert part of it/the whole commit

I checked every module where I drop ':dist' dependency. Tests still pass
in those modules
2022-08-22 15:42:34 +02:00
Aurimas e2ac24cc90 Make sure to sort klib manifest data
Not sorting results in non reproducible output causing up-to-date check failures
2022-06-24 07:43:01 +00:00
sebastian.sellmair 204bc4ca95 [Commonizer] Provide union of forwardDeclarations as common dependencies
^KT-52050 Verification Pending

The issue described in KT-52050 happened, because forwardDeclarations
were not carried into next commonization steps. For commonization
it is fair to choose the union of all modules forwardDeclarations
as common dependency (instead of a union), since we can assume that
all those forward declarations will be provided.
2022-04-22 08:47:39 +00:00
Pavel Kirpichenkov 621f14c5bb [MPP] Improve creation of @UnsafeNumber w.r.t. non-aliased types and PIC
^KT-51643
2022-03-25 16:22:25 +00:00
sebastian.sellmair 25c5d99a0c [Commonizer] Separate nullability from type substitution
^KT-51686 Verification Pending
2022-03-25 09:06:12 +00:00
sebastian.sellmair a08fdcf371 [Commonizer] Substitute type arguments when argument type is ClassOrTypeAlias type
^KT-51686 Verification Pending
2022-03-25 09:06:11 +00:00
sebastian.sellmair 4e16e506bb [Commonizer] Test: Be more lenient on missing abbreviated type in reference
After commonization a type might additionally reference a abbreviated
type which is not present in the reference module's metadata.

This was even considered 'OK' before this commit, however only
under a special condition which might be too strict.

Right now, this newly introduced test will only enter the
newly allowed branch. This shall be re-reviewed later.

KT-51686
2022-03-25 09:06:11 +00:00
sebastian.sellmair 00d1d777d5 [Commonizer] Implement tests covering KT-51686 2022-03-25 09:06:11 +00:00
Pavel Kirpichenkov 9162faaf39 [MPP] Fix incorrect reuse of type argument commonizer
If the same NullableSingleInvocationCommonizer is reused for any reason,
it will store next inputs alongside previous, which is totally not
expected

^KT-51528 Fixed
2022-03-10 17:54:19 +03:00
sebastian.sellmair 14046b81ff Replace transitiveClosure (commonizer-api) with closure (tooling-core) 2022-03-09 13:17:06 +00:00
Pavel Kirpichenkov 1e925b5937 [MPP] Allow commonization of platform types in leaf targets
Costs little right now and is more robust for potential future uses of
platform types in native libraries or cinterops.

KT-41509
2022-02-28 10:59:44 +03:00
Pavel Kirpichenkov 867390b889 [MPP] Move integer names used by commonizer to its module
KT-41509
2022-02-28 10:59:42 +03:00
Pavel Kirpichenkov f257297505 [MPP] Commonize to platform integers considering target's bit width
Commonized type should match the platform's `platform.posix.ssize_t`
type alias' width. The implementation hard-codes platform widths for
all the targets, this can be potentially changed to search for ssize_t
in dependencies and get width from its type.

Use real targets in platform int commonization tests.

KT-41509
2022-02-28 10:59:38 +03:00
Pavel Kirpichenkov 8f4d04dad2 [MPP] Add preliminary version of platform integer commonizer
Doesn't take target's size_t alias into account just yet

KT-41509
2022-02-28 10:59:36 +03:00
Pavel Kirpichenkov b8ee473107 [Commonizer] Improve error messages for tests 2022-02-28 10:59:34 +03:00
Pavel Kirpichenkov 6674c3f482 [MPP] Apply @UnsafeNumber to functions and properties
KT-51224
KT-51215
2022-02-17 13:17:13 +03:00
Pavel Kirpichenkov a220624769 [Commonizer] move commonizer setting keys to the commonizer-cli module
Get rid of `OptionAlias` as unnecessary; keys will be used directly
2022-01-28 12:22:50 +03:00
Pavel Kirpichenkov b17737d7de [Commonizer] minor: rename type commonizer options
Call it `context` to make more distinguishable from the global settings
2022-01-28 12:22:50 +03:00
Pavel Kirpichenkov 2609175d58 [Commonizer] Introduce commonizer settings
Add settings for a more fine-grained control over commonizer features
that will be added in the future

Add setting and KGP flag for optimistic number commonization

KT-51011
2022-01-28 12:22:50 +03:00
Anton Lakotka 49ba3d239c [Commonizer] Enable Optimistic Number Commonization by default
Initially it was restricted to work with type aliases only KT-48455
see test `test property with aliased number return type`

This limitation should be lifted now in order to fix KT-48568

^KT-48568 Verification Pending
2022-01-10 08:46:54 +00:00
Ilya Kirillov 49e9c47071 Move DynamicTypeDeserializer.id from IR module to common module
So, it can be used from cls-psi-stub-builder module
2021-12-27 16:23:06 +03:00
Vyacheslav Gerasimov f7a9065b75 Build: Use intellij maven repo instead of downloaded IDEA
#KTI-82
2021-12-16 21:48:23 +03:00
Vyacheslav Gerasimov bc2f0936bd Build: Rename commonDep -> commonDependency 2021-12-16 21:48:19 +03:00
Starlight220 e77f72071d migrate KmValueParameter.type (KmType? -> lateinit KmType) 2021-10-26 18:21:38 +02:00
Dmitriy Novozhilov 9baf10cfcc [Build] Remove forgotten comment from build config 2021-10-12 17:26:33 +03:00
Pavel Kirpichenkov 5e874bc3c5 [Commonizer] Check errors in code of commonization tests 2021-10-11 13:00:40 +00:00
Dmitriy Novozhilov e933c7b6d9 [Build] Remove testApi(intellijDep()) dependencies from all modules
Since IDEA moved most of it's jars to java 11 it's illegal to use them
  in our dependencies, so all modules which use `intellijDep()` should
  carefully specify which jars they use
2021-09-30 14:41:31 +03:00
sebastian.sellmair a279f682bb [Commonizer] Add additional documentation to ClassOrTypeAliasTypeCommonizer
^KT-48288
2021-09-22 06:45:12 +00:00
sebastian.sellmair 6d17e4da57 [Commonizer] Implement disabled tests for ^KT-48288
^KT-48288
^KT-48850
2021-09-22 06:45:11 +00:00
sebastian.sellmair 104d2b347b [Commonizer] Minor: CirType: Use copyInterned over createInterned
^KT-48288
2021-09-22 06:45:11 +00:00
sebastian.sellmair 3b67bcbf4d [Commonizer] ClassOrTypeAliasTypeCommonizer: Remove faulty argument substitution
Underlying types from CirTypeAliasType do not require
parent argument replacement.

^KT-48288
2021-09-22 06:45:11 +00:00
sebastian.sellmair 7bf62ab159 [Commonizer] Implement tests for 'crossed' type aliases
^KT-48288
2021-09-22 06:45:10 +00:00
sebastian.sellmair 1fca19258d [Commonizer] ParameterizedTypesCommonizationTest: Remove unnecessary symbols
^KT-48288
2021-09-22 06:45:10 +00:00
sebastian.sellmair fa2577dda8 [Commonizer] Improve performance of deserialization
^KT-48288
2021-09-22 06:45:09 +00:00
sebastian.sellmair 16bf5f3df3 [Commonizer] Improve performance of ClassOrTypeAliasTypeCommonizer
Performance is improved by reducing calls to 'backwardsTypeDistance'

^KT-48288
2021-09-22 06:45:09 +00:00
sebastian.sellmair 64d2ba4029 [Commonizer] Improve performance of 'backwardsTypeDistance'
This commit also introduces common sealed interfaces to represent
classifiers and types coming form dependencies or 'sources'

^KT-48288
2021-09-22 06:45:09 +00:00
sebastian.sellmair fadb91fa35 [Commonizer] Rename CirCommonClassifierId to AssociatedClassifierIds
^KT-48288
2021-09-22 06:45:08 +00:00
sebastian.sellmair de1ae970d7 [Commonizer] ClassOrTypeAliasTypeCommonizer: Improve comments
^KT-48288
2021-09-22 06:45:08 +00:00
sebastian.sellmair 7485d2529b [Commonizer] Implement simple BackwardsTypeSubstitutionCommonizationTest
^KT-48288
2021-09-22 06:45:07 +00:00
sebastian.sellmair 38c7337b19 [Commonizer] Add tests to ParameterizedTypesCommonizationTest
^KT-48288
2021-09-22 06:45:07 +00:00