Commit Graph

109880 Commits

Author SHA1 Message Date
eugene.levenetc f7f779df53 [ObjCExport] Add inner classes translation
KT-66339
2024-03-13 08:10:21 +00:00
Vladimir Sukharev 5fee662223 [Tests] Add test for KT-57391
^KT-57391
2024-03-12 18:10:10 +00:00
Artem Kobzar 46dc478c03 [K/Wasm] Reduce debug information for the internal Kotlin functions 2024-03-12 17:37:03 +00:00
Nikolay Lunyak d3dfbec01a [FIR] Report warnings for inconsistent visibilities of accessors
K1 didn't report diagnostics for accessors
of intersection overrides, so this change
prevents a BC.

^KT-66046 Fixed
2024-03-12 16:35:05 +00:00
Nikolay Lunyak 7ecbaf7d1e [FIR] Calculate property setters visibilities for intersections properly
Basically, just calculate them the same
way it's done for other members.

`chooseIntersectionVisibilityForSymbolsOrNull`
is named like this to prevent a JVM clash.

^KT-66046 Fixed
2024-03-12 16:35:05 +00:00
Nikolay Lunyak b7926b68ab [FIR] Fix sources of intersection override properties's accessors
^KT-66046
2024-03-12 16:35:05 +00:00
Nikolay Lunyak daa6e03e3b [FIR] Reproduce KT-66046
^KT-66046
2024-03-12 16:35:05 +00:00
Dmitry Savvinov 08dc7aeee3 [native] Minor: remove PlatformManager.Serialized.serialVersionUUID
Leave a comment why it doesn't matter
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 55e36dcf66 [build, native] Minor: delete obsolete commented out code 2024-03-12 16:22:27 +00:00
Dmitry Savvinov b19ad2505c [native] Remove code support for experimental KonanTargets
ZEPHYR was the first and the last experimental KonanTarget.
As ZEPHYR is now entirely removed from the codebase, the respective code
can be dropped

^KT-64517
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 47546ece27 [tests] Adjust MppDiagnosticsIt after removing deprecated K/N targets (8/8)
Tests were using deprecated targets to produce ERROR-diagnostics.
Replace it with a different diagnostic
(CommonMainOrTestWithDependsOnEdges)

^KT-64517
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 9e8be97fbb [tests] Adjust ModuleChangesCatchingTest after removing K/N targets (7/8)
MPP_PLATFORMS has changed due to removal of deprecated K/N targets,
so the version and hashes had to be updated

^KT-64517
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 53cbeb8edc [build, native] Adjust buildscripts after dropping K/N targets (6/8)
- Restore PlatformManager constructor (used in buildscripts)
- Replace references to deprecated K/N target with 'else'

Why: buildscripts use these references and compile against older K/N
version (from bootstrap). So they can't be adjusted to newer API,
compilation will fail right away. However, they can't be kept without
changes, because bootstrap tests will fail.

^KT-64517
^KT-66500
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 8f3c0e71fa [native] Drop deprecated Kotlin/Native targets (5/8)
Adjust KGP: drop usages of deprecated KonanTargets, leave
@Deprecated-stubs in public APIs for readable errors

^KT-64517
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 4957d99fd6 [native] Drop deprecated Kotlin/Native targets (4/8)
We still want to report a readable error on using removed targets rather
than just an "Unknown target"-exception. As previous commits has removed
actual KonanTarget-entries, the check has to be adjusted to work on
plain strings.

^KT-64517
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 29e90d70c6 [native] Drop deprecated Kotlin/Native targets (3/8)
This commit inlines some helper-APIs that became redundant after
dropping deprecated targets.

Full list:
- 'threadsAreAllowed' is always 'true' now
- 'indirectBranchesAreAllowed' is always 'true' now
- 'supportsThreads' is always 'true' now
- 'isMips' is always 'false' now
- 'tlsMode' is always 'LLVMGeneralDynamicTLSModel' now
- 'getBoxRange' is always equal to 'cache.defaultRange' now
-  `targetHasAddressDependency` is always true now, so memory order
   is always LLVMAtomicOrderingMonotonic now

^KT-64517
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 85bcc8443d [native] Drop deprecated Kotlin/Native targets (2/8)
Remove plain references to removed KonanTarget or Family entries. All
the changes in this commit are simple removal of some when-branches
on now dropped entries

^KT-64517
2024-03-12 16:22:26 +00:00
Dmitry Savvinov 0f05ffe111 [native] Drop deprecated Kotlin/Native targets (1/8)
Remove sealed subclasses in KonanTarget and associated entries in
Family. This commit doesn't adjust use-sites in the codebase,
see the following commits for that

Implementation notes:
- we use @Deprecated object-stubs in place of previously used sealed
subclasses/enum entries to report readable error instead of plain
UNRESOLVED_REFERENCE on usages of deprecated FQNs.

- these object-stubs *are not* part of the respective sealed
hierarchy/enum class. This is to make it possible to remove
references to them from use-site entirely without breaking exhaustive
'when's

^KT-64517 Fixed
2024-03-12 16:22:26 +00:00
Mikhail Glukhikh 0b34d66b87 Revert "FIR: Report CAPTURED_VAL_INITIALIZATION if initialization is done"
This reverts commit 1c4023fda5.

#KT-64854 Submitted
#KT-59906 Submitted
2024-03-12 15:58:34 +00:00
Ilya Chernikov 0fe793943d K2, REPL: Display a warning that LV 1.9 is used for REPL in K2
#KT-64384 fixed
2024-03-12 15:57:00 +00:00
Alexander Shabalin 8c6966765b [K/N][tests] Move driver tests into their own project ^KT-61259 2024-03-12 15:42:06 +00:00
Alexander Shabalin 316614bc9e Revert "Revert "[K/N][Tests] Ignore KonanDriverTest tests on MinGW/opt.debug/cache.no""
This reverts commit 876be8f17a.
2024-03-12 15:42:06 +00:00
Alexander Shabalin 9832edddab Revert "Revert "[K/N][Tests] Migrate test override_konan_properties0 and add testDriverVersion""
This reverts commit 8518c3f54f.
2024-03-12 15:42:06 +00:00
Alexander Shabalin 60c74ab91a Revert "Revert "[K/N][Tests] Migrate test override_konan_properties0""
This reverts commit 4765cfda53.
2024-03-12 15:42:06 +00:00
Alexander Shabalin 3c097ee5e0 Revert "Revert "[K/N][Tests] Migrate driver test llvm_variant_dev""
This reverts commit dc4f12f29c.
2024-03-12 15:42:06 +00:00
Alexander Shabalin e95af641bc Revert "[K/N][tests] Restore ir_providers/hello.kt ^KTI-1597"
This reverts commit c600b74459.
2024-03-12 15:42:06 +00:00
Mikhail Glukhikh d897bfbcad Fix tests after a semantically conflicting merge of KT-50008 and KT-65596 2024-03-12 14:54:10 +00:00
Timofey Solonin e56a4c6edb Validate AGP 7.1.3 doesn't publish resources or assets
^KT-65540
2024-03-12 14:51:05 +00:00
Timofey Solonin 818368efa0 Assert Android compilations run
^KT-65540
2024-03-12 14:51:05 +00:00
Timofey Solonin 33c3cd47dc Simplify and improve MultiplatformResourcesConsumptionIT
* Generate dependencies in a less copypasty way
* Test a slightly more intricate graph of dependencies without resources
  in parts of the graph

^KT-65540
2024-03-12 14:51:05 +00:00
Brian Norman c6c0abae82 [FIR] Create test case to validate KT-56988 is working as expected
^KT-56988 Fixed
2024-03-12 14:48:39 +00:00
Igor Yakovlev b839e2680e [Wasm] Fix equality on Nothing type
Fixed #KT-66104
2024-03-12 14:36:45 +00:00
Igor Yakovlev 7c16528560 [Wasm] PL tests implementation for Wasm target
Fixed #KT-58088
2024-03-12 14:36:45 +00:00
Igor Yakovlev 6b66195afc [Wasm] Enable PL support for lowerings 2024-03-12 14:36:45 +00:00
Igor Yakovlev ec1ade1293 [Wasm] Allow virtual functions signature clash for PL support 2024-03-12 14:36:45 +00:00
Igor Yakovlev 8851ccc35d [Wasm] Allow incomplete implementations for PL 2024-03-12 14:36:45 +00:00
Igor Yakovlev 1e798a2527 [Wasm] Implement IrLinkageError end enable partial linker
KT-58088
2024-03-12 14:36:45 +00:00
Fedor Tolstonozhenko 6114264325 Fix wrong checksum generation
CI builds ignores org.gradle.internal.publish.checksums.insecure flag
when flag was passed as part of org.gradle.jvmargs.

^KTI-1482 Fixed
2024-03-12 14:10:57 +00:00
Pavel Punegov 84e1ab1663 [K/N] XCTest support build script fix
Fix XCTest destination in the cinterop setup.
`-iframework` should point to the directory containing the framework.


Co-authored-by: Cristian Garcia <Cristian.Garcia-Marin@jetbrains.com>

Merge-request: KT-MR-14804
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2024-03-12 13:24:30 +00:00
eugene.levenetc aaea1d6af2 [ObjCExport] Fix interface implementing interface
KT-66380
2024-03-12 12:48:15 +00:00
Dmitrii Krasnov f18d00e6f0 [Gradle] Changed the way of unpacking k/n dependencies
Creating `tar` process is not supported by configuration cache.
Inner Gradle copy and archive operations don't work well with symlinks.
That is why we are using utils from org.apache.commons:commons-compress.

^KT-66422 Fixed
2024-03-12 11:55:13 +00:00
Dmitrii Krasnov fb3c1f1a2f [Gradle] Disabled MissingNativeStdlibChecker when k/n toolchain enabled
This checker was added to check that k/n home was correctly overridden.
With k/n toolchain we always download k/n distribution.
That is why when k/n toolchain is enabled we don't need this check.

^KT-65624 Fixed
2024-03-12 11:55:13 +00:00
Ilya Chernikov 4fafa4b6e9 K2 IC: add lookups of candidates on tower level processing
Allow recording lookup to symbols from supertypes, required at least
for CRI.

partially fixes #KTIJ-29026
2024-03-12 11:38:07 +00:00
Ilya Chernikov 39b05a0a1c K2 IC: fix classifiers lookups
in particular nested classifiers and companions.

#KTIJ-24833 fixed
#KTIJ-24830 fixed
#KT-55195 fixed
2024-03-12 11:38:07 +00:00
Ilya Chernikov a823bfd600 K2 IC: refactor and optimize lookup tracking
- encapsulate semantic more into helpers
- allow lazy scopes iteration
- simplify reporting code in tower resolver
- fix some inconsistencies and wrong lookups
- remove redundant lookup recordings
- remove lookup scopes for non-star imports

The commit is a refactoring and doesn't change the behaviour of
neither IC nor CRI. Changes in the lookups are mostly due to the
previous obviously wrong lookups (see changed test data).
2024-03-12 11:38:07 +00:00
Ilya Chernikov fe4e0e9c2e K2 IC: fix class members lookups recording
in particular - statics

 #KTIJ-24830 fixed
2024-03-12 11:38:06 +00:00
Ilya Chernikov 1989e8f094 IC tests: add infrastructure for K1/K2 lookups comparison
Adapt lookup tests to allow running K1 and K2 on the same testdata
and compare the lookups recorded.
2024-03-12 11:38:06 +00:00
Ilya Chernikov 684d0b8690 K2 IC: filter out builtins lookups
Do not record lookups to kotlin builtins, since it is considered
useless.

Related to #KT-66417
2024-03-12 11:38:06 +00:00
Ilya Chernikov 5b62558798 K2 IC: fix member lookup recording
The previous code recorded only class name, instead of fqname,
as a scope of lookup.

#KT-65943 fixed
#KTIJ-24828 fixed
related to #KT-56197
2024-03-12 11:38:06 +00:00
Kirill Rakhman f38dc3999c [FIR] Reformat SignatureEnhancement 2024-03-12 10:29:45 +00:00