Commit Graph

107404 Commits

Author SHA1 Message Date
Mikhail Glukhikh 44aa2d86d3 K2: add test to reproduce KT-64266 2023-12-20 12:47:59 +00:00
Ilya Goncharov 81efc8d7c7 [Gradle, JS] Replace outputFileProperty onto Binary's mainFile
^KT-63435 fixed
2023-12-20 12:36:28 +00:00
Nikolay Krasko d3322d515f Update list of compose modules 2023-12-20 12:18:18 +00:00
Nelson Osacky 94f83a5891 Update "Revved up by Develocity" badge 2023-12-20 11:41:40 +01:00
Vladimir Sukharev 26b626c8cf [K/N][Tests] Add test for KT-64276
^KT-64276
2023-12-20 07:15:52 +00:00
Vladimir Sukharev 85882413db [K/N] Fix approach of expected failures caused by outputCheck fail.
`Expected failure flag` was wrongly included in list of test checks.
However, the nature of checks and this flag is different:
- any test check can pronounce the test as failed.
- `Expected failure flag` must invert the accumulated effect of all checks.
Having flag as an additional check cannot catch usecase,
when test is failed only by producing wrong stdout.

This commit extracts this flag out of check list.

^KT-59288
2023-12-20 07:15:35 +00:00
Vladimir Sukharev bb8a7b6795 [K/N][Tests] Adjust moved tests interfaceCallsNCasts..vector to new infra
^KT-61259
2023-12-20 07:07:27 +00:00
Vladimir Sukharev 93642020ff [K/N][Tests] Move codegen test sources interfaceCallsNCasts..vector
^KT-61259
2023-12-20 07:07:27 +00:00
Alexander Korepanov 56e1c5cbc6 [JS IR] Add comments about JS IR BE IC 2023-12-20 06:34:13 +00:00
Anastasiia Spaseeva 389095e8f7 [K/N]: Do not deploy files containing checksum strings to a Maven repo
^Related to KTI-1479
2023-12-20 00:23:39 +00:00
Anna Kozlova 21bdf22249 [AA] support KDoc reference resolve in fragments
test in monorepo QuickDocNavigationTest#testTopLevelFunShortName

KTIJ-27582
^KTIJ-27760 fixed
2023-12-19 19:05:26 +00:00
Troels Bjerre Lund b668433256 [CLI] Add cache for reflection lookup of CLI arguments
Add cache for reflection lookup of CLI arguments.

Replace CLI argument list with map.

The current cli parser tries to match every possible command line
argument against each command line argument, essentially in a double
loop. This fix replaces one of the loops with a map lookup. Building the 
map is not expensive, and pays for itself even with a modest number of
parameters. The map is cached between calls, making subsequent calls
much cheaper. If run in a daemon, repeatedly parsing, e.g., 250 
arguments, this speeds up argument parsing by a factor 20. 

Disallow -shortName=value in CLI arguments.

Co-authored-by: Troels Lund <troels@google.com>
2023-12-19 17:05:03 +00:00
Dmitrii Gridin 357015f399 [FIR] FirFakeOverrideGenerator: drop fake attributes from value parameters
We can find corresponding parameters by the containing function symbol.
Analysis API part is covered by tests from:
* FirIdeNormalAnalysisSourceModuleResolveCandidatesTestGenerated
* FirIdeNormalAnalysisSourceModuleResolveCallTestGenerated
* FirIdeNormalAnalysisSourceModuleTypeScopeTestGenerated

^KT-64243
2023-12-19 16:21:57 +00:00
Dmitrii Gridin ed6a67b26d [LL FIR] proper lazy resolution support for fake declarations
Fake declarations do not require any context to be resolved, so we are
able to resolve them not only for non-local classes.
They share most states with the real declaration, so mostly they are
resolved through `LLFirTargetResolver.resolveDependencies`.
The next step is KT-64363

^KT-64243 Fixed
2023-12-19 16:21:57 +00:00
Dmitrii Gridin c3e6dd12a2 [FIR] FirFakeOverrideGenerator: generate fake declaration with STATUS phase
The requirement for original declarations is to have resolved status,
so we can set at least `STATUS` phase for copied ones. This fixes the
problem that fake declarations for local declarations can have `RAW_FIR`
phase due to the copy from the original declarations, as during body
resolution all local declarations have only this phase.
Another issue: we cannot set the phase from the original declaration
as it is not guaranteed that we will have everything in the resolved
state. E.g., we can have the original declaration in `BODY_RESOLVE`
phase, but at the same time a containing class for fake declaration
can be in `STATUS` phase, for example. This means that the fake
declaration can have unresolved type annotation as it has them
from both places – from the original declaration and from the class
super type.
To simplify the code, we can just always set STATUS phase to be sure
that everything is resolved correctly.

Also, so we can optimize the logic for all phases above on Low Level FIR
level

^KT-64243
2023-12-19 16:21:57 +00:00
Dmitrii Gridin 835a9632b9 [FIR] FirFakeOverrideGenerator: use stub expression instead of original default value
We shouldn't copy the default value from the original declaration as is
as it won't be resolved correctly in some cases. It is enough to use
STUB as it will highlight the fact that we have some default value.
In LLFirBodyTargetResolver we shouldn't try to resolve fake declarations
as they don't have bodies and everything should already be resolved

^KT-64243
2023-12-19 16:21:57 +00:00
Dmitrii Gridin c9f11ad74f [FIR] FirFakeOverrideGenerator: unify value parameter copy between regular functions and property accessors
This commit contains:
* correct containingFunctionSymbol for value parameter from accessors
* correct choose between originalForIntersectionOverrideAttr and
originalForSubstitutionOverrideAttr for value parameters from functions

^KT-64243
2023-12-19 16:21:57 +00:00
Dmitrii Gridin 4a87ae9e04 [LL FIR] fix type annotations resolution for fake override declarations
Fake overrides have annotations from a class from which type parameters
were substituted, so we have to resolve them before the declaration.
It worked before in most cases as an original containing class is a part
of the designation path, so we considered annotations from such classes
as our and just resolved them in the wrong scope without right locks

^KT-64243
2023-12-19 16:21:57 +00:00
Dmitrii Gridin b6f0571f0b [LL FIR] introduce lazy resolution tests for fake overrides
^KT-64243
2023-12-19 16:21:57 +00:00
Dmitrii Gridin 6ffa8e6e98 [LL FIR] LLFirResolveTarget: make firFile property optional
Not all targets belonged to any files (e.g., fake overrides),
so we should be able to resolve them without a provided file

^KT-64243
2023-12-19 16:21:57 +00:00
Dmitrii Gridin a7cfbe6d50 [LL FIR] drop redundant usages of LLFirResolveTarget.firFile
After 6893c44a 'target' can be used in many cases

^KT-64243
2023-12-19 16:21:57 +00:00
Sergej Jaskiewicz 1b557c1657 [IR] Mark IrExpressionBodyImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:02 +00:00
Sergej Jaskiewicz 2096d22e18 [IR] Mark IrBlockBodyImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:02 +00:00
Sergej Jaskiewicz f482b6a458 [IR] Mark IrValueParameterImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:02 +00:00
Sergej Jaskiewicz b56a04e796 [IR] Mark IrTypeParameterImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:02 +00:00
Sergej Jaskiewicz 8f2201b7a8 [IR] Mark IrTypeAliasImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:02 +00:00
Sergej Jaskiewicz 9845ca801e [IR] Mark IrPropertyWithLateBindingImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:02 +00:00
Sergej Jaskiewicz c393736473 [IR] Mark IrPropertyImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:02 +00:00
Sergej Jaskiewicz 2953d9ec90 [IR] Mark IrLocalDelegatedPropertyImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:02 +00:00
Sergej Jaskiewicz d493d76dc7 [IR] Mark IrFunctionWithLateBindingImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:02 +00:00
Sergej Jaskiewicz 41197392f9 [IR] Mark IrFunctionImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:01 +00:00
Sergej Jaskiewicz e1d03f6540 [IR] Mark IrFieldImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:01 +00:00
Sergej Jaskiewicz cd014c57a5 [IR] Mark IrErrorDeclarationImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:01 +00:00
Sergej Jaskiewicz 28a0d0c6aa [IR] Mark IrEnumEntryImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:01 +00:00
Sergej Jaskiewicz 444dcae93d [IR] Mark IrConstructorImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:01 +00:00
Sergej Jaskiewicz 2fab853700 [IR] Mark IrClassImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:01 +00:00
Sergej Jaskiewicz 8aacb59aec [IR] Mark IrAnonymousInitializerImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:01 +00:00
Leonid Startsev 22709bcb18 Add missing documentation to KmVersionRequirement.toString
so the documentation publishing to website will not fail.
2023-12-19 15:42:55 +00:00
Leonid Startsev 2405d644a3 Raise all deprecations in kotlinx-metadata-jvm to ERROR
as 0.8.0 had them as WARNINGs.

#KT-63157 Fixed
2023-12-19 15:39:14 +00:00
Sergej Jaskiewicz a1970d3d57 [K/N] Move KonanIrModuleSerializer to serialization.native
KT-64392
2023-12-19 15:20:01 +00:00
Sergej Jaskiewicz 199d9d4880 [K/N] Move KonanDeclarationTable to the serialization.native module
KT-64392
2023-12-19 15:20:01 +00:00
Sergej Jaskiewicz 3f9de91bec [K/N] Move KonanIrFileSerializer to the serialization.native module
KT-64392
2023-12-19 15:20:01 +00:00
Sergej Jaskiewicz a032db500c [K/N] Move KonanFakeOverrideClassFilter to serialization.native
KT-64392
2023-12-19 15:20:01 +00:00
Sergej Jaskiewicz ff1b618dfd [K/N] Move KonanIdSignaturer to the serialization.native module
KT-64392
2023-12-19 15:20:01 +00:00
Sergej Jaskiewicz 7e3b909394 [K/N] Move some utils to the serialization.native module
KT-64392
2023-12-19 15:20:01 +00:00
Sergej Jaskiewicz 69cdf2d3ea [K/N] Move ModuleDescriptor#isFromInteropLibrary to util-klib-metadata
KT-64392
2023-12-19 15:20:01 +00:00
Sergej Jaskiewicz e521ed9dc3 [K/N] De-duplicate BaseKotlinLibrary#isInteropLibrary
KT-64392
2023-12-19 15:20:00 +00:00
Dmitriy Dolovov 61282fcaeb IR text tests: New tests specifically for main functions mangling
^KT-57755
2023-12-19 14:24:16 +00:00
Dmitriy Dolovov af247c3344 IR text tests: Unmute tests that have main function
Don't use `main` function in these tests, because `main` function
has specific mangling rules in JVM. Use other function name.

^KT-57755
2023-12-19 14:24:16 +00:00
Dmitriy Dolovov 1759b9e3c4 IR text tests: Use suffix 'by Frontend' for FIR & descriptor based signature mangled names
IrMangledNameAndSignatureDumpHandler can dump either signature mangled
names by Fir or by descriptors, but not both at the same time. And
mangled names should be equal to preserve ABI compatibility.

^KT-57788
2023-12-19 14:24:16 +00:00