Commit Graph

130 Commits

Author SHA1 Message Date
Sergej Jaskiewicz c624bba8cd [klib] Introduce the "ir_signature_versions" in klib manifests
^KT-60576 Fixed
2023-07-21 12:51:47 +00:00
Dmitriy Dolovov 56bebeaf92 [KLIB] Extract "ir_provider" manifest property name as a const val, p.2 2023-06-17 01:00:04 +00:00
Dmitriy Dolovov 72525a22a6 [KLIB] Extract "ir_provider" manifest property name as a const val 2023-06-15 11:07:30 +00:00
Pavel Punegov 47c7dfe6b4 [K/N][klib] Wrap library dependencies with quotation marks
Fixes ^KT-58537. Space in the library now should be correctly parsed now
Klib readers can already read this
2023-06-05 14:40:11 +00:00
Dmitriy Dolovov 161fe1d2ca [IR] Don't produce gaps for skipped IR declarations during serialization 2023-05-30 10:14:08 +00:00
Alexander.Likhachev 44d9a2136b Bump language version for Gradle plugins' dependencies to 1.5
#KT-58569 Fixed
2023-05-12 12:59:39 +00:00
Nataliya.Valtman 2a391f7330 Move kotlin-build-statistic project to :compiler 2023-04-25 11:29:09 +00:00
nataliya.valtman e34dd043da Add minimal statistic report for JPS build
Fix build stat for gradle 8

#KT-56438 Fixed
2023-04-25 11:29:09 +00:00
Svyatoslav Kuzmich 02beaa1daa [Wasm] Add BuiltInsPlatform.WASM
Use it instead of BuiltInsPlatform.JS in klibs
2023-04-01 10:50:29 +00:00
Pavel Punegov aed6272107 [K/N] Merge :kotlin-native-shared with :native:kotlin-native-utils
* Code was moved to utils, but sources are included to the shared
until bootstrap advance.
* Fixed dependencies and set API & LV to 1.4 for the modules used with
Gradle.

Merge-request: KT-MR-9122
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-03-10 12:57:35 +00:00
Alexander Korepanov e4406638bd [KLIB] Add ZIP file system accessor
The accessor interface is used for reading klib archives in place.
2023-03-10 09:38:51 +00:00
Nikita Bobko 770d6a4708 Bump KotlinAbiVersion for Enum.Entries
^KT-55808 Fixed
Review: https://jetbrains.team/p/kt/reviews/8401

If I don't bump `versions.kotlin-native` then locally
`kotlinx.coroutines` & `kotlinx.atomicfu` user projects compilation
fails with message:
```
w: skipping /home/bobko/jb/kotlinx-atomicfu/atomicfu/build/classes/kotlin/metadata/commonMain. Incompatible abi version. The current default is '1.7.0', found '1.8.0'. The library produced by 1.8.255 compiler
e: Could not find "/home/bobko/jb/kotlinx-atomicfu/atomicfu/build/classes/kotlin/metadata/commonMain" in [/home/bobko/jb/kotlinx-atomicfu, /home/bobko/.konan/klib, /home/bobko/.konan/kotlin-native-prebuilt-linux-x86_64-1.8.20-dev-5812/klib/common, /home/bobko/.konan/kotlin-native-prebuilt-linux-x86_64-1.8.20-dev-5812/klib/platform/linux_x64]
```

It worth noticing that we hardcoded "1.9.0-dev-693" on CI
(kotlin-teamcity-build/6693cb229c7485e07241fbc28322344774bcc3e0) to
workaround KTI-1107. 1.9.0-dev-693 also bumps KotlinAbiVersion
2023-02-01 15:13:34 +01:00
Nikita Bobko 44b1cf6c46 Add docs for different metadata versions and proto files
Review: https://jetbrains.team/p/kt/reviews/8401
In scope of KT-55082
2023-02-01 15:13:34 +01: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
Nikita Bobko dff13ec584 Minor klib cleanups
Review: https://jetbrains.team/p/kt/reviews/8401

- Code style
- Drop unused properties in kotlin-native/build.gradle
- kotlin-native/build.gradle: drop unused import
- use final instead of open when possible

This is just a cleanup commit. It neither fixes any issue/bug, nor
introduces new behaviour.

Feel free to revert this commit if you find out that it breaks something
2023-02-01 15:13:34 +01:00
Sebastian Sellmair 1978566fee [K/N] SearchPathResolver: Do not emit warning for LenientUnresolvedLibrary
^KT-56205 Verification Pending
2023-01-31 16:15:19 +00:00
Pavel Punegov c9aeadd31f [K/N] Remove old Compiler and Meta Version ^KT-55677 Fixed
* Replace it with KotlinCompilerVersion
* K/N version should be set now with `deployVersion`.
* Cleanup deprecated functions in older versions
 of the Gradle plugin
* Cleanup tests for older versions of compiler downloader

Merge-request: KT-MR-8436
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-01-30 13:10:08 +00:00
Svyatoslav Scherbina 322a8a443b Native: add included forward declarations into cinterop klib manifest
This allows the compiler to limit imports from "magic" packages like
cnames.structs to forward declarations actually present in dependent
cinterop klibs.

The manifest already had `exportForwardDeclarations` field, but
- it didn't include Objective-C forward declarations (@class, @protocol)
- it has a slightly different meaning (the export list enables importing
  the listed declarations through the interop package of the library,
  while the include list shouldn't do that), so we better avoid mixing
  them.
2023-01-30 11:00:33 +00:00
Nikita Bobko 887547c445 Drop MetadataComparisonTest & drop build-tools -> util-klib dependency
Review: https://jetbrains.team/p/kt/reviews/8360

MetadataComparisonTest was the only one in build-tools module who
depended on util-klib, that's why we can drop build-tools -> util-klib
dependency

MetadataComparisonTest is no longer needed, that's why we can drop it.

The dependency drop is a one step forward in dropping
`kotlin.srcDir("../compiler/util-klib/src")` line in
`buildSrc/build.gradle.kts`. Adding source roots in `buildSrc` is hacky
and can lead to frustrations (e.g. KT-55874). That's why it's desirable
to drop buildSrc -> util-klib hacky dependency.

Unfortunatelly, I couldn't drop buildSrc -> util-klib dependency,
because:
1. buildSrc depends on kotlin-native/shared/src/library/kotlin +
   buildSrc depends on kotlin-native/tools/kotlin-native-gradle-plugin +
   maybe smth else
2. kotlin-native/shared/src/library/kotlin depends on util-klib +
   kotlin-native/tools/kotlin-native-gradle-plugin depends on util-klib +
   maybe smth else
2023-01-19 12:55:56 +00:00
Sergej Jaskiewicz a66950b629 [klib] Finish refactoring of ZipUtil 2023-01-05 10:13:38 +00:00
Sebastian Sellmair 0575567da4 [Gradle] Implement KotlinLibrary.builtInsPlatform extension
KT-55189
2022-12-02 07:47:28 +00:00
Sergej Jaskiewicz d50c072af0 [klib] Validate paths when unpacking zip archives 2022-11-29 12:21:04 +00:00
Troels Bjerre Lund e520fb712b [K/N] Fix general case of KT-49827
When loading default libraries, the code assumed that all subdirectories
of <kotlin native home>/klib/*/ corresponded to valid libraries. The bug
report only considers the case of .DS_STORE, which is generated by
Finder on MacOS, but this case has already been accounted for in the
code.

The fix filters out all subdirectories that are not stdlib and don’t have the
“org.jetbrains.kotlin” prefix. 

Co-authored-by: Troels Lund <troels@google.com>
2022-06-23 10:12:38 +00:00
Pavel Kunyavskiy 76da9df102 Bump klib ABI version
KLIB forward compatibility was broken during work related to
definitely not-null types, but version was not changed. This led to
exceptions in compiler instead of meaningful error.

^KT-52518
2022-05-28 07:30:54 +00:00
sebastian.sellmair 0fd65ab1a0 [Native] TargetedLibraryImpl: Respect 'commonizerNativeTargets' property
^KT-50847 Verification Pending
2022-01-25 16:59:27 +00:00
Vyacheslav Gerasimov bc2f0936bd Build: Rename commonDep -> commonDependency 2021-12-16 21:48:19 +03:00
Elena Lepilkina 416719c216 [KLIB] Removed support of pattern '<library_name>@<version>' (KT-42500 Fixed) 2021-10-06 09:34:55 +00:00
Vyacheslav Gerasimov ab146bd6d4 Build: Fix deprecated Gradle configurations usages
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Roman Artemev 7d8c86caf1 [KLIB] Add API to access file's part of data as ByteArray
It requires for computing fingerprint of IrFile in IC infra
2021-08-24 01:09:12 +03:00
Alexander Udalov 376b420d1a Fix warnings in JS/WASM modules 2021-08-06 22:36:22 +02:00
Roman Artemev 3403c464fe [KLIB] Promote library ABI version 2021-07-01 17:40:39 +03:00
Roman Artemev b8e5185b61 [KLIB] Add extra debug information for Local signatures 2021-07-01 17:40:37 +03:00
Nikolay Krasko 9d1a6ebb18 Minor: narrow extracting functions scope 2021-05-27 20:13:07 +03:00
sebastian.sellmair 22ea5c7de4 Demote fatal error to warning on unresolved libraries mentioned in Klib's manifest 'depends' for metadata compilation
^KT-46107
2021-04-21 20:05:55 +00:00
sebastian.sellmair bbcfde7231 [Commonizer] Add 'commonizer_target' and 'commonizer_native_targets' to commonized klib's manifest
^KT-46077 Fixed
2021-04-16 14:56:31 +00:00
Alexander Udalov 168d8b07a8 Minor, fix warnings on new stdlib API
In modules where allWarningsAsErrors is not yet enabled.
2021-04-15 18:39:06 +02:00
Anton Bannykh ba5582de99 IntArray and LongArray serialization 2021-04-09 19:54:14 +03:00
Dmitriy Dolovov caee17fddb [IR] Bump ABI version due to string serialization format change 2021-04-08 12:22:48 +03:00
Dmitriy Dolovov 1fa0ba987b Revert "[IR] Bump ABI version due to string serialization format change"
This reverts commit 4df5dcdf
2021-04-08 09:46:12 +03:00
Dmitriy Dolovov 4df5dcdf75 [IR] Bump ABI version due to string serialization format change
^KT-33175
2021-04-08 09:40:22 +03:00
Dmitriy Dolovov 50326f019b [IR] Use the proper encoding for string serialization
^KT-33175
2021-04-08 09:40:02 +03:00
Roman Artemev d6bb1f2d4e [KLIB] Make KotlinLibraryImpl printable 2021-02-02 12:05:34 +03:00
Roman Artemev 8bc7866f01 [KLIB] Fix klib IO when accessing parent file 2021-01-27 09:48:57 +03:00
Roman Artemev 75016bf54d [Gradle, JS] Fix bridge between Gradle and Js IR CLI 2021-01-26 19:23:25 +03:00
Roman Artemev 37c7f60ae7 [KLIB] Fix issues between directory and .klib modes
- use .klib extension explicitly
 - fix issue with `module.klib.klib` names
2021-01-26 19:23:23 +03:00
Roman Artemev 697d4675a2 [KLIB] Improve klib debugging implementing KotlinLibrary.toString() 2021-01-26 19:23:23 +03:00
Igor Chevdar 03693e3d5a [klib] Optimized away some Files.exists() 2020-12-17 13:57:16 +05:00
Alexander Gorshenev eea5a9102c Bump klib abi version to 1.4.2 to reflect absence of serialized fake overrides 2020-11-09 16:02:14 +03:00
Alexander Gorshenev 5f2a963006 Better wording and comments for klib compatibility code 2020-11-06 16:19:43 +03:00
Alexander Gorshenev 891a4c4621 Dropped outdated klib version compatibility mechanisms 2020-11-06 16:19:43 +03:00