Commit Graph

110 Commits

Author SHA1 Message Date
wrongwrong 6ecb5a1bd3 Fix ReadMe 2021-11-19 14:48:22 +01:00
Alexander Udalov bb390dca16 Minor, improve kdoc for KValueParameter.type/varargElementType
Slightly related to e77f72071d.
2021-11-10 16:12:56 +01:00
Alexander Udalov fbd20b6556 Remove unused JvmTypeAliasExtensionVisitor and JvmValueParameterExtensionVisitor
They were added in e4702bf438 and a08cf59017 but in fact they are not
needed on JVM until there are JVM-specific extensions in the metadata.

Moreover, there was a typo in JvmValueParameterExtensionVisitor's
superclass (see https://github.com/JetBrains/kotlin/pull/4613).
2021-11-10 16:12:56 +01:00
Alexander Udalov f5dd0abb76 Render JVM default flags in kotlinp 2021-11-09 15:09:29 +01:00
Steven Schäfer c552b5f820 kotlinx-metadata-jvm: Handle the jvmClassFlags extension 2021-11-09 15:09:20 +01:00
Starlight220 e77f72071d migrate KmValueParameter.type (KmType? -> lateinit KmType) 2021-10-26 18:21:38 +02:00
Yan Zhulanow 46b94a4757 Pill: Include certain modules into the BASE variant 2021-10-19 19:55:06 +03:00
Vyacheslav Gerasimov f91d6958a8 Build: Rework runtimeJar helper and drop redundant configuration
#KTI-559
2021-09-26 20:10:29 +03: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
Alexander Udalov 0a9498f7e2 Build: suppress deprecated JVM target warning globally
There seems to be no point in configuring the compiler argument per
project. This argument will be deleted soon anyway, when we remove
support for JDK 1.6 & 1.7.

Also remove `disableDeprecatedJvmTargetWarning`. It didn't have any
effect in all modules where it was applied because these modules
reassign `freeCompilerArgs` anyway, with
`-Xsuppress-deprecated-jvm-target-warning` in it.
2021-07-27 13:35:39 +02:00
Alexander Udalov 1e16c7d8d4 Minor, update kotlinx-metadata-jvm changelog
According to changes in 1e7295c6.
2021-07-12 22:40:02 +02:00
pyos 1e7295c64e JVM: add $delegate method support to kotlinx-metadata
and kotlinp as well -- it is now possible to see the effect of the
previous commit.
2021-07-12 22:38:44 +02:00
Yahor Berdnikau 7789054547 Migrate repo to use JVM toolchains Gradle feature.
^KT-46972 Fixed
2021-07-05 14:11:12 +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
Alexander Udalov c4b2b7e0da Add underlying property name & type for inline class to kotlinx-metadata
#KT-45635 Fixed
2021-04-01 22:34:53 +02:00
Alexander Udalov 5f7f4a4ac8 Improve API of annotation arguments in kotlinx-metadata
See changes in ChangeLog.md for more information
2021-04-01 22:34:53 +02:00
Alexander Udalov 1a82158472 Fix array of KClass annotation arguments in kotlinx-metadata-jvm
#KT-45594 Fixed
2021-04-01 22:34:53 +02:00
Dmitriy Novozhilov ee7c90791e Add workaround for KT-45553
This is needed to compile this code with FIR
2021-03-24 12:56:14 +03:00
Yan Zhulanow bcce187e3f Pill: Import kotlinx-metadata only in FULL mode 2021-03-16 19:21:49 +09:00
Alexander Udalov ee11202db5 Add Flag.IS_VALUE for value classes to kotlinx-metadata-jvm
#KT-44783 Fixed
2021-03-08 21:22:40 +01:00
Alexander Udalov f63ffc51ae Remove JvmBytecodeBinaryVersion from the compiler code
Move it to build-common where it's still used in incremental compilation
caches, and simplify a bit. In the future, it'll make sense to remove it
completely and to avoid writing it to caches. In this commit, I don't do
that to prevent the IC cache version to be updated, causing rebuilds for
all JPS projects.

 #KT-41758
2021-02-23 12:45:41 +01:00
Alexander Udalov 448c6c2f0d kotlinx-metadata-jvm: deprecate KotlinClassHeader.bytecodeVersion
#KT-41758
2021-02-23 12:45:40 +01:00
Alexander Udalov 1d6b198915 Build: suppress version and JVM target warnings
To further reduce the output on each build.
2021-02-18 12:17:17 +01:00
Dmitriy Dolovov e28c1fd310 Metadata: Chunked KlibModuleFragmentWriteStrategy implementation 2021-02-02 23:10:57 +03:00
Pavel Kirpichenkov b66f5c8180 Drop type aliases for JS and KLIB string tables
They used to use the same approximation logic anyway
^KT-20996
2021-01-20 11:05:53 +03:00
Dmitriy Dolovov 6e7b5a55b3 kotlinx-metadata: Don't write flags for absent property accessors 2020-11-13 22:54:34 +03:00
Alexander Udalov 95edcea9a9 Build: fix kotlinx-metadata-jvm publication
Co-authored-by: Vyacheslav Gerasimov <vyacheslav.gerasimov@jetbrains.com>
2020-10-15 21:13:50 +02:00
Alexander Udalov da69e3db7c kotlinx-metadata-jvm: report error on using metadata version < 1.4 in writers
The main reason for this change is that the current API for class
version requirements (`KmClass.versionRequirements`) makes it impossible
to support pre-1.4 metadata where this was stored incorrectly for nested
classes: with the "version requirement table" in the outer class, and
indexes into that table in nested classes. See KT-41011.

Other than this aspect, metadata of classes is basically the same in
pre-1.4 and 1.4, which means that if some kotlinx-metadata-jvm users
really need to serialize metadata of an earlier version and they don't
care about the version requirements issue, they can just use these new
bytes but write the earlier version (e.g. 1.1) to the class file.
Everything will work the same, except for the possible version
requirements issue mentioned above.

Note that metadata version 1.4 is still supported for
`KotlinModuleMetadata.Writer` though.

 #KT-41011 Fixed
2020-10-15 13:10:01 +02:00
Alexander Udalov 5d7d9beb0d kotlinx-metadata-jvm: remove bytecodeVersion from write methods
Bytecode version has never been used meaningfully in Kotlin, and will be
removed in a future release, so there's no point in using it. See
KT-41758.
2020-10-15 13:10:01 +02:00
Alexander Udalov 90d66b0ba5 kotlinx-metadata: reformat, cleanup, fix inspections 2020-10-15 13:10:01 +02:00
Alexander Udalov 949952e766 kotlinx-metadata: minor, remove incorrect ReplaceWith from IS_PRIMARY deprecation 2020-10-08 17:44:35 +02:00
Dmitriy Dolovov 52e56ca070 kotlinx-metadata: Wrong interpretation of Flag.Constructor.IS_PRIMARY
^KT-42429
2020-10-07 09:43:14 +03:00
Dmitriy Novozhilov 07a3009d43 Introduce new modules for common parts of deserialization 2020-09-11 10:08:37 +03:00
Sergey Bogolepov b2d9e5be91 [kotlinx-metadata-klib] Drop dependency on descriptors
It's unneeded since all used declarations moved to
:core:compiler.common.
2020-08-28 12:33:46 +07:00
Vyacheslav Gerasimov 0cc3762f9a Build: Fix kotlinx-metadata-klib publication 2020-08-25 17:18:00 +03:00
Dmitriy Novozhilov 3ccb72bb1a Shadow :core:compiler.common inside kotlinx.metadata 2020-08-25 10:41:34 +03:00
Sergey Bogolepov 5851a7dea0 [kotlinx-metadata-klib] Proper support for nullable enum entry fields 2020-07-28 11:59:17 +07:00
Dmitriy Dolovov 3d9093583f Metadata: 'non-stable parameter names' flag for callables
^KT-34602
2020-07-27 23:11:30 +07:00
Vyacheslav Gerasimov 1fea01754d Build: Remove jvmTarget = "1.6" for kotlinx-metadata-klib
kotlinx-metadata-klib can't have jvmTarget 1.6 because it embeds module
:compiler:serialization which is compiled with jvmTarget 1.8. It is
enforced by configuration error in Gradle 6.5
2020-07-09 19:31:20 +03:00
Vyacheslav Gerasimov 410c5f3e69 Build: Remove artifact configuration out of lazy lambda
It may not be executed leading to misconfiguration
2020-06-14 20:31:25 +03:00
Alexander Udalov 4520e02bae Support fun interfaces in kotlinx-metadata
#KT-37421 Fixed
2020-05-27 23:29:12 +02:00
Alexander Udalov 012ffa2993 Support new scheme of compilation of OptionalExpectation annotations
Instead of generating these annotation classes as package-private on
JVM, serialize their metadata to the .kotlin_module file, and load it
when compiling dependent multiplatform modules.

The problem with generating them as package-private was that
kotlin-stdlib for JVM would end up declaring symbols from other
platforms, which would include some annotations from package
kotlin.native. But using that package is discouraged by some tools
because it has a Java keyword in its name. In particular, jlink refused
to work with such artifact altogether (KT-21266).

 #KT-38652 Fixed
2020-05-12 19:28:57 +02:00
Alexander Udalov f4d53c18a1 Fix JarContentTest by adding dependency on jar creating task
Otherwise tests could be run before the final jar was created and stored
to `build/libs`.
2020-03-05 14:36:24 +01:00
Alexander Udalov 505ec072bb Remove dependency of JarContentTest on JDK 8
It turns out that `jvmTarget` and `javaHome` settings in
build.gradle.kts were changing the module settings and affected the
compilation of kotlinx-metadata-jvm sources. The correct way to use JDK
8 in tests would be to change JVM target / JDK home of the specific
KotlinCompile task via its `kotlinOptions`, but JarContentTest doesn't
need JDK 8 anyway at this moment, so simplify that instead.
2020-03-05 14:36:23 +01:00
Alexander Udalov 3a4e540d44 Minor refactoring and style fixes in JarContentTest
Inline unnecessary members, remove commented code, refactor according to
the style guide, some other minor improvements
2020-03-05 02:25:00 +01:00
Jinseong Jeon 79790ca227 Avoid uses of plain "kotlin" in metadata deserialization.
KT-35587 Fixed
2020-03-05 02:22:36 +01:00
Sergey Bogolepov 595362b99f [kotlinx-metadata-klib] Proper support for enum entries 2020-01-16 11:38:39 +07:00
Sergey Bogolepov 96e6602da2 [kotlinx-metadata-jvm] Fix typo 2019-11-28 17:32:03 +07:00
Sergey Bogolepov a08cf59017 [kotlinx-metadata] Add extensions for KmValueParameter
There is no extension on jvm, but klibs have parameter annotations.
2019-11-28 10:40:21 +07:00
Sergey Bogolepov 18bb615dd9 [kotlinx-metadata-klib] Fix library reading
* To be able to deserialize metadata we need to include ":core:deserialization".
* Use per-fragment string tables.
* Read file names from strings instead of file names list.
2019-11-28 10:40:20 +07:00