Commit Graph

99884 Commits

Author SHA1 Message Date
Pavel Kargashinsky abfd1aa9be Revert "[Gradle][Tests][MPP] Revert inheritance from MPPBaseTest in AbstractConfigurationCacheIT"
This reverts commit 8d1969df8af85870bc1d4b11932a33da2bc62222.
2023-04-03 11:30:41 +02:00
Aleksei.Cherepanov 5c039e25fc Pin API and language version to 1.8 for Kotlin facet serialization used by IJ
Facet serialization is located in Kotlin repo, and it uses new(1.9.*) stdlib in compile dependencies. But when it is used by IJ it has previous runtime stdlib dependency (looks like 1.8.0). So here is workaround, that specifies apiVersion and languageVersion, that does not produce such problematic outputs.

#KTIJ-24903 Fixed

Merge-request: KT-MR-9333
Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
2023-04-03 09:24:21 +00:00
Anton Lakotka 118c62cfbb [Gradle] Mark sourcesElements configurations as non-consumable
In case if `isSourcesPublishable` set to false.

^KT-57652 Verification Pending
2023-04-03 08:27:24 +00:00
Anton Lakotka 0b07a20a70 [Gradle] Don't expose sourcesElements when withSourcesJar(publish = false)
^KT-57652 Verification Pending
2023-04-03 08:27:24 +00:00
Anton Lakotka 1833347a7d [Gradle] Check that *sourcesElements is not exposed withSourcesJar(publish=false)
^KT-57652 In Progress
2023-04-03 08:27:23 +00:00
Kirill Rakhman 39d466b695 [FIR] Fix single quotes in diagnostic messages
Apparently two single quotes must be used when a parameter is used.
2023-04-03 07:53:55 +00:00
Abduqodiri Qurbonzoda 2f8e4a9775 [K/N] Deprecate ImmutableBlob
As a part of stabilizing Native stdlib.

Merge-request: KT-MR-9310
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-04-01 17:55:57 +00:00
Abduqodiri Qurbonzoda 8663239369 [K/N] Mark UnhandledExceptionHook-related API as experimental
As a part of efforts to stabilize Native stdlib.
2023-04-01 20:40:40 +03:00
Svyatoslav Kuzmich 02beaa1daa [Wasm] Add BuiltInsPlatform.WASM
Use it instead of BuiltInsPlatform.JS in klibs
2023-04-01 10:50:29 +00:00
Dmitrii Gridin faeafbbe29 [FIR][tree] replace FirDeclaration.resolvePhase -> resolveState
Lazy resolve state represents the lazy resolve
state of the current declaration
It can be either resolved or be in a process of resolve

^KT-56543
2023-04-01 06:53:27 +00:00
Dmitrii Gridin 77e1bc6f9e [LL FIR] calculate lazy bodies for type annotations
^KT-56543
2023-04-01 06:39:46 +00:00
Dmitrii Gridin badd09e4fd [FIR] TowerLevels: add missing lazy resolve
^KT-56543
2023-04-01 06:39:46 +00:00
Dmitrii Gridin eb2cfb3d62 [FIR] computeRepresentativeTypeForBareType: add missing lazy resolve
^KT-56543
2023-04-01 06:39:45 +00:00
Dmitrii Gridin 3ea1f7851b [FIR] add missing resolve to isFinalClassConstructor
fix checking for intersection types in CheckIncompatibleTypeVariableUpperBounds

we need this resolve, because getEmptyIntersectionTypeKind under
the hood uses org.jetbrains.kotlin.resolve.checkers.EmptyIntersectionTypeChecker.computeEmptyIntersectionEmptiness
which uses computeByHavingCommonSubtype where we have
isFinalClassConstructor() call, so we need to resolve to STATUS phase
to get the correct modality

^KT-56543
2023-04-01 06:39:45 +00:00
Pavel Kargashinsky 641b5d5fa7 [Gradle][Tests][MPP] Revert inheritance from MPPBaseTest in AbstractConfigurationCacheIT 2023-04-01 06:23:32 +00:00
Vladimir Sukharev 4b289e89c5 [K/N] Remove K1 prefix from native tests
Merge-request: KT-MR-9424
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-03-31 21:07:26 +00:00
Dmitriy Dolovov b7d0209e4b [PL] Disallow partial linkage when compiler is configured to produce KLIB
Partial linkage is intended for producing binaries, not libraries.
2023-03-31 18:29:44 +00:00
Dmitriy Dolovov 1fef48bb60 [PL] Log partial linkage messages at different severity
As specified in -Xpartial-linkage-loglevel CLI argument.
2023-03-31 18:29:44 +00:00
Abduqodiri Qurbonzoda d738646a61 [K/N] Move kotlin.native.internal.Cleaner to kotlin.native.ref.Cleaner
As a part of efforts to stabilize Native stdlib #KT-55765.


Co-authored-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
Co-authored-by: Ilya Gorbunov <Ilya.Gorbunov@jetbrains.com>

Merge-request: KT-MR-9347
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-03-31 16:04:26 +00:00
Marco Pennekamp d266f49c7c [LL FIR] KTIJ-25096 Add option to exclude binaries when incrementing modification trackers
- In performance tests, modification trackers were incorrectly
  incremented between tests for binary modules even with library caches
  enabled. The new option `includeBinaryTrackers` can be used by
  performance tests to exclude binary modules.
2023-03-31 15:40:14 +00:00
Nikolay Lunyak f0720c1d12 [FIR] Fix K2 behavior according to RULES1
The compiler should only report diagnostics for
comparisons over builtins and identity-less types,
other incompatibilities should be reported
via inspections.

It's ok that in `equalityChecksOnIntegerTypes`
instead of `EQUALITY_NOT_APPLICABLE_WARNING` we get
`EQUALITY_NOT_APPLICABLE`, because
`ProperEqualityChecksInBuilderInferenceCalls`
is already active by default.

This change also replaces the notion of a representative superclass
with the least upper bound.
This makes complex types like
intersection/flexible transparent to
RULES1-based compatibility checks.
One way to look at it is to think
that this is an automatic way of handling
type parameters: automatic picking of
"interesting" bounds, and checking them against one another.

Note that `TypeIntersector.intersectTypes`
for `Int` and `T` where `T` is a type parameter
may return both `{Int & T}` or `null`
depending on `T`-s bounds. At the same time,
for type parameters `T` and `K` it will
always return `{T & K}`.

`ConeTypeIntersector.intersectTypes`, on the
other hand, will always return `{Int & T}`
irrespectively of the bounds. Meaning, the two
intersectors differ in corner cases.

`lowerBoundIfFlexible` call in `isLiterallyTypeParameter` is backed by
the `equalityOfFlexibleTypeParameters` test.

^KT-35134 #fixed-in-k2
^KT-22499 #fixed-in-k2
^KT-46383 #fixed-in-k2
2023-03-31 15:01:50 +00:00
Nelson Osacky 06e687addd Upgrade Gradle Enterprise, CCUD
This upgrades the Gradle Enterprise Gradle Plugin and the Common Custom User Data Gradle plugin to the latest versions.

https://docs.gradle.com/enterprise/gradle-plugin/#release_history

https://github.com/gradle/common-custom-user-data-gradle-plugin/releases/tag/v1.9
2023-03-31 15:40:13 +02:00
Kirill Rakhman 38f0ac332d [FIR] Report INVISIBLE_REFERENCE in imports
#KT-55405 Fixed
2023-03-31 12:54:30 +00:00
Kirill Rakhman 7dde3603b5 [FIR] Report missing UNRESOLVED_IMPORT
#KT-54781 Fixed
2023-03-31 12:54:29 +00:00
Kirill Rakhman f18591ffef [FIR] Fix IllegalStateException on broken import
#KT-55316 Fixed
2023-03-31 12:54:28 +00:00
Dmitrii Gridin 691a1a683f [SLC] SymbolLightFieldForProperty: move STATIC modifier calculation to initial values
^KT-57569
2023-03-31 12:21:17 +00:00
Jinseong Jeon 98074c4849 SLC: merge field's static modifier setting 2023-03-31 12:21:17 +00:00
Jinseong Jeon 107b0229ef SLC: use partition to distinguish ctor properties from regular member properties 2023-03-31 12:21:16 +00:00
Jinseong Jeon 3c982cfaa3 SLC: mangle internal setter name 2023-03-31 12:21:16 +00:00
Jinseong Jeon 91925b947d SLC: fix visibility of lateinit var
^KT-57569 Fixed
2023-03-31 12:21:15 +00:00
Roman Golyshev 4e0b68b516 [Assign plugin] Use FqName to match annotations in FirAssignAnnotationMatchingService
All other compiler plugins accept "pkg1.pkg2.Class1" classes notation
and correctly match against it

But Assignment plugin used `ClassId` on such qualified names and got
`ClassId("/pkg1.pkg2.Class1")` instead of `ClassId("pkg1/pkg2/Class1")`,
and that lead to unexpected problems

This commit fixes that by using `FqName` instead of `ClassId`

^KT-57406 Fixed
2023-03-31 10:55:05 +00:00
Kirill Rakhman f035f80ad5 [FIR] Fix spelling and grammar of diagnostic messages 2023-03-31 10:35:09 +00:00
Dmitriy Novozhilov 96e9d690a6 [CLI] Prohibit passing HMPP module structure with CLI arguments to metadata compiler
^KT-57644 Fixed
2023-03-31 09:59:52 +00:00
Dmitriy Novozhilov b9c61bbc60 [FIR] Properly setup dependant module data for metadata compilation
^KT-57377 Fixed
2023-03-31 09:59:51 +00:00
Dmitriy Novozhilov b2e03035a9 [FIR] Properly load isExpect flag for constructors
^KT-57635 Fixed
2023-03-31 09:59:51 +00:00
Dmitriy Novozhilov 88d61173b6 [FIR] Don't run platform checkers during compilation to metadata
^KT-57376 Fixed
2023-03-31 09:59:51 +00:00
Mark Mann b6f669189b Use protocol name when creating objc protocol wrapper class 2023-03-31 09:50:25 +00:00
Sergey Bogolepov 51d441ee38 [K/N] Fix KT-57541
Root cause: commonizer does not add `ExternalObjCClass` annotation
to expect declarations, so forward declarations aren't resolved.

It is simpler (and safer) to fix it on the compiler side by checking
superclass instead of annotation.
2023-03-31 09:05:52 +00:00
Alexander Udalov 37c776b233 Add JVM target bytecode version 20
#KT-57495 Fixed
2023-03-30 19:05:41 +00:00
Artem Daugel-Dauge 7aeca2fda0 [Gradle] Split CocoapodsTasks and AdvancedCocoapodsTasks into separate files (2/2) 2023-03-30 18:48:17 +00:00
Artem Daugel-Dauge fc68873df7 [Gradle] Split CocoapodsTasks and AdvancedCocoapodsTasks into separate files (1/2) 2023-03-30 18:48:16 +00:00
Svyatoslav Scherbina f5532abd11 Native: support compileBitcodeWithXcodeLlvm=false binary option
This option makes the compiler use Kotlin/Native-provided LLVM
instead of Xcode-provided LLVM when compiling bitcode to machine code
for Apple targets.

^KT-54799 Fixed
2023-03-30 18:05:00 +00:00
Dmitriy Dolovov 1aa3e54459 [PL] Use CLI parameter -Xpartial-linkage with new semantics in Gradle plugin 2023-03-30 16:03:41 +00:00
Ilya Goncharov 39b385f475 [Gradle, JS] distribute resources with wasm file 2023-03-30 15:33:57 +00:00
Denis.Zharkov ca5789cec0 K2: Remove unreachable branch in when at SubstitutionOverrideCache
- It happens because FirSyntheticPropertySymbol <: FirPropertySymbol
- Also remove functions became unused

^KT-54345 Related
2023-03-30 14:43:30 +00:00
Pavel Kargashinsky 11e4cb12b7 [Gradle][Tests][MPP] Inherit mpp tests from MPPBaseTest 2023-03-30 12:55:24 +00:00
Pavel Kargashinsky d07fd15565 [Gradle][Tests][MPP] fix android namespace in mpp-composite test-data 2023-03-30 12:55:24 +00:00
Pavel Kargashinsky 5beba0acc6 [Gradle][Tests][MPP] Move BETA-versions test logic in MPPBaseTest 2023-03-30 12:55:23 +00:00
Pavel Kargashinsky 2a336140d2 [Gradle][Tests][MPP] set compileSdkVersion to 31 in new-mpp-adnroid test-data 2023-03-30 12:55:23 +00:00
Pavel Kargashinsky 91f38e76b8 [Gradle][Tests][MPP] Use JDK_17 for XCFrameworkIT and AppleFrameworkIT 2023-03-30 12:55:23 +00:00