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

Provide a sample project to demonstrate a runnable full stack Krossbow example #480

Open
joffrey-bion opened this issue Mar 22, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@joffrey-bion
Copy link
Owner

For beginners, the getting started guide might not be sufficient to see how all the pieces come together. It would be useful to provide a sample project that they can explore and play with.

In the meantime, the Seven Wonders game project, which uses Krossbow for its client, is the only real example we can show, but for a beginner it is likely overwhelming.

See initial discussion in #479

@joffrey-bion joffrey-bion added the documentation Improvements or additions to documentation label Mar 22, 2024
@Polve
Copy link

Polve commented Apr 10, 2024

I'm learning (or at least trying :D) copying snippets from the Seven Wonders client but for example I got an error on this line taken from https://github.com/joffrey-bion/seven-wonders/blob/main/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt#L47:

suspend fun watchErrors(): Flow<ErrorDTO> = stompSession.subscribe("/user/queue/errors", ErrorDTO.serializer())

The compiler tells me:

exception: src/main/kotlin/Main.kt:55:72: error: type mismatch: inferred type is String but StompSubscribeHeaders was expected
exception: suspend fun watchErrors(): Flow = stompSession.subscribe("/user/queue/errors", ErrorDTO.serializer())
exception: ^

Any hints?

@Polve
Copy link

Polve commented Apr 10, 2024

Found the problem, my bad: the "subscribe" function is overloaded and hence must be imported.
The problem is fixed adding this import:

import org.hildan.krossbow.stomp.conversions.kxserialization.subscribe

Sorry for the noise!

@joffrey-bion
Copy link
Owner Author

No problem for the noise, I'm happy you found your answer :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants