Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update org.jetbrains.kotlinx #70

Merged
merged 1 commit into from
Dec 20, 2021
Merged

Conversation

juul-mobile-bot
Copy link
Contributor

@juul-mobile-bot juul-mobile-bot commented Dec 17, 2021

This PR contains the following updates:

Package Update Change
org.jetbrains.kotlinx:kotlinx-serialization-json minor 1.0.1 -> 1.3.1
org.jetbrains.kotlinx:kotlinx-coroutines-core-js minor 1.4.2 -> 1.5.2

Release Notes

Kotlin/kotlinx.serialization

v1.3.1

==================

This release mainly contains bugfixes for 1.3.0 and provides new experimental Json.decodeToSequence function.

Improvements
  • Provide decodeToSequence to read multiple objects from stream lazily (#​1691)
Bugfixes
  • Correctly handle buffer boundaries while decoding escape sequences from json stream (#​1706)
  • Properly skip unknown keys for objects and structures with zero properties (#​1720)
  • Fix merging for maplikeSerializer when the map is not empty (by using the actual size * 2). (#​1712) (thanks to pdvrieze)
  • Fix lookup of primitive array serializers by Java type token (#​1708)

v1.3.0

==================

This release contains all of the cool new features from 1.3.0-RC (see below) as well as minor improvements.
It uses Kotlin 1.5.31 by default.

Bugfixes and improvements
  • Promote JsonConfiguration and its usages to stable (#​1690)
  • Remove opt-in annotations from SerialFormat, StringFormat, BinaryFormat (#​1688)
  • Correctly throw SerializationException instead of IOOBE for some cases with EOF in streams (#​1677)
  • CBOR: ignore tags when reading (#​1614) (thanks to David Robertson)

v1.2.2

==================

This release contains various bugfixes, some useful features and important performance improvements.
It also uses Kotlin 1.5.20 as default.

Features
  • Support for @JsonNames and coerceInputValues in Json.decodeFromDynamic (#​1479)
  • Add factory function to wrap a serial descriptor with a custom name for custom delegating serializers (#​1547) (thanks to Fadenfire)
  • Allow contextually serialized types to be used as map keys in Json (#​1552) (thanks to pdvrieze)
Bugfixes and performance improvements
  • Update size in JsonStringBuilder slow-path to avoid excessive array-copies for large strings with escape symbols (#​1491)
  • Optimize integer encoding length in CBOR (#​1570) (thanks to davertay)
  • Throw JsonDecodingException instead of ClassCastException during unexpected null in TreeJsonDecoder (#​1550)
  • Prohibit 'null' strings in lenient mode in order to get rid of 'null' and "null" ambiguity (#​1549)
  • Avoid usage of reflective-like serialDescriptor<KType> in production sources (#​1540)
  • Added correct error message when deserializing missing enum member for Properties format (#​1539)
  • Make DescriptorSchemaCache in Json thread-local on Native (#​1484)

v1.2.1

==================

This release mainly contains bugfixes for various issues, including important broken thread-safety and improper encoding.

Features
  • Added support for nullable values, nested and empty collections in protobuf (#​1430)
Bugfixes
  • Support @​JsonNames for enum values (#​1473)
  • Handle EOF in skipElement correctly (#​1475)
  • Allow using value classes with primitive carriers as map keys (#​1470)
  • Read JsonNull only for non-string literals in JsonTreeReader (#​1466)
  • Properly reuse JsonStringBuilders in CharArrayPool (#​1455)
  • Properly ensure capacity of the string builder on the append slow-path (#​1441)

v1.2.0

==================

This release has some known critical bugs, so we advise to use 1.2.1 instead.

This release contains a lot of new features and important improvements listed below;
Kotlin 1.5.0 is used as a default compiler and language version.

JSON performance improvements

JSON encoder and decoder were revisited and significantly rewritten,
which lead us to up to 2-3x times speedup in certain cases.
Additional details can be found in the corresponding issues: [1], [2].

Ability to specify alternative names during JSON decoding

The one of the most voted issues is fixed now — it is possible to specify multiple names for one property
using new @JsonNames annotation.
Unlike @SerialName, it only affects JSON decoding, so it is useful when dealing with different versions of the API.
We've prepared a documentation for you about it.

JsonConfiguration in public API

JsonConfiguration is exposed as a property of Json instance. You can use it to adjust behavior in
your custom serializers.
Check out more in the corresponding issue and the PR.

Generator for .proto files based on serializable Kotlin classes

Our implementation of Protocol Buffers format uses @Serializable Kotlin classes as a source of schema.
This is very convenient for Kotlin-to-Kotlin communication, but makes interoperability between languages complicated.
To resolve this issue, we now have a
schema generator that can produce .proto files out of Kotlin classes. Using it, you can keep Kotlin
classes as a source of truth and use traditional protoc compilers for other languages at the same time.
To learn more, check out the documentation for the new ProtoBufSchemaGenerator class or
visit the corresponding PR.

Note: this generator is on its experimental stage and any feedback is very welcomed.

Contextual serialization of generic classes

Before 1.2.0, it was impossible to register context serializer for generic class,
because contextual function accepted a single serializer.
Now it is possible to register a provider — lambda that allows to construct a serializer for generic class
out of its type arguments serializers. See the details in the documentation.

Other features
  • Support for watchosX64 target (#​1366).
  • Introduce kotlinx-serialization-bom (#​1356).
  • Support serializer on JS IR when T is an interface (#​1431).
Bugfixes
  • Fix serializer lookup by KType for third party classes (#​1397) (thanks to mvdbos).
  • Fix inability to encode/decode inline class with string to JsonElement (#​1408).
  • Throw SerializationException instead of AIOB in ProtoBuf (#​1373).
  • Fix numeric overflow in JsonLexer (#​1367) (thanks to EdwarDDay).

v1.1.0

==================

This release contains all features and bugfixes from 1.1.0-RC plus an additional fix for incorrect exception type
(#​1325 — Throw SerializationException instead of IllegalStateException in EnumSerializer) and uses release version of Kotlin 1.4.30.

In the light of JCenter shutdown, starting from 1.1.0-RC and now on,
all new releases of kotlinx.serialization are published directly to Maven Central and therefore are not available in https://kotlin.bintray.com/kotlinx/ repository.
We suggest you to remove jcenter() and other kotlin bintray repositories from your buildscripts and to use mavenCentral() repository instead.

Kotlin/kotlinx.coroutines

v1.5.2

Compare Source

  • Kotlin is updated to 1.5.30.
  • New native targets for Apple Silicon are introduced.
  • Fixed a bug when onUndeliveredElement was incorrectly called on a properly received elements on JS (#​2826).
  • Fixed Dispatchers.Default on React Native, it now fully relies on setTimeout instead of stub process.nextTick. Thanks to @​Legion2 (#​2843).
  • Optimizations of Mutex implementation (#​2581).
  • Mutex implementation is made completely lock-free as stated (#​2590).
  • Various documentation and guides improvements. Thanks to @​MasoodFallahpoor and @​Pihanya.

v1.5.1

Compare Source

  • Atomic update, getAndUpdate, and updateAndGet operations of MutableStateFlow (#​2720).
  • Executor.asCoroutineDispatcher implementation improvements (#​2601):
    • If the target executor is ScheduledExecutorService, then its schedule API is used for time-related coroutine operations.
    • RemoveOnCancelPolicy is now part of the public contract.
  • Introduced overloads for Task.asDeferred and Task.await that accept CancellationTokenSource for bidirectional cancellation (#​2527).
  • Reactive streams are updated to 1.0.3 (#​2740).
  • CopyableThrowable is allowed to modify the exception message during stacktrace recovery (#​1931).
  • CoroutineDispatcher.releaseInterceptedContinuation is now a final method (#​2785).
  • Closing a Handler underlying Handler.asCoroutineDispatcher now causes the dispatched coroutines to be canceled on Dispatchers.IO (#&#8203;2778).
  • Kotlin is updated to 1.5.20.
  • Fixed a spurious ClassCastException in releaseInterceptedContinuation and IllegalStateException from tryReleaseClaimedContinuation (#​2736, #​2768).
  • Fixed inconsistent exception message during stacktrace recovery for non-suspending channel iterators (#​2749).
  • Fixed linear stack usage for CompletableFuture.asDeferred when the target future has a long chain of listeners (#​2730).
  • Any exceptions from CoroutineDispatcher.isDispatchNeeded are now considered as fatal and are propagated to the caller (#​2733).
  • Internal DebugProbesKt (used in the debugger implementation) are moved from debug to core module.

v1.5.0

Compare Source

Note that this is a full changelog relative to 1.4.3 version. Changelog relative to 1.5.0-RC can be found in the end.

Channels API
  • Major channels API rework (#​330, #​974). Existing offer, poll, and sendBlocking methods are deprecated, internal receiveCatching and onReceiveCatching removed, receiveOrNull and onReceiveOrNull are completely deprecated. Previously deprecated SendChannel.isFull declaration is removed. Channel operators deprecated with ERROR are now HIDDEN.
  • New methods receiveCatching, onReceiveCatching trySend, tryReceive, and trySendBlocking along with the new result type ChannelResult are introduced. They provide better type safety, are less error-prone, and have a consistent future-proof naming scheme. The full rationale behind this change can be found here.
  • BroadcastChannel and ConflatedBroadcastChannel are marked as ObsoleteCoroutinesApi in the favor or SharedFlow and StateFlow. The migration scheme can be found in their documentation. These classes will be deprecated in the next major release.
  • callbackFlow and channelFlow are promoted to stable API.
Reactive integrations
  • All existing API in modules kotlinx-coroutines-rx2, kotlinx-coroutines-rx3, kotlinx-coroutines-reactive, kotlinx-coroutines-reactor, and kotlinx-coroutines-jdk9 were revisited and promoted to stable (#​2545).
  • publish is no longer allowed to emit null values (#​2646).
  • Misleading awaitSingleOr* functions on Publisher type are deprecated (#​2591).
  • MaybeSource.await is deprecated in the favor of awaitSingle, additional lint functions for Mono are added in order to prevent ambiguous Publisher usages (#​2628, #​1587).
  • ContextView support in kotlinx-coroutines-reactor (#​2575).
  • All reactive builders no longer ignore inner cancellation exceptions preventing their completion (#​2262, #​2646).
  • MaybeSource.collect and Maybe.collect properly finish when they are completed without a value (#​2617).
  • All exceptions are now consistently handled according to reactive specification, whether they are considered 'fatal' or not by reactive frameworks (#​2646).
Other improvements
  • Kotlin version is upgraded to 1.5.0 and JVM target is updated to 1.8.
  • Flow.last and Flow.lastOrNull operators (#​2246).
  • Flow.runningFold operator (#​2641).
  • CoroutinesTimeout rule for JUnit5 (#​2197).
  • Internals of Job and AbstractCoroutine was reworked, resulting in smaller code size, less memory footprint, and better performance (#​2513, #​2512).
  • CancellationException from Kotlin standard library is used for cancellation on Koltin/JS and Kotlin/Native (#​2638).
  • Introduced new DelicateCoroutinesApi annotation that warns users about potential target API pitfalls and suggests studying API's documentation first. The only delicate API right now is GlobalScope (#​2637).
  • Fixed bug introduced in 1.4.3 when kotlinx-coroutines-core.jar triggered IDEA debugger failure (#​2619).
  • Fixed memory leak of ChildHandlerNode with reusable continuations (#​2564).
  • Various documentation improvements (#​2555, #​2589, #​2592, #​2583, #​2437, #​2616, #​2633, #​2560).
Changelog relative to version 1.5.0-RC
  • Fail-fast during emitAll called from cancelled onCompletion operator (#​2700).
  • Flows returned by stateIn/shareIn keep strong reference to sharing job (#​2557).
  • Rename internal TimeSource to AbstractTimeSource due to import issues (#​2691).
  • Reverted the change that triggered IDEA coroutines debugger crash (#​2695, reverted #​2291).
  • watchosX64 target support for Kotlin/Native (#​2524).
  • Various documentation fixes and improvements.

v1.4.3

Compare Source

General changes
  • Thread context is properly preserved and restored for coroutines without ThreadContextElement (#​985)
  • ThreadContextElements are now restored in the opposite order from update (#​2195)
  • Improved performance of combine with 4 parameters, thanks to @​alexvanyo (#​2419)
  • Debug agent sanitizer leaves at least one frame with source location (#​1437)
  • Update Reactor version in kotlinx-coroutines-reactor to 3.4.1, thanks to @​sokomishalov (#​2432)
  • callInPlace contract added to ReceiveChannel.consume (#​941)
  • CoroutineStart.UNDISPATCHED promoted to stable API (#​1393)
  • Kotlin updated to 1.4.30
  • kotlinx.coroutines are now released directly to MavenCentral
  • Reduced the size of DispatchedCoroutine by a field
  • Internal class TimeSource renamed to SchedulerTimeSource to prevent wildcard import issues (#​2537)
Bug fixes
  • Fixed the problem that prevented implementation via delegation for Job interface (#​2423)
  • Fixed incorrect ProGuard rules that allowed shrinking volatile felds (#​1564)
  • Fixed await/asDeferred for MinimalStage implementations in jdk8 module (#​2456)
  • Fixed bug when onUndeliveredElement wasn't called for unlimited channels (#​2435)
  • Fixed a bug when ListenableFuture.isCancelled returned from asListenableFuture could have thrown an exception, thanks to @​vadimsemenov (#​2421)
  • Coroutine in callbackFlow and produce is properly cancelled when the channel was closed separately (#​2506)

Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Renovate Bot.

@codecov
Copy link

codecov bot commented Dec 17, 2021

Codecov Report

Merging #70 (8d7679b) into main (56a59f1) will decrease coverage by 0.09%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main      #70      +/-   ##
============================================
- Coverage     57.25%   57.16%   -0.10%     
  Complexity       11       11              
============================================
  Files             8        8              
  Lines           613      614       +1     
  Branches        145      145              
============================================
  Hits            351      351              
- Misses          223      224       +1     
  Partials         39       39              
Impacted Files Coverage Δ
koap/src/commonMain/kotlin/Message.kt 59.00% <0.00%> (-0.23%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 07a5f30...8d7679b. Read the comment docs.

@juul-mobile-bot juul-mobile-bot force-pushed the renovate/org.jetbrains.kotlinx branch from cb5a61e to 8d7679b Compare December 17, 2021 09:47
@twyatt twyatt merged commit b3ef56a into main Dec 20, 2021
@twyatt twyatt deleted the renovate/org.jetbrains.kotlinx branch December 20, 2021 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants