In strict mode, an exception will be thrown when inconsistent metadata is encountered. In lenient mode, the reader will attempt to handle the inconsistent metadata by ignoring certain inconsistencies. This is a solution to a problem of reading metadata 'from the future' that is not allowed by default, but desired in certain cases. See updated ReadMe for details.
Also fix problem with Strict Semantics flag.
#KT-57922 Fixed
#KT-59441 Fixed
- Write now returns result (Metadata or ByteArray) directly without re-wrapping it;
- annotationData/bytes is private to avoid unsoundness if external client corrupts it;
- .toXxx() do not throw exceptions anymore and deprecated. Exceptions are thrown only from read/write;
- Instead of toXxx(), properties like .kmClass should be used instead. They're initialized eagerly and return a view without copying.
- KotlinClassMetadata.Unknown is now a data object, as no useful information is exposed
#KT-59365 Fixed
Update changelog for kotlinx-metadata-jvm 0.6.0, add migration guide, and actualize ReadMe.md
Document releasing process
Co-authored-by: Alexander Udalov <Alexander.Udalov@jetbrains.com>
Merge-request: KT-MR-8206
Merged-by: Leonid Startsev <leonid.startsev@jetbrains.com>
- remove the requirement to use Bintray repo; kotlinx-metadata-jvm is
published to Maven Central now
- remove the note about kotlin.Metadata being internal; it's public
since 1.3
- rename object Flags to Flag and merge it with MetadataFlag
- use typealias Flags instead of Int
- use top level function "flagsOf" instead of "Flags.invoke" to
construct a bitmask
#KT-23198