Migrate to ktor 2.0.0 eap and new native memory model #208
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Main reason for using ktor 2.0.0 EAP is support of coroutines 1.6 (non native-mt) and new native memory model. On current moment
native-mtversion of coroutines has some bugs, that appear in random places, and have no workarounds. In non native-mt there is no such bugs, and as anywhere, after release of ktor 2.0.0 we will need to migrate to new memory model, as ktor 2.0.0 will support only it, such change is both pro-active, and will improve developer experience.Changes:
transport-ktor,transport-ktor-client/servertotransport-ktor-tcp,transport-ktor-websocket-client/server+ intermediate modulestransport-ktorandtransport-ktor-websocketktor-networkmodule isn't published for JS - before it was published but hadnot implementederrors instead of implementationscoroutines-testmodulenative-mtversion anymoreNote: in future PR's there will be another split of ktor transport dependencies:
transport-ktor-websocket-server/clientdependencies provide just plain transports similar to nodejs and localktor-client/serverwith idea of deep ktor integration. For now it will be just client and server plugin, but in future, there will be possibility to integrate rsocket-kotlin into ktor-serialization or ContentNegotiation API, or even something else.TODO: update readme with new modules later in one go after new transport API and ktor integration improvements will be implemented