Skip to content

WIP: Kotlin Coroutines#1808

Draft
pwrobeldev wants to merge 12 commits into
masterfrom
pwrobeldev/kotlin-coroutines
Draft

WIP: Kotlin Coroutines#1808
pwrobeldev wants to merge 12 commits into
masterfrom
pwrobeldev/kotlin-coroutines

Conversation

@pwrobeldev

Copy link
Copy Markdown
Contributor

POC

Two new LIME attributes are added:
 - 'AsyncCallbackMetadata' which will be used for lambda definitions
   that are used as asynchronous callbacks
 - 'AsyncDecorator' which will be used for functions for which we want
   to generate decorator functions that rely on coroutines

The validation of parsed values will be introduced in a separate commit.

Signed-off-by: Patryk Wrobel <183546751+pwrobeldev@users.noreply.github.com>
The new classes can be obtained for LimeFunction and LimeLambda.
The encapsulate the logic related to handling the most important
field related to async decorators.

Signed-off-by: Patryk Wrobel <183546751+pwrobeldev@users.noreply.github.com>
This commit brings the expected output for the old-style
asynchronous functions -- without decorator.

It will be extended in the next commit by the usage of
the decorators.

Signed-off-by: Patryk Wrobel <183546751+pwrobeldev@users.noreply.github.com>
We must deduce the type to return from suspending function.

Signed-off-by: Patryk Wrobel <183546751+pwrobeldev@users.noreply.github.com>
Signed-off-by: Patryk Wrobel <183546751+pwrobeldev@users.noreply.github.com>
When async decorator and async metadata is used,
then additional suspending overload is generated.

Signed-off-by: Patryk Wrobel <183546751+pwrobeldev@users.noreply.github.com>
Signed-off-by: Patryk Wrobel <183546751+pwrobeldev@users.noreply.github.com>
Signed-off-by: Patryk Wrobel <183546751+pwrobeldev@users.noreply.github.com>
Comment thread functional-tests/functional/input/lime/AsyncDecorator.lime Outdated
Comment thread functional-tests/functional/input/src/cpp/AsyncDecorator.cpp Outdated
Comment thread functional-tests/functional/input/src/cpp/AsyncDecorator.cpp Outdated
* SPDX-License-Identifier: Apache-2.0
* License-Filename: LICENSE
*/
package com.here.android.test

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • AsyncDecorator(CancelFunction="cancel") not tested?
  • not all EngineError tested?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The additional test case for cancellation has been added.

Signed-off-by: Patryk Wrobel <183546751+pwrobeldev@users.noreply.github.com>
@pwrobeldev pwrobeldev force-pushed the pwrobeldev/kotlin-coroutines branch from d861fb5 to e3afc16 Compare June 25, 2026 06:07
Signed-off-by: Patryk Wrobel <183546751+pwrobeldev@users.noreply.github.com>
Signed-off-by: Patryk Wrobel <183546751+pwrobeldev@users.noreply.github.com>
Signed-off-by: Patryk Wrobel <183546751+pwrobeldev@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants